:root {
  --ttca-bg: #07111f;
  --ttca-panel: rgba(18, 31, 50, 0.9);
  --ttca-panel-strong: #14243a;
  --ttca-line: rgba(255, 255, 255, 0.1);
  --ttca-text: #f7fbff;
  --ttca-muted: #9eafc4;
  --ttca-green: #43e7aa;
  --ttca-cyan: #45cfff;
  --ttca-yellow: #ffd66b;
  --ttca-danger: #ff7f87;
}

.ttca-no-scroll { overflow: hidden !important; }

.ttca-app,
.ttca-app * { box-sizing: border-box; }

.ttca-app {
  position: relative;
  min-height: 100svh;
  margin: 0;
  color: var(--ttca-text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 85% -5%, rgba(69, 207, 255, 0.22), transparent 35%),
    radial-gradient(circle at -15% 35%, rgba(67, 231, 170, 0.14), transparent 35%),
    var(--ttca-bg);
  -webkit-font-smoothing: antialiased;
}

.ttca-app button,
.ttca-app input,
.ttca-app select { font: inherit; }

.ttca-app button { -webkit-tap-highlight-color: transparent; }

.ttca-shell {
  width: min(100%, 560px);
  min-height: 100svh;
  margin: 0 auto;
  padding: max(22px, env(safe-area-inset-top)) 18px calc(30px + env(safe-area-inset-bottom));
}

.ttca-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.ttca-eyebrow {
  margin: 0 0 8px;
  color: var(--ttca-cyan);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.17em;
}

.ttca-header h1 {
  margin: 0;
  font-size: clamp(34px, 10vw, 48px);
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.ttca-icon-button,
.ttca-refresh,
.ttca-sheet-close {
  display: grid;
  place-items: center;
  border: 1px solid var(--ttca-line);
  color: var(--ttca-text);
  background: rgba(255, 255, 255, 0.06);
}

.ttca-icon-button {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  font-size: 24px;
}

.ttca-status-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  margin-bottom: 16px;
  border: 1px solid var(--ttca-line);
  border-radius: 17px;
  background: rgba(13, 25, 42, 0.82);
  backdrop-filter: blur(14px);
}

.ttca-live-dot {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: var(--ttca-green);
  box-shadow: 0 0 0 5px rgba(67, 231, 170, 0.13), 0 0 18px rgba(67, 231, 170, 0.55);
}

.ttca-live-dot.is-stale {
  background: var(--ttca-yellow);
  box-shadow: 0 0 0 5px rgba(255, 214, 107, 0.13);
}

.ttca-live-dot.is-loading { animation: ttca-pulse 1s infinite; }

@keyframes ttca-pulse { 50% { opacity: 0.35; transform: scale(0.78); } }

.ttca-status-copy { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ttca-status-copy strong { font-size: 13px; }
.ttca-status-copy span { overflow: hidden; color: var(--ttca-muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }

.ttca-refresh {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  font-size: 22px;
}

.ttca-source {
  padding: 17px;
  border: 1px solid rgba(69, 207, 255, 0.24);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(21, 42, 66, 0.98), rgba(13, 25, 42, 0.96));
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.2);
}

.ttca-source > label,
.ttca-quick > span {
  display: block;
  margin-bottom: 10px;
  color: var(--ttca-muted);
  font-size: 12px;
  font-weight: 700;
}

.ttca-amount-row { display: flex; align-items: stretch; gap: 8px; }

.ttca-amount-row input {
  min-width: 0;
  width: 100%;
  height: 68px;
  border: 0;
  outline: 0;
  color: var(--ttca-text);
  background: transparent;
  font-size: clamp(39px, 12vw, 56px);
  font-weight: 800;
  letter-spacing: -0.04em;
}

.ttca-source-currency {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  padding: 0 13px;
  border: 1px solid var(--ttca-line);
  border-radius: 17px;
  color: var(--ttca-text);
  background: rgba(255, 255, 255, 0.06);
}
.ttca-source-currency > span:first-child { color: var(--ttca-cyan); font-size: 21px; font-weight: 800; }
.ttca-source-currency strong { font-size: 14px; }
.ttca-source-currency > span:last-child { color: var(--ttca-muted); }

.ttca-source-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-top: 14px;
  padding: 4px;
  border-radius: 14px;
  background: rgba(2, 10, 20, 0.45);
}

.ttca-source-tabs button {
  min-height: 38px;
  border: 0;
  border-radius: 11px;
  color: var(--ttca-muted);
  background: transparent;
  font-size: 12px;
  font-weight: 750;
}

.ttca-source-tabs button.is-active {
  color: #06121f;
  background: var(--ttca-green);
  box-shadow: 0 7px 18px rgba(67, 231, 170, 0.2);
}

.ttca-hero-result {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 10px 21px;
  text-align: center;
}
.ttca-hero-result span { color: var(--ttca-muted); font-size: 12px; font-weight: 700; }
.ttca-hero-result strong { margin: 5px 0 3px; color: var(--ttca-green); font-size: clamp(36px, 11vw, 52px); line-height: 1.05; letter-spacing: -0.045em; }
.ttca-hero-result small { max-width: 390px; color: var(--ttca-muted); font-size: 11px; line-height: 1.4; }

.ttca-currency-grid { display: grid; gap: 9px; }

.ttca-currency-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 72px;
  padding: 11px 14px;
  border: 1px solid var(--ttca-line);
  border-radius: 18px;
  background: var(--ttca-panel);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.ttca-currency-card.is-source { border-color: rgba(69, 207, 255, 0.55); transform: translateX(2px); }
.ttca-currency-card > div:nth-child(2) { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ttca-currency-card span { color: var(--ttca-muted); font-size: 11px; }
.ttca-currency-card strong { overflow: hidden; font-size: 20px; letter-spacing: -0.02em; text-overflow: ellipsis; white-space: nowrap; }
.ttca-currency-card small { color: var(--ttca-muted); font-size: 10px; font-weight: 800; }

.ttca-flag {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 900;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.13);
}
.ttca-flag-ch { color: white; background: #e32235; }
.ttca-flag-eu { color: #ffd44a; background: #214aa5; }
.ttca-flag-tr { color: white; background: #df2337; }

.ttca-quick { margin-top: 18px; }
.ttca-quick > div { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; }
.ttca-quick button {
  min-width: 0;
  height: 42px;
  padding: 0 4px;
  border: 1px solid var(--ttca-line);
  border-radius: 13px;
  color: var(--ttca-text);
  background: rgba(255,255,255,.05);
  font-size: 12px;
  font-weight: 750;
}

.ttca-tip {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 15px;
  margin-top: 18px;
  border: 1px solid rgba(255, 214, 107, 0.2);
  border-radius: 17px;
  background: rgba(255, 214, 107, 0.08);
}
.ttca-tip strong { color: var(--ttca-yellow); font-size: 13px; }
.ttca-tip span { color: #c4cdda; font-size: 11px; line-height: 1.45; }

.ttca-install-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 52px;
  margin-top: 15px;
  border: 1px solid rgba(69, 207, 255, 0.3);
  border-radius: 17px;
  color: var(--ttca-text);
  background: rgba(69, 207, 255, 0.1);
  font-size: 13px;
  font-weight: 800;
}
.ttca-install-button span { color: var(--ttca-cyan); font-size: 22px; }

.ttca-footer { display: flex; flex-direction: column; gap: 7px; padding: 20px 5px 4px; text-align: center; }
.ttca-footer > span { color: var(--ttca-muted); font-size: 11px; font-weight: 700; }
.ttca-footer small { color: #72849b; font-size: 9.5px; line-height: 1.4; }

.ttca-sheet-backdrop {
  position: fixed;
  z-index: 999997;
  inset: 0;
  opacity: 0;
  background: rgba(0, 5, 12, 0.68);
  backdrop-filter: blur(4px);
  transition: opacity 0.22s ease;
}
.ttca-sheet-backdrop.is-open { opacity: 1; }

.ttca-sheet {
  position: fixed;
  z-index: 999998;
  right: 0;
  bottom: 0;
  left: 0;
  width: min(100%, 560px);
  max-height: 90svh;
  margin: 0 auto;
  padding: 9px 18px calc(22px + env(safe-area-inset-bottom));
  overflow-y: auto;
  border: 1px solid var(--ttca-line);
  border-bottom: 0;
  border-radius: 26px 26px 0 0;
  color: var(--ttca-text);
  background: #0d1b2d;
  box-shadow: 0 -24px 70px rgba(0,0,0,.38);
  transform: translateY(104%);
  transition: transform 0.24s ease;
}
.ttca-sheet.is-open { transform: translateY(0); }
.ttca-sheet-handle { width: 42px; height: 5px; margin: 0 auto 16px; border-radius: 99px; background: rgba(255,255,255,.2); }
.ttca-sheet-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.ttca-sheet-header span { color: var(--ttca-cyan); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; }
.ttca-sheet-header h2 { margin: 3px 0 0; font-size: 27px; letter-spacing: -.03em; }
.ttca-sheet-close { width: 40px; height: 40px; border-radius: 14px; font-size: 27px; line-height: 1; }

.ttca-field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.ttca-field > span { color: var(--ttca-muted); font-size: 12px; font-weight: 700; }
.ttca-field select {
  width: 100%;
  height: 52px;
  padding: 0 14px;
  border: 1px solid var(--ttca-line);
  border-radius: 15px;
  outline: none;
  color: var(--ttca-text);
  background: var(--ttca-panel-strong);
}

.ttca-switch-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--ttca-line);
  border-radius: 17px;
  background: rgba(255,255,255,.04);
}
.ttca-switch-row > span { display: flex; flex-direction: column; gap: 3px; }
.ttca-switch-row strong { font-size: 13px; }
.ttca-switch-row small { color: var(--ttca-muted); font-size: 10px; line-height: 1.35; }
.ttca-switch-row input { position: absolute; opacity: 0; pointer-events: none; }
.ttca-switch-row i { position: relative; width: 48px; height: 29px; border-radius: 99px; background: #33445b; transition: .2s ease; }
.ttca-switch-row i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 23px; height: 23px; border-radius: 50%; background: white; box-shadow: 0 3px 10px rgba(0,0,0,.25); transition: .2s ease; }
.ttca-switch-row input:checked + i { background: var(--ttca-green); }
.ttca-switch-row input:checked + i::after { transform: translateX(19px); }

.ttca-fee-preview { display: flex; flex-direction: column; align-items: center; padding: 19px; margin-top: 14px; border-radius: 18px; background: linear-gradient(145deg, rgba(67,231,170,.12), rgba(69,207,255,.08)); }
.ttca-fee-preview span { color: var(--ttca-muted); font-size: 11px; }
.ttca-fee-preview strong { margin: 3px 0; color: var(--ttca-green); font-size: 32px; }
.ttca-fee-preview small { color: #bbc7d5; font-size: 10px; text-align: center; }
.ttca-sheet-note { margin: 16px 2px 0; color: var(--ttca-muted); font-size: 10.5px; line-height: 1.5; }

.ttca-install-steps { display: grid; gap: 10px; padding: 0; margin: 0; list-style: none; }
.ttca-install-steps li { display: grid; grid-template-columns: 38px 1fr; align-items: center; gap: 11px; padding: 12px; border: 1px solid var(--ttca-line); border-radius: 16px; background: rgba(255,255,255,.04); }
.ttca-install-steps b { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; color: #06121f; background: var(--ttca-green); }
.ttca-install-steps span { color: #c3cfdd; font-size: 12px; line-height: 1.4; }
.ttca-install-steps strong { color: var(--ttca-text); }

.ttca-toast {
  position: fixed;
  z-index: 999999;
  right: 18px;
  bottom: calc(22px + env(safe-area-inset-bottom));
  left: 18px;
  width: fit-content;
  max-width: calc(100% - 36px);
  margin: 0 auto;
  padding: 12px 16px;
  border: 1px solid var(--ttca-line);
  border-radius: 14px;
  opacity: 0;
  color: var(--ttca-text);
  background: #17283e;
  box-shadow: 0 15px 40px rgba(0,0,0,.35);
  font-size: 12px;
  font-weight: 700;
  transform: translateY(12px);
  transition: .2s ease;
}
.ttca-toast.is-visible { opacity: 1; transform: translateY(0); }

@media (min-width: 700px) {
  body:has(.ttca-app) { background: #030914; }
  .ttca-app { min-height: 100vh; }
  .ttca-shell { padding-right: 24px; padding-left: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  .ttca-app *, .ttca-app *::before, .ttca-app *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

html:has(.ttca-app),
body.ttca-standalone-page {
  min-height: 100%;
  margin: 0 !important;
  padding: 0 !important;
  background: var(--ttca-bg);
  overscroll-behavior-y: none;
}
body.ttca-standalone-page #wpadminbar { display: none !important; }
html:has(body.ttca-standalone-page) { margin-top: 0 !important; }
