  :root {
    --bg: #0a0a0f;
    --surface: #12121a;
    --surface2: #1c1c28;
    --border: #2a2a3d;
    --accent: #e8c547;
    --accent2: #f07060;
    --text: #e8e8f0;
    --muted: #7a7a9a;
    --glow: rgba(232, 197, 71, 0.15);
  }

  * { margin: 0; padding: 0; box-sizing: border-box; }

  body {
    background: var(--bg);
    color: var(--text);
    font-family: 'DM Mono', monospace;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    overflow-x: hidden;
  }

  body::before {
    content: '';
    position: fixed;
    top: -40%;
    left: -20%;
    width: 70vw;
    height: 70vw;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(232,197,71,0.05) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
  }

  body::after {
    content: '';
    position: fixed;
    bottom: -40%;
    right: -20%;
    width: 60vw;
    height: 60vw;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(240,112,96,0.05) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
  }

  .app {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 820px;
  }

  header {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    margin-bottom: 2.5rem;
  }

  .logo {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    font-weight: 900;
    color: var(--accent);
    line-height: 1;
    letter-spacing: -2px;
  }

  .tagline {
    font-size: 0.65rem;
    color: var(--muted);
    letter-spacing: 0.25em;
    text-transform: uppercase;
  }

  .card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 2px;
    overflow: hidden;
  }

  .text-section {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
  }

  .section-label {
    font-size: 0.6rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 0.75rem;
  }

  textarea {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text);
    font-family: 'DM Mono', monospace;
    font-size: 0.9rem;
    line-height: 1.8;
    resize: none;
    min-height: 180px;
  }

  textarea::placeholder { color: var(--muted); }

  /* Reading display */
  .reading-display {
    padding: 1.5rem;
    background: var(--surface2);
    border-bottom: 1px solid var(--border);
    min-height: 80px;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
  }

  .reading-display::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
    background: var(--accent);
    opacity: 0;
    transition: opacity 0.3s;
  }

  .reading-display.active::before { opacity: 1; }

  .reading-text {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    line-height: 1.6;
    color: var(--text);
  }

  .word {
    display: inline;
    transition: all 0.1s;
    border-radius: 2px;
    padding: 0 2px;
    margin: 0 1px;
  }

  .word.active {
    background: var(--accent);
    color: #0a0a0f;
  }

  .word.spoken {
    color: var(--muted);
  }

  /* Controls */
  .controls-section {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
  }

  .btn {
    border: none;
    cursor: pointer;
    font-family: 'DM Mono', monospace;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border-radius: 2px;
    transition: all 0.2s;
  }

  .btn-primary {
    background: var(--accent);
    color: #0a0a0f;
    padding: 0.7rem 1.5rem;
    font-weight: 500;
  }
  .btn-primary:hover { background: #f0d060; transform: translateY(-1px); }

  .btn-secondary {
    background: transparent;
    color: var(--muted);
    border: 1px solid var(--border);
    padding: 0.65rem 1.2rem;
  }
  .btn-secondary:hover { border-color: var(--accent); color: var(--accent); }

  .btn-danger {
    background: transparent;
    color: var(--accent2);
    border: 1px solid rgba(240,112,96,0.3);
    padding: 0.65rem 1.2rem;
  }
  .btn-danger:hover { background: rgba(240,112,96,0.1); }

  .btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: none;
  }

  /* Sliders */
  .settings-section {
    padding: 1.5rem;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1.5rem;
  }

  @media (max-width: 580px) {
    .settings-section { grid-template-columns: 1fr; }
  }

  .setting-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }

  .setting-label {
    font-size: 0.6rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--muted);
    display: flex;
    justify-content: space-between;
  }

  .setting-value {
    color: var(--accent);
    font-size: 0.65rem;
  }

  input[type=range] {
    /* webkit-appearance: none; */
    width: 100%;
    height: 2px;
    background: var(--border);
    outline: none;
    border-radius: 2px;
  }

  input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    background: var(--accent);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 10px var(--glow);
    transition: transform 0.2s;
  }

  input[type=range]::-webkit-slider-thumb:hover { transform: scale(1.3); }

  select {
    background: var(--surface2);
    border: 1px solid var(--border);
    color: var(--text);
    font-family: 'DM Mono', monospace;
    font-size: 0.75rem;
    padding: 0.4rem 0.6rem;
    border-radius: 2px;
    outline: none;
    cursor: pointer;
    width: 100%;
  }

  select:focus { border-color: var(--accent); }

  /* Progress bar */
  .progress-bar {
    height: 3px;
    background: var(--border);
    position: relative;
    overflow: hidden;
  }

  .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent2));
    width: 0%;
    transition: width 0.1s linear;
  }

  /* Waveform animation */
  .waveform {
    display: flex;
    align-items: center;
    gap: 3px;
    margin-left: auto;
  }

  .bar {
    width: 3px;
    background: var(--accent);
    border-radius: 2px;
    height: 8px;
    opacity: 0.3;
    transition: height 0.1s, opacity 0.1s;
  }

  .waveform.playing .bar {
    opacity: 1;
    animation: wave 1.2s ease-in-out infinite;
  }

  .bar:nth-child(1) { animation-delay: 0s; }
  .bar:nth-child(2) { animation-delay: 0.1s; }
  .bar:nth-child(3) { animation-delay: 0.2s; }
  .bar:nth-child(4) { animation-delay: 0.3s; }
  .bar:nth-child(5) { animation-delay: 0.15s; }
  .bar:nth-child(6) { animation-delay: 0.05s; }
  .bar:nth-child(7) { animation-delay: 0.25s; }

  @keyframes wave {
    0%, 100% { height: 4px; }
    50% { height: 22px; }
  }

  /* Status */
  .status-bar {
    padding: 0.6rem 1.5rem;
    background: var(--surface2);
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.62rem;
    color: var(--muted);
    letter-spacing: 0.05em;
  }

  .status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--muted);
    display: inline-block;
    margin-right: 0.5rem;
    transition: background 0.3s;
  }

  .status-dot.active { background: var(--accent); box-shadow: 0 0 8px var(--glow); animation: pulse 1.5s infinite; }
  .status-dot.paused { background: var(--accent2); }

  @keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
  }

  .controls-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
  }

  .quick-text-btns {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    padding: 0 1.5rem 1rem;
  }

  /* Download section */
  .download-section {
    padding: 1.2rem 1.5rem;
    border-top: 1px solid var(--border);
    background: var(--surface2);
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
  }

  .download-label {
    font-size: 0.6rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--muted);
    white-space: nowrap;
  }

  .btn-download {
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--accent);
    padding: 0.65rem 1.3rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
  }
  .btn-download:hover { background: rgba(232,197,71,0.1); transform: translateY(-1px); }
  .btn-download:disabled { opacity: 0.3; cursor: not-allowed; transform: none; }

  .btn-record {
    background: transparent;
    color: var(--accent2);
    border: 1px solid rgba(240,112,96,0.5);
    padding: 0.65rem 1.3rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
  }
  .btn-record:hover { background: rgba(240,112,96,0.1); }
  .btn-record.recording { background: rgba(240,112,96,0.15); border-color: var(--accent2); animation: recPulse 1s infinite; }
  .btn-record:disabled { opacity: 0.3; cursor: not-allowed; }

  @keyframes recPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(240,112,96,0.3); }
    50% { box-shadow: 0 0 0 6px rgba(240,112,96,0); }
  }

  .rec-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent2);
  }

  .recording .rec-dot { animation: blink 0.8s infinite; }

  @keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
  }

  .download-info {
    margin-left: auto;
    font-size: 0.62rem;
    color: var(--muted);
    text-align: right;
    line-height: 1.5;
  }

  .download-info span { color: var(--accent); }

  .chip {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 0.3rem 0.8rem;
    font-family: 'DM Mono', monospace;
    font-size: 0.62rem;
    color: var(--muted);
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 0.05em;
  }

  .chip:hover { border-color: var(--accent); color: var(--accent); }