@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Space+Grotesk:wght@500;600;700&display=swap");

:root {
  color-scheme: dark;
  --bg: #090e1b;
  --panel: rgba(17, 25, 44, .88);
  --panel-soft: #121d32;
  --border: rgba(157, 177, 220, .16);
  --border-strong: rgba(157, 177, 220, .27);
  --text: #f2f5ff;
  --muted: #98a6c1;
  --muted-light: #c2cce0;
  --blue: #7c8cff;
  --blue-bright: #9ca8ff;
  --cyan: #66e3df;
  --green: #55dfb0;
  font-family: "DM Sans", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}
* { box-sizing: border-box; }
body {
  margin: 0; min-height: 100vh; overflow-x: hidden;
  background: radial-gradient(ellipse at 50% -15%, #202d55 0, #0c1325 43%, var(--bg) 76%);
}
button, input, select, textarea { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible {
  outline: 2px solid var(--cyan); outline-offset: 3px;
}
.ambient { position: fixed; z-index: -1; pointer-events: none; border-radius: 50%; filter: blur(85px); opacity: .12; }
.ambient-one { width: 300px; height: 300px; background: #6675ff; top: 30%; left: -190px; }
.ambient-two { width: 260px; height: 260px; background: #25c6c2; right: -180px; top: 58%; }
.app-shell { width: min(100% - 40px, 1000px); margin: 0 auto; }
.topbar { height: 82px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(157,177,220,.1); }
.brand { display: inline-flex; gap: 11px; align-items: center; text-decoration: none; color: var(--text); font: 700 19px "Space Grotesk", sans-serif; letter-spacing: -.7px; }
.brand-light { color: #9aa8c7; font-weight: 500; }
.brand-mark { display: grid; place-items: center; width: 35px; height: 35px; border: 1px solid rgba(143,159,255,.38); background: linear-gradient(145deg,rgba(125,139,255,.2),rgba(73,205,207,.08)); border-radius: 11px; color: var(--blue-bright); }
.brand-mark svg { width: 20px; height: 20px; }
.topbar-status { display: flex; align-items: center; gap: 9px; color: #9ba9c5; font-size: 12px; letter-spacing: .2px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 12px #55dfb055; }
.hero { display: flex; align-items: center; justify-content: space-between; min-height: 300px; padding: 42px 26px 35px; }
.hero-copy { max-width: 620px; }
.eyebrow { display: flex; align-items: center; gap: 10px; color: #9eaaff; font-size: 10px; font-weight: 700; letter-spacing: 2.2px; margin: 0 0 17px; }
.eyebrow-line { width: 24px; height: 1px; background: var(--cyan); }
h1, h2, h3, p { margin-top: 0; }
h1, h2 { font: 700 clamp(36px, 5.6vw, 58px)/1.06 "Space Grotesk", sans-serif; letter-spacing: -2.3px; margin-bottom: 17px; }
h1, h2 { font: 700 clamp(28px, 4.2vw, 42px)/1.06 "Space Grotesk", sans-serif; letter-spacing: -1.7px; margin-bottom: 17px; }
h2 span { color: #9ba7ff; }
.hero-description { max-width: 555px; color: var(--muted); line-height: 1.8; font-size: 14px; margin: 0; }
.hero-orbit { flex: 0 0 190px; height: 190px; position: relative; display: grid; place-items: center; margin-left: 20px; }
.orbit { position: absolute; border: 1px solid rgba(144,160,255,.22); border-radius: 50%; }
.orbit-a { width: 170px; height: 170px; transform: rotate(-25deg) scaleY(.7); }
.orbit-b { width: 135px; height: 135px; transform: rotate(42deg) scaleY(.75); border-color: rgba(89,218,216,.24); }
.orbit-core { width: 78px; height: 78px; border-radius: 25px; display: grid; place-items: center; color: #c2caff; background: linear-gradient(145deg,#27376a,#152b3d); border: 1px solid rgba(151,166,255,.4); box-shadow: 0 0 48px #7786ff24; }
.orbit-core svg { width: 45px; height: 45px; }
.orbit-chip { position: absolute; display: grid; place-items: center; width: 31px; height: 31px; border: 1px solid var(--border-strong); border-radius: 10px; background: #141f35; color: #b7c3ff; font-size: 12px; font-weight: 700; }
.chip-a { top: 17px; left: 27px; }.chip-b { right: 14px; top: 62px; color: var(--cyan); }.chip-c { bottom: 13px; left: 67px; }
.workflow-label { display: flex; align-items: center; gap: 11px; margin: 0 0 13px 4px; color: #9ba8c4; font-size: 10px; font-weight: 700; letter-spacing: 1.7px; }
.workflow-label > span { color: var(--cyan); font: 600 12px "Space Grotesk", sans-serif; }
.panel { background: linear-gradient(145deg,rgba(20,30,51,.96),rgba(13,21,38,.96)); border: 1px solid var(--border); border-radius: 21px; box-shadow: 0 22px 70px rgba(0,0,0,.15); }
.workspace { padding: 30px; }
.section-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.section-heading h2 { font: 600 21px "Space Grotesk", sans-serif; letter-spacing: -.5px; margin: 0 0 7px; }
.section-heading p { color: var(--muted); font-size: 12px; line-height: 1.65; margin: 0; }
.step-pill, .success-pill { flex-shrink: 0; border: 1px solid rgba(142,158,255,.22); background: rgba(119,135,255,.08); color: #b2bcff; border-radius: 7px; padding: 7px 9px; font-size: 9px; font-weight: 700; letter-spacing: 1px; }
.source-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 5px; margin: 25px 0 20px; background: rgba(5,10,21,.5); border: 1px solid rgba(157,177,220,.1); border-radius: 12px; }
.source-tab { min-height: 43px; display: flex; justify-content: center; align-items: center; gap: 9px; padding: 10px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: #9eacc7; font-size: 12px; font-weight: 600; cursor: pointer; transition: .2s ease; }
.source-tab svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.source-tab:hover { color: var(--text); }
.source-tab.active { color: #e6eaff; border-color: rgba(138,151,255,.24); background: linear-gradient(120deg,rgba(119,135,255,.17),rgba(76,205,206,.07)); box-shadow: 0 4px 18px rgba(0,0,0,.12); }
.source-pane[hidden] { display: none !important; }
.recorder-card { padding: 18px 20px 19px; border: 1px solid rgba(139,157,209,.15); border-radius: 15px; background: linear-gradient(120deg,rgba(8,15,29,.62),rgba(15,25,44,.72)); }
.recorder-topline { display: flex; align-items: center; justify-content: space-between; }
.live-label { display: flex; align-items: center; gap: 8px; color: #9ba9c5; font-size: 9px; font-weight: 700; letter-spacing: 1.4px; }
.record-indicator { width: 7px; height: 7px; border-radius: 50%; background: #65738e; }
.record-indicator.recording { background: #ff627c; box-shadow: 0 0 0 4px #ff627c20; animation: pulse 1.2s infinite; }
.record-indicator.ready { background: var(--green); }
.timer { color: #e9edff; font: 600 16px "Space Grotesk", monospace; font-variant-numeric: tabular-nums; letter-spacing: .5px; }
.waveform { display: block; width: 100%; height: 92px; margin: 12px 0 4px; }
.recorder-hint { text-align: center; color: #8998b5; font-size: 11px; margin: 0 0 17px; }
.record-controls { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 9px; }
.button { border: 1px solid transparent; border-radius: 9px; min-height: 42px; padding: 11px 17px; display: inline-flex; justify-content: center; align-items: center; gap: 9px; font-size: 12px; font-weight: 700; cursor: pointer; transition: transform .18s ease, border-color .18s ease, background .18s ease; }
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button:disabled { opacity: .38; cursor: not-allowed; }
.button-primary { color: #fff; background: linear-gradient(110deg,#6578f6,#7b7cf8); box-shadow: 0 7px 20px rgba(93,110,244,.2); }
.button-primary:hover:not(:disabled) { background: linear-gradient(110deg,#7a8aff,#8c8aff); }
.button-secondary { color: #d5dcef; background: rgba(129,146,183,.09); border-color: rgba(145,163,205,.2); }
.button-secondary:hover:not(:disabled) { background: rgba(129,146,183,.16); }
.button-quiet { color: #b8c4dc; background: transparent; border-color: rgba(145,163,205,.16); }
.record-button-icon { display: grid; place-items: center; width: 15px; height: 15px; border-radius: 50%; background: #fff; }
.record-button-icon span { width: 5px; height: 5px; border-radius: 50%; background: #6578f6; }
.stop-square { width: 9px; height: 9px; background: #ff7185; border-radius: 2px; }
.audio-preview { display: flex; align-items: flex-start; gap: 12px; padding: 15px; margin-top: 13px; border: 1px solid rgba(84,222,176,.2); border-radius: 12px; background: rgba(55,177,135,.045); }
.audio-preview[hidden] { display: none !important; }
.preview-icon { flex: 0 0 36px; width: 36px; height: 36px; display: grid; place-items: center; color: var(--green); background: rgba(85,223,176,.1); border-radius: 10px; }
.preview-icon svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.preview-content { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.preview-content strong { font-size: 12px; font-weight: 600; overflow-wrap: anywhere; }
.preview-content > span { color: var(--muted); font-size: 10px; }
.preview-content audio { width: 100%; height: 35px; margin-top: 6px; }
.ready-tag { align-self: flex-start; color: var(--green); font-size: 9px; font-weight: 700; letter-spacing: 1px; padding-top: 4px; }
.icon-button { flex: 0 0 28px; width: 28px; height: 28px; border: 1px solid var(--border); border-radius: 7px; background: transparent; color: #aab8d1; font-size: 20px; cursor: pointer; }
.dropzone { display: flex; min-height: 190px; padding: 28px 16px; flex-direction: column; justify-content: center; align-items: center; border: 1px dashed rgba(144,161,214,.38); border-radius: 15px; background: rgba(9,16,30,.38); text-align: center; cursor: pointer; transition: .2s ease; }
.dropzone:hover, .dropzone:focus-within { border-color: var(--blue); background: rgba(119,135,255,.06); }
.upload-icon { width: 42px; height: 42px; display: grid; place-items: center; margin-bottom: 12px; border-radius: 13px; background: rgba(125,140,255,.12); color: #aeb8ff; }
.upload-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.dropzone strong { font-size: 13px; margin-bottom: 5px; }
.dropzone > span:not(.upload-icon) { color: var(--muted); font-size: 11px; }
.dropzone small { color: #7888a7; font-size: 9px; margin-top: 13px; line-height: 1.6; }
.dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.form-divider { height: 1px; margin: 26px 0 24px; background: rgba(157,177,220,.12); }
.compact-heading h2 { font-size: 18px; }
.languages { display: grid; grid-template-columns: minmax(0,1fr) 38px minmax(0,1fr); gap: 13px; align-items: end; margin-top: 20px; }
.field-group { min-width: 0; }
.field-group label { display: block; color: #c7d0e4; font-size: 11px; font-weight: 600; margin: 0 0 9px; }
.required { color: #8997ff; }
select { appearance: none; width: 100%; min-height: 45px; padding: 0 36px 0 13px; color: #e4e9f7; border: 1px solid rgba(146,164,207,.2); border-radius: 9px; outline: none; background-color: rgba(7,13,25,.62); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239aa9c8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 13px center; font-size: 12px; }
select:focus { border-color: rgba(130,146,255,.75); }
select option { background: #121d32; color: #edf2ff; }
.swap-button { display: grid; place-items: center; width: 38px; height: 38px; margin-bottom: 3px; border: 1px solid rgba(141,158,211,.2); border-radius: 10px; color: #aab6ff; background: rgba(124,140,255,.08); cursor: pointer; transition: .2s ease; }
.swap-button:hover { background: rgba(124,140,255,.17); transform: rotate(180deg); }
.swap-button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.bottom-settings { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-top: 22px; }
.format-field { width: min(100%, 260px); }
.checkbox { display: flex; align-items: center; gap: 9px; color: #aab7d0; font-size: 11px; line-height: 1.5; cursor: pointer; padding-bottom: 13px; }
.checkbox input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.custom-check { flex: 0 0 16px; width: 16px; height: 16px; border: 1px solid rgba(145,163,205,.4); border-radius: 4px; background: rgba(7,13,25,.5); }
.checkbox input:checked + .custom-check { background: #7b88ff; border-color: #7b88ff; box-shadow: inset 0 0 0 3px #18223a; }
.checkbox input:focus-visible + .custom-check { outline: 2px solid var(--cyan); outline-offset: 3px; }
.button-submit { width: 100%; min-height: 53px; margin-top: 27px; padding: 14px 18px; color: white; background: linear-gradient(105deg,#687bf8,#7a79f5 55%,#5b9fe9); box-shadow: 0 10px 26px rgba(92,111,243,.17); font-size: 13px; }
.button-submit:hover:not(:disabled) { background: linear-gradient(105deg,#788aff,#8b89ff 55%,#70b0f5); }
.translate-button-icon { display: grid; place-items: center; }
.translate-button-icon svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.button-arrow { margin-left: auto; font-size: 20px; font-weight: 400; }
.privacy-note { display: flex; align-items: center; justify-content: center; gap: 7px; color: #7383a2; font-size: 10px; margin: 13px 0 0; text-align: center; }
.privacy-note svg { width: 13px; height: 13px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.status-message { min-height: 18px; margin: 13px 0 0; color: #9eacc7; font-size: 12px; line-height: 1.6; text-align: center; }
.status-message[data-state="error"] { color: #ff9ba9; }
.status-message[data-state="success"] { color: var(--green); }
.status-message[data-state="busy"] { color: #bac3ff; }
.results-label { margin-top: 29px; }
.results-panel { padding: 28px; margin-bottom: 25px; }
.success-pill { display: flex; align-items: center; gap: 6px; color: var(--green); border-color: rgba(85,223,176,.2); background: rgba(85,223,176,.06); }
.success-pill span { font-size: 13px; }
.result-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; margin-top: 23px; }
.text-result-card { min-width: 0; padding: 15px; border: 1px solid rgba(145,163,205,.16); border-radius: 12px; background: rgba(7,13,25,.36); }
.translated-card { border-color: rgba(124,140,255,.23); }
.result-card-heading { display: flex; align-items: center; gap: 8px; margin-bottom: 11px; }
.result-card-heading label { color: #d0d8e9; font-size: 11px; font-weight: 600; margin: 0; }
.result-language-dot { width: 7px; height: 7px; border-radius: 50%; }
.source-dot { background: var(--cyan); }.target-dot { background: var(--blue-bright); }
.text-action { margin-left: auto; border: 0; background: transparent; color: #aab5ff; font-size: 10px; cursor: pointer; padding: 4px 2px; }
.text-action:hover { color: #fff; }
textarea { display: block; width: 100%; min-height: 125px; resize: vertical; padding: 12px; border: 1px solid rgba(145,163,205,.13); border-radius: 8px; outline: none; background: rgba(5,10,20,.4); color: #dbe3f4; font-size: 12px; line-height: 1.75; }
.generated-audio { margin-top: 15px; padding: 18px; border: 1px solid rgba(85,223,176,.17); border-radius: 12px; background: rgba(49,158,128,.045); }
.generated-audio-heading { display: flex; align-items: center; gap: 11px; margin-bottom: 12px; }
.generated-audio-icon { display: grid; place-items: center; width: 37px; height: 37px; border-radius: 11px; background: rgba(85,223,176,.1); color: var(--green); font-size: 20px; }
.generated-audio-heading h3 { font-size: 13px; margin: 0 0 4px; }
.generated-audio-heading p { color: var(--muted); font-size: 10px; margin: 0; }
#audio-result audio { width: 100%; display: block; margin: 12px 0; }
.download { display: inline-flex; align-items: center; gap: 7px; padding: 10px 13px; border: 1px solid rgba(85,223,176,.25); border-radius: 8px; color: #8de7c5; background: rgba(85,223,176,.07); font-size: 11px; font-weight: 600; text-decoration: none; }
.download:hover { background: rgba(85,223,176,.13); }
footer { display: flex; justify-content: space-between; gap: 16px; padding: 23px 3px 28px; color: #71809e; font-size: 10px; }
.footer-brand { color: #9ca9c5; font: 700 12px "Space Grotesk", sans-serif; }.footer-brand span { color: #71809e; font-weight: 500; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 3px #ff627c20; } 50% { box-shadow: 0 0 0 7px #ff627c08; } }
@media (max-width: 720px) {
  .app-shell { width: min(100% - 28px, 600px); }
  .topbar { height: 68px; }
  .hero { min-height: 0; padding: 44px 3px 34px; }
  .hero-orbit { flex-basis: 125px; height: 125px; margin-left: 8px; transform: scale(.78); transform-origin: center right; }
  h1 { font-size: clamp(34px, 7vw, 47px); letter-spacing: -1.6px; }
  .hero-description { font-size: 12px; }
  .workspace, .results-panel { padding: 22px; }
  .section-heading h2 { font-size: 19px; }
}
@media (max-width: 540px) {
  .app-shell { width: calc(100% - 24px); }
  .topbar-status { font-size: 10px; }
  .hero { padding-top: 35px; }
  .hero-orbit { display: none; }
  .hero-copy { max-width: 100%; }
  .eyebrow { font-size: 9px; letter-spacing: 1.6px; }
  h1 { font-size: clamp(37px, 10vw, 49px); }
  .hero-description { font-size: 12px; }
  .workspace, .results-panel { padding: 17px; border-radius: 16px; }
  .section-heading { gap: 8px; }
  .section-heading h2 { font-size: 17px; }
  .section-heading p { font-size: 11px; }
  .step-pill { font-size: 8px; padding: 6px; }
  .source-tabs { grid-template-columns: 1fr; gap: 4px; margin-top: 20px; }
  .source-tab { justify-content: flex-start; padding-left: 14px; }
  .recorder-card { padding: 14px 12px; }
  .recorder-hint { font-size: 10px; line-height: 1.6; }
  .record-controls { gap: 7px; }
  .button { padding: 10px 12px; font-size: 11px; }
  .languages { grid-template-columns: minmax(0,1fr) 34px minmax(0,1fr); gap: 7px; }
  .swap-button { width: 34px; height: 36px; }
  .field-group label { font-size: 10px; }
  select { padding-left: 9px; padding-right: 25px; background-position: right 8px center; font-size: 11px; }
  .bottom-settings { align-items: stretch; flex-direction: column; gap: 15px; }
  .format-field { width: 100%; }
  .checkbox { padding-bottom: 0; }
  .result-grid { grid-template-columns: 1fr; }
  .results-panel .section-heading { align-items: flex-start; }
  .success-pill { font-size: 8px; padding: 6px; }
  footer { flex-direction: column; align-items: center; text-align: center; gap: 7px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}



/* =========================================
   Voice Translator — Readability Upgrade
   ========================================= */

/* =========================================
   VOICE TRANSLATOR — VISUAL REFINEMENT
   Append this block at the end of style.css
========================================= */

:root {
  --bg: #18243a;
  --panel: #243550;
  --panel-soft: #2b405e;

  --border: rgba(190, 210, 245, 0.24);
  --border-strong: rgba(190, 210, 245, 0.38);

  --text: #f7f9ff;
  --muted: #c0cce0;
  --muted-light: #dce5f5;

  --blue: #9baaff;
  --blue-bright: #bec7ff;
  --cyan: #83eee8;
  --green: #7be9c1;

  font-size: 17px;
}

/* 1. Main background */
html {
  background: #18243a !important;
  font-size: 17px;
}

body {
  background:
    radial-gradient(
      ellipse at 50% 0%,
      #3b5278 0%,
      #263956 38%,
      #1b2941 72%,
      #18243a 100%
    ) !important;
  color: var(--text);
  font-size: 17px;
  line-height: 1.75;
}

/* 2. Main layout */
.app-shell {
  width: min(100% - 36px, 1100px);
}

/* 3. Header and separators */
.topbar {
  border-bottom: 1px solid rgba(190, 210, 245, 0.25) !important;
}

.brand {
  font-size: 23px !important;
}

.topbar-status {
  color: #d0dbef !important;
  font-size: 14px !important;
}

hr,
.divider,
.separator {
  border-color: rgba(190, 210, 245, 0.25) !important;
}

/* 4. Main heading and descriptions */
.eyebrow {
  font-size: 13px !important;
  letter-spacing: 2px;
}

.hero-description {
  color: #c9d5e9 !important;
  font-size: 17px !important;
  line-height: 1.9;
}

/* 5. Cards and panels */
.panel,
.workspace,
.results-panel {
  background:
    linear-gradient(
      145deg,
      rgba(43, 62, 92, 0.98),
      rgba(31, 47, 72, 0.98)
    ) !important;

  border: 1px solid rgba(190, 210, 245, 0.25) !important;

  box-shadow:
    0 18px 50px rgba(5, 12, 25, 0.20),
    inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.workspace {
  padding: 36px !important;
}

.results-panel {
  padding: 34px !important;
}

/* 6. Section headings */
.section-heading h2 {
  color: #f7f9ff !important;
  font-size: 25px !important;
}

.section-heading p {
  color: #c2cee2 !important;
  font-size: 15px !important;
  line-height: 1.85;
}

.workflow-label {
  font-size: 13px !important;
}

/* 7. Tabs and selectable options */
.source-tab {
  min-height: 52px;
  font-size: 15px !important;
  border-color: rgba(190, 210, 245, 0.25) !important;
}

.source-tab:hover {
  border-color: #a9b7ff !important;
  background-color: rgba(147, 165, 255, 0.10) !important;
}

.step-pill,
.success-pill {
  font-size: 12px !important;
}

.live-label {
  font-size: 12px !important;
}

.timer {
  font-size: 20px !important;
}

/* 8. Waveform and audio areas */
.waveform {
  height: 110px;
}

.recorder-hint {
  color: #c1cee3 !important;
  font-size: 14px !important;
  line-height: 1.8;
}

.preview-content strong {
  font-size: 15px !important;
}

.preview-content > span {
  color: #c0cde2 !important;
  font-size: 13px !important;
  line-height: 1.75;
}

/* 9. Buttons */
.button {
  min-height: 49px;
  padding: 13px 20px;
  font-size: 15px !important;
}

.button-submit {
  min-height: 58px;
  font-size: 16px !important;
}

/* 10. Upload area */
.dropzone {
  background: rgba(137, 160, 205, 0.075) !important;
  border-color: rgba(190, 210, 245, 0.36) !important;
}

.dropzone:hover {
  background: rgba(137, 160, 205, 0.13) !important;
  border-color: #a9b7ff !important;
}

.dropzone strong {
  color: #f7f9ff !important;
  font-size: 16px !important;
}

.dropzone > span:not(.upload-icon) {
  color: #c6d3e8 !important;
  font-size: 14px !important;
  line-height: 1.8;
}

.dropzone small {
  color: #b4c4dd !important;
  font-size: 12px !important;
}

/* 11. Form labels and controls */
.field-group label {
  color: #e0e8f7 !important;
  font-size: 14px !important;
}

select,
textarea {
  color: #f5f8ff !important;
  background-color: #1c2b43 !important;
  border-color: rgba(190, 210, 245, 0.28) !important;
  font-size: 15px !important;
}

select {
  min-height: 52px;
}

textarea {
  font-family: "DM Sans", system-ui, sans-serif;
  line-height: 1.9;
}
select:focus,
textarea:focus {
  border-color: #a9b7ff !important;
  box-shadow: 0 0 0 3px rgba(155, 170, 255, 0.17) !important;
  outline: none;
}

.checkbox {
  color: #d1dcef !important;
  font-size: 14px !important;
}

.privacy-note {
  color: #b9c8df !important;
  font-size: 13px !important;
  line-height: 1.8;
}

/* 12. Status messages */
.status-message {
  font-size: 15px !important;
  line-height: 1.85;
}

/* 13. Translation results */
.result-card-heading label {
  color: #e1e9f8 !important;
  font-size: 14px !important;
}

.text-action {
  font-size: 13px !important;
}

.generated-audio-heading h3 {
  font-size: 16px !important;
}

.generated-audio-heading p {
  color: #bfcee3 !important;
  font-size: 13px !important;
  line-height: 1.8;
}

.download {
  font-size: 14px !important;
}

/* 14. Borders inside result and audio cards */
.result-card,
.preview-card,
.generated-audio,
.audio-preview {
  border-color: rgba(190, 210, 245, 0.25) !important;
}

/* 15. Footer and placeholders */
footer {
  color: #bac8df !important;
  font-size: 13px !important;
}

input::placeholder,
textarea::placeholder {
  color: #aabbd5 !important;
  opacity: 1;
}

/* 16. Tablet and mobile */
@media (max-width: 720px) {
  .app-shell {
    width: calc(100% - 28px);
  }

  .hero-description {
    font-size: 15px !important;
  }

  .workspace,
  .results-panel {
    padding: 25px !important;
  }

  .section-heading h2 {
    font-size: 23px !important;
  }

  .section-heading p {
    font-size: 14px !important;
  }
}

@media (max-width: 540px) {
  html,
  body {
    font-size: 16px;
  }

  .app-shell {
    width: calc(100% - 22px);
  }

  .brand {
    font-size: 20px !important;
  }

  .topbar-status {
    font-size: 12px !important;
  }

  .hero-description {
    font-size: 15px !important;
    line-height: 1.85;
  }

  .workspace,
  .results-panel {
    padding: 19px !important;
  }

  .section-heading h2 {
    font-size: 21px !important;
  }

  .source-tab {
    font-size: 14px !important;
  }

  .button {
    font-size: 14px !important;
    padding: 12px 14px;
  }

  .field-group label {
    font-size: 13px !important;
  }

  select {
    font-size: 14px !important;
  }

  textarea {
    font-size: 14px !important;
  }

  footer {
    font-size: 12px !important;
  }
}
/* Final visual refinement: stronger depth, a subtle technical grid, and roomier sizing. */
body {
  background:
    radial-gradient(ellipse at 12% 18%, rgba(68, 89, 185, .18), transparent 34%),
    radial-gradient(ellipse at 88% 48%, rgba(23, 161, 170, .10), transparent 32%),
    radial-gradient(ellipse at 50% -15%, #202d55 0, #0c1325 43%, var(--bg) 76%);
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .16;
  background-image:
    linear-gradient(rgba(137, 157, 214, .12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(137, 157, 214, .12) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, black, transparent 82%);
}
.app-shell { width: min(100% - 36px, 1060px); }
.hero h1 { letter-spacing: -.035em; }
.panel { box-shadow: 0 22px 70px rgba(0, 0, 0, .18), inset 0 1px rgba(255, 255, 255, .025); }
@media (min-width: 900px) {
  .hero h1 { font-size: clamp(42px, 4.8vw, 56px); }
  .hero-description { font-size: 16px; }
  .workspace { padding: 30px; }
}
@media (max-width: 540px) {
  .app-shell { width: min(100% - 24px, 1060px); }
  body::before { background-size: 32px 32px; opacity: .11; }
}
body::before { z-index: 0; }
.app-shell { position: relative; z-index: 1; }


/* Final visual refinement: make the ambient galaxy and orbit lines more visible. */
.ambient-one { width: 360px; height: 360px; opacity: .34; filter: blur(76px); }
.ambient-two { width: 320px; height: 320px; opacity: .30; filter: blur(72px); }
.orbit-a { width: 184px; height: 184px; border-color: rgba(144,160,255,.34); border-width: 1.5px; }
.orbit-b { width: 148px; height: 148px; border-color: rgba(89,218,216,.34); border-width: 1.5px; }
.hero-orbit::before, .hero-orbit::after { content: ""; position: absolute; width: 205px; height: 1px; background: linear-gradient(90deg, transparent, rgba(113,190,255,.26), transparent); transform: rotate(-34deg); pointer-events: none; }
.hero-orbit::after { transform: rotate(34deg); background: linear-gradient(90deg, transparent, rgba(109,224,219,.23), transparent); }


/* Anonymous usage quota */
.quota-card { display:flex; align-items:center; justify-content:space-between; gap:18px; margin:0 0 28px; padding:20px 22px; border:1px solid rgba(102,227,223,.19); border-radius:16px; background:linear-gradient(115deg,rgba(24,42,61,.86),rgba(17,26,45,.92)); }
.quota-card-main { flex:1; min-width:0; }
.quota-heading { display:flex; align-items:center; gap:11px; margin-bottom:13px; }
.quota-icon { display:grid; place-items:center; flex:0 0 36px; width:36px; height:36px; border-radius:11px; color:var(--cyan); background:rgba(102,227,223,.09); border:1px solid rgba(102,227,223,.18); font-size:23px; }
.quota-heading h2 { margin:0 0 3px; font:600 15px "Space Grotesk",sans-serif; }
.quota-heading p,.quota-reset { margin:0; color:var(--muted); font-size:11px; line-height:1.6; }
.quota-numbers { display:flex; align-items:baseline; flex-wrap:wrap; gap:7px; margin-bottom:10px; color:var(--muted-light); font-size:11px; }
.quota-numbers strong { color:var(--text); font:600 23px "Space Grotesk",sans-serif; font-variant-numeric:tabular-nums; }
.quota-total { color:var(--muted); margin-left:3px; }
.quota-track { height:6px; overflow:hidden; border-radius:20px; margin-bottom:8px; background:rgba(157,177,220,.14); }
.quota-track span { display:block; width:100%; height:100%; border-radius:inherit; background:linear-gradient(90deg,var(--cyan),var(--blue)); transition:width .25s ease; }
.quota-track[data-state="empty"] span { background:#ff7185; }
.quota-refresh { flex-shrink:0; border:1px solid var(--border-strong); border-radius:9px; padding:9px 12px; color:var(--muted-light); background:rgba(129,146,183,.08); font-size:11px; font-weight:600; cursor:pointer; }
.quota-refresh:hover { border-color:rgba(102,227,223,.4); color:var(--text); }
@media (max-width:560px) { .quota-card { align-items:flex-start; padding:16px; } .quota-refresh { font-size:0; padding:9px 10px; } .quota-refresh::first-letter { font-size:15px; } .quota-numbers strong { font-size:21px; } }

/* Quota administration */
.admin-shell { padding-bottom: 28px; }
.admin-hero { min-height: 220px; padding-left: 8px; }
.admin-panel { padding: 30px; max-width: 720px; margin: 0 auto 30px; }
.admin-form { display:grid; gap:18px; margin-top:24px; }
.admin-form .field-group { display:flex; flex-direction:column; gap:8px; }
.admin-form .field-group label { color:var(--muted-light); font-size:12px; font-weight:600; }
.admin-form input,.admin-form select { width:100%; min-height:44px; padding:11px 13px; color:var(--text); background:rgba(5,10,21,.48); border:1px solid var(--border-strong); border-radius:9px; }
.admin-form [hidden] { display:none !important; }
.admin-actions { display:flex; flex-wrap:wrap; gap:10px; }
.admin-panel .status-message { margin-top:18px; }
.admin-shell footer a { color:var(--muted-light); text-decoration:none; font-size:12px; }
.admin-shell footer a:hover { color:var(--cyan); }
@media (max-width:560px) { .admin-panel { padding:20px; } .admin-hero { min-height:190px; padding:30px 8px; } .admin-actions .button { flex:1; } }

/* Voice2Voice content, accessibility and responsive refinements */
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 1000;
  padding: 10px 14px; border-radius: 8px; color: #08111f;
  background: var(--cyan); font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: 12px; }
.hero { gap: 24px; }
.hero h1 { max-width: 720px; margin-bottom: 12px; font-size: clamp(36px, 5vw, 54px); line-height: 1.08; letter-spacing: -.045em; }
.hero-tagline { margin: 0 0 14px; color: #dce5ff; font: 600 clamp(18px, 2.2vw, 24px)/1.35 "Space Grotesk", sans-serif; }
.hero-tagline span { color: var(--cyan); }
.info-section { margin: 34px 0; padding: clamp(20px, 3vw, 30px); border: 1px solid var(--border); border-radius: 20px; background: linear-gradient(145deg, rgba(25,37,61,.82), rgba(13,21,38,.84)); }
.info-heading { max-width: 720px; margin-bottom: 20px; }
.info-eyebrow { margin: 0 0 8px; color: var(--cyan); font-size: 10px; font-weight: 700; letter-spacing: 1.8px; }
.info-heading h2 { margin: 0 0 8px; color: var(--text); font: 700 clamp(22px, 3vw, 30px)/1.2 "Space Grotesk", sans-serif; letter-spacing: -.7px; }
.info-heading > p:last-child { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.7; }
.info-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; padding: 0; margin: 0; list-style: none; }
.info-card { min-width: 0; padding: 18px; border: 1px solid var(--border); border-radius: 13px; background: rgba(5,11,23,.35); }
.info-card h3 { margin: 9px 0 7px; color: var(--text); font: 600 16px/1.35 "Space Grotesk", sans-serif; }
.info-card p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.75; }
.info-number { color: var(--cyan); font: 700 13px "Space Grotesk", sans-serif; letter-spacing: 1px; }
.feature-symbol { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; color: var(--cyan); background: rgba(102,227,223,.09); font-size: 18px; }
.language-list { display: flex; flex-wrap: wrap; gap: 9px; padding: 0; margin: 0; list-style: none; }
.language-list li { padding: 8px 12px; border: 1px solid var(--border-strong); border-radius: 999px; color: var(--muted-light); background: rgba(5,11,23,.35); font-size: 12px; }
.info-footnote { margin: 16px 0 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.faq-item { padding: 16px 0; border-top: 1px solid var(--border); }
.faq-item:last-child { border-bottom: 1px solid var(--border); }
.faq-item summary { color: var(--text); font-size: 14px; font-weight: 600; cursor: pointer; }
.faq-item p { margin: 10px 0 0; color: var(--muted); font-size: 13px; line-height: 1.75; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--cyan); }
button, a, summary, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button, select, input[type="checkbox"] { touch-action: manipulation; }
@media (max-width: 760px) {
  .hero { align-items: flex-start; min-height: 0; }
  .hero-orbit { flex-basis: 130px; transform: scale(.78); transform-origin: top right; }
  .info-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .workspace, .results-panel { min-width: 0; }
}
@media (max-width: 560px) {
  .hero { padding: 30px 2px 25px; }
  .hero-orbit { display: none; }
  .hero h1 { font-size: clamp(34px, 9vw, 44px); }
  .hero-tagline { font-size: 19px; }
  .languages { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .swap-button { justify-self: center; transform: rotate(90deg); }
  .swap-button:hover { transform: rotate(270deg); }
  .bottom-settings { align-items: stretch; }
  .record-controls .button { flex: 1 1 125px; }
  .info-section { margin: 22px 0; padding: 18px; border-radius: 15px; }
  .info-grid { grid-template-columns: minmax(0, 1fr); }
  .language-list { gap: 7px; }
  .language-list li { font-size: 11px; padding: 7px 10px; }
  footer { gap: 12px; }
  .footer-links { gap: 10px 14px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
