/* ══════════════════════════════════════════════════════════
   [YOUR APP NAME] — redesigned on the CodeForge visual system
   ══════════════════════════════════════════════════════════ */
:root {
  --bg:        #0B0E14;
  --surface:   #12161F;
  --surface-2: #171C27;
  --border:    #262C3B;
  --text:      #E7E9EE;
  --muted:     #8890A4;
  --accent:    #3DD9C4;   /* teal — primary action / success */
  --accent-2:  #E8B339;   /* amber — eyebrow / highlight */
  --ok:        #35C48C;
  --red:       #ff7d7d;
  --display:   'Space Grotesk', sans-serif;
  --mono:      'IBM Plex Mono', monospace;
  --body:      'Inter', sans-serif;
  --radius:    10px;
  --r:         10px; /* alias kept for legacy selectors */
}

*, *::before, *::after { box-sizing: border-box; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

html, body { margin: 0; padding: 0; }

body {
  background:
    radial-gradient(1200px 500px at 15% -10%, rgba(61,217,196,.07), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: var(--body);
  min-height: 100vh;
  display: flex; flex-direction: column;
  font-size: 15px; -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
::selection { background: rgba(61,217,196,.3); }

/* ── Header / topbar ── */
header {
  padding: 20px 32px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
  background: rgba(11,14,20,0.86); backdrop-filter: blur(12px);
}
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo-box {
  width: 28px; height: 28px; border-radius: 7px;
  background: var(--surface); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; color: var(--accent); font-weight: 700;
}
.logo-name { font-family: var(--display); font-weight: 600; font-size: 19px; letter-spacing: -.01em; color: var(--text); }
.logo-name em { font-style: normal; color: var(--accent); }
.logo-dot  { color: var(--muted); font-style: normal; font-weight: 400; font-size: 15px; }
.badge {
  font-family: var(--mono); font-size: 11px; color: var(--muted);
  letter-spacing: .08em; text-transform: uppercase;
  border: 1px solid var(--border); padding: 4px 10px; border-radius: 20px;
}
@media (max-width: 640px) { .badge { display: none; } }

/* ── Main ── */
main { flex: 1; max-width: 720px; margin: 0 auto; width: 100%; padding: 0 24px 80px; }

/* ── Hero ── */
.hero { padding: 56px 0 20px; max-width: 640px; }
.hero-eyebrow {
  font-family: var(--mono); font-size: 11px; color: var(--accent-2);
  letter-spacing: .12em; text-transform: uppercase; margin: 0 0 16px;
}
.hero h1 {
  font-family: var(--display); font-size: clamp(32px, 5vw, 46px);
  line-height: 1.1; font-weight: 600; letter-spacing: -.015em; margin: 0 0 4px;
}
.hero h1 .y { color: var(--accent); }
.hero-sub { color: var(--muted); font-size: 16px; line-height: 1.7; margin: 18px 0 0; max-width: 560px; }
.hero-sub strong { color: var(--text); font-weight: 600; }

/* ── Stats bar ── */
.stats-bar {
  display: flex; flex-wrap: wrap; gap: 0; margin-top: 32px;
  padding: 18px 22px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius);
}
.stats-bar .stat { flex: 1; min-width: 88px; text-align: center; border-right: 1px solid var(--border); }
.stats-bar .stat:last-child { border-right: none; }
.stat-val { font-family: var(--mono); font-size: 18px; font-weight: 600; color: var(--accent); line-height: 1.2; }
.stat-lbl { font-family: var(--mono); font-size: 9.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin-top: 6px; }

/* ── Signature graphic: an original line flows in, translated line comes out ── */
.signature { padding: 26px 0 10px; display: flex; flex-direction: column; align-items: center; }
.flow { display: flex; align-items: center; justify-content: center; gap: 16px; flex-wrap: wrap; }
.sub-card {
  width: 190px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; padding: 14px; box-shadow: 0 12px 30px rgba(0,0,0,.35);
}
.sub-card.translated { border-color: rgba(61,217,196,.35); }
.sub-line { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.sub-line:last-child { margin-bottom: 0; }
.sub-time { font-family: var(--mono); font-size: 9.5px; color: var(--muted); flex-shrink: 0; }
.sub-text-bar { height: 6px; border-radius: 3px; background: var(--border); flex: 1; }
.sub-text-bar.accent { background: rgba(61,217,196,.45); }
.sub-line.hot .sub-text-bar { background: rgba(232,179,57,.45); }
.sub-line.hot .sub-text-bar.accent { background: var(--accent); }
.flow-arrow { color: var(--muted); flex-shrink: 0; }
.flow-arrow .dash { stroke-dasharray: 4 4; animation: dash 1.6s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -16; } }
.mint-tag {
  margin-top: 18px; font-family: var(--mono); font-size: 10.5px; color: var(--muted);
  white-space: nowrap; background: var(--bg); padding: 5px 14px;
  border: 1px solid var(--border); border-radius: 20px; animation: pulse 2.4s ease-in-out infinite;
}
.mint-tag strong { color: var(--accent); }
@keyframes pulse { 0%,100% { opacity: .6; } 50% { opacity: 1; } }

/* ── Card (tool) ── */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; margin: 28px 0 16px;
}
.card-head {
  padding: 12px 18px; border-bottom: 1px solid var(--border);
  font-family: var(--mono); font-size: 11px; color: var(--muted);
  letter-spacing: .08em; text-transform: uppercase;
  display: flex; align-items: center; gap: 8px;
}
.card-head-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; border-radius: 50%;
  background: rgba(61,217,196,.12); color: var(--accent);
  font-size: 10.5px; font-weight: 700;
}

/* ── Upload zone (dropzone) ── */
.upload-zone {
  position: relative; margin: 18px; padding: 30px 20px; text-align: center;
  cursor: pointer; transition: border-color .15s ease, background .15s ease;
  min-height: 120px; display: flex; align-items: center; justify-content: center;
  border: 1.5px dashed var(--border); border-radius: var(--radius);
  background: var(--surface-2);
}
.upload-zone:hover, .upload-zone.drag { border-color: var(--accent); background: rgba(61,217,196,.04); }
.upload-zone input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; z-index: 2; }
#upload-placeholder { display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.upload-icon  { font-size: 22px; color: var(--muted); }
.upload-title { font-weight: 600; font-size: 14.5px; }
.upload-meta  { font-family: var(--mono); font-size: 11.5px; color: var(--muted); margin-top: 2px; }

#file-state { pointer-events: none; width: 100%; }
.thumb-info { text-align: center; }
.thumb-filename { font-family: var(--mono); font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 6px; word-break: break-all; }
.thumb-meta { font-family: var(--mono); font-size: 11px; color: var(--muted); margin-bottom: 4px; }
.thumb-hint { font-family: var(--mono); font-size: 11px; color: var(--muted); letter-spacing: .04em; }

/* ── Settings / controls ── */
.settings-grid { display: grid; gap: 1px; background: var(--border); margin: 0 18px 18px; border-radius: 8px; overflow: hidden; border: 1px solid var(--border); }
.ctrl { background: var(--surface); padding: 12px 14px 14px; }
.ctrl label {
  display: flex; justify-content: space-between; font-family: var(--mono); font-size: 11.5px;
  color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 8px;
}
.ctrl select {
  width: 100%; background: var(--bg); border: 1px solid var(--border);
  color: var(--text); padding: 10px 12px; border-radius: 7px;
  font-family: var(--body); font-size: 14px; appearance: none; cursor: pointer;
  outline: none; transition: border-color .15s;
}
.ctrl select:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }

/* ── Freemium: tier chip, license key row ── */
.tier-chip {
  font-family: var(--mono); font-size: 10px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .04em;
  padding: 3px 10px; border-radius: 20px; margin-left: auto;
}
.tier-chip.tier-free    { color: var(--muted); border: 1px solid var(--border); background: transparent; }
.tier-chip.tier-premium { color: var(--accent); border: 1px solid rgba(61,217,196,.35); background: rgba(61,217,196,.08); }
.license-row { display: flex; gap: 10px; padding: 14px 18px 0; }
.license-row input[type="text"] {
  flex: 1; background: var(--bg); border: 1px solid var(--border);
  border-radius: 7px; color: var(--text); padding: 10px 12px;
  font-family: var(--mono); font-size: 12.5px; outline: none;
}
.license-row input[type="text"]:focus { border-color: var(--accent); }
.btn-outline {
  background: transparent; border: 1px solid var(--border); color: var(--text);
  padding: 10px 18px; border-radius: 7px; font-family: var(--body);
  font-size: 13px; font-weight: 600; cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.btn-outline:hover { border-color: var(--accent); background: rgba(61,217,196,.06); }
.btn-outline:disabled { opacity: .5; cursor: not-allowed; }
.license-status { font-family: var(--mono); font-size: 11.5px; color: var(--muted); padding: 8px 18px 0; min-height: 14px; }
.license-status.ok  { color: var(--ok); }
.license-status.err { color: var(--red); }

/* ── Submit button ── */
.btn-submit {
  width: 100%; padding: 14px; background: var(--accent); color: #04211c;
  border: none; border-radius: 8px; font-family: var(--body);
  font-size: 14px; font-weight: 600; letter-spacing: .02em;
  cursor: pointer; transition: transform .12s ease, background .15s ease;
}
.btn-submit:hover { background: #63e6d5; }
.btn-submit:active { transform: translateY(1px); }
.btn-submit:disabled { background: var(--surface-2); color: var(--muted); cursor: not-allowed; }
.btn-submit:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }

/* ── Progress ── */
.progress-content { padding: 4px 0 2px; }
.progress-bar-wrap { margin-bottom: 10px; }
.progress-bar-track { height: 4px; background: var(--border); border-radius: 2px; overflow: hidden; }
.progress-bar-fill {
  height: 100%; width: 2%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--accent));
  background-size: 200%; border-radius: 2px; animation: shimmer 2s linear infinite;
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.progress-label { font-family: var(--mono); font-size: 12px; color: var(--muted); text-align: center; }
.progress-timer { font-family: var(--mono); font-size: 11px; color: var(--accent-2); text-align: center; margin-top: 4px; min-height: 16px; }

/* ── Status messages (error / success) ── */
.msg-error {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 16px; margin-top: 4px;
  background: rgba(255,90,90,.06); border: 1px solid rgba(255,90,90,.35);
  border-radius: var(--radius); font-family: var(--mono); font-size: 12.5px; color: var(--red);
}

.msg-success-multi {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; margin-top: 4px;
}
.multi-head { display: flex; align-items: center; gap: 14px; padding: 18px; border-bottom: 1px solid var(--border); }
.multi-num {
  width: 40px; height: 40px; flex-shrink: 0; border-radius: 50%;
  background: var(--accent); color: #04211c; font-family: var(--display);
  font-size: 19px; font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.multi-meta p { font-size: 14px; color: var(--text); margin: 0 0 8px; }
.multi-meta strong { color: var(--accent); }
.success-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.success-tags span {
  font-family: var(--mono); font-size: 11px; color: var(--muted);
  padding: 3px 10px; border: 1px solid var(--border); border-radius: 20px;
}

.part-list { padding: 4px 0; }
.part-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; }
.part-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.part-name { font-family: var(--mono); font-size: 13px; font-weight: 600; color: var(--text); }
.part-meta { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.part-dl {
  flex-shrink: 0; font-family: var(--body); font-size: 13px; font-weight: 600;
  text-decoration: none; color: #04211c; background: var(--accent);
  padding: 10px 20px; border-radius: 8px; transition: background .15s ease, transform .12s ease;
}
.part-dl:hover { background: #63e6d5; }
.part-dl:active { transform: translateY(1px); }

/* ── Features strip ── */
.features-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 48px 0; }
.feature { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 20px; }
.feature-icon { font-size: 26px; margin-bottom: 14px; }
.feature-title { font-family: var(--display); font-size: 16px; font-weight: 600; color: var(--text); margin-bottom: 8px; }
.feature-desc { font-size: 13.5px; color: var(--muted); line-height: 1.65; }
.feature-desc strong { color: var(--text); font-weight: 600; }

/* ── Section title ── */
.section-title {
  font-family: var(--display); font-size: 24px; font-weight: 600;
  color: var(--text); text-align: center; margin-bottom: 30px;
}

/* ── How it works ── */
.how-section { margin: 56px 0; padding-top: 30px; border-top: 1px solid var(--border); }
.how-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.how-step { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.how-step-num { display: block; font-family: var(--mono); font-size: 11px; color: var(--accent-2); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 12px; }
.how-step-title { font-family: var(--display); font-weight: 600; font-size: 15px; color: var(--text); margin-bottom: 8px; }
.how-step-desc { font-size: 13.5px; color: var(--muted); line-height: 1.65; }
.how-step-desc strong { color: var(--text); }

/* ── FAQ ── */
.faq-section { margin: 56px 0; }
.faq-list { max-width: 720px; margin: 0 auto; }
.faq-item { border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 10px; overflow: hidden; background: var(--surface); }
.faq-q {
  padding: 16px 20px; font-size: 14.5px; font-weight: 600; color: var(--text);
  cursor: pointer; display: flex; justify-content: space-between; align-items: center; user-select: none;
}
.faq-chevron { color: var(--accent-2); font-size: 11px; transition: transform .25s; }
.faq-item.open .faq-chevron { transform: rotate(180deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.faq-item.open .faq-a { max-height: 240px; }
.faq-a-inner { padding: 0 20px 16px; font-size: 13.5px; color: var(--muted); line-height: 1.65; }
.faq-a-inner strong { color: var(--text); }

/* ── Footer ── */
footer {
  border-top: 1px solid var(--border); padding: 22px 32px;
  display: flex; justify-content: space-between;
  font-family: var(--mono); font-size: 11.5px; color: var(--muted);
}
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--accent); }

/* ── Responsive ── */
@media (max-width: 760px) {
  .features-strip { grid-template-columns: 1fr; }
  .how-steps { grid-template-columns: 1fr; }
}
@media (max-width: 580px) {
  header { padding: 16px; }
  main { padding: 0 14px 60px; }
  .stats-bar .stat { border-right: none; min-width: 70px; }
}
