:root {
    --bg: #0f1226;
    --bg2: #171a35;
    --card: #1e2142;
    --card-border: #2c3060;
    --accent: #6c5ce7;
    --accent2: #8e7bff;
    --record: #ff4757;
    --text: #eef0ff;
    --muted: #9aa0c7;
    --ok: #2ed573;
    --field: #14162e;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: radial-gradient(1200px 600px at 50% -10%, var(--bg2), var(--bg));
    color: var(--text);
    min-height: 100vh;
}

.app {
    max-width: 720px;
    margin: 0 auto;
    padding: 32px 20px 80px;
}

/* Hero */
.hero { text-align: center; margin-bottom: 28px; }
.hero h1 { font-size: 34px; margin: 0 0 6px; letter-spacing: -0.5px; }
.mic-emoji { display: inline-block; }
.tagline { color: var(--muted); margin: 0 0 12px; font-size: 15px; }
.health { font-size: 12px; color: var(--muted); }
.health .pill { display: inline-block; padding: 2px 10px; border-radius: 99px; margin: 0 4px; border: 1px solid var(--card-border); }
.health .pill.on { color: var(--ok); border-color: var(--ok); }
.health .pill.off { color: var(--record); border-color: var(--record); }

/* Cards */
.card {
    background: linear-gradient(180deg, var(--card), #1a1d3a);
    border: 1px solid var(--card-border);
    border-radius: 18px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 20px 60px -30px rgba(0,0,0,0.8);
    animation: rise 0.4s ease;
}
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.step-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.step-num {
    width: 30px; height: 30px; border-radius: 50%;
    background: var(--accent); color: #fff;
    display: grid; place-items: center; font-weight: 700; font-size: 15px;
}
.card h2 { margin: 0; font-size: 19px; }

/* Buttons */
.big-btn {
    width: 100%;
    padding: 15px 18px;
    border-radius: 12px;
    border: none;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    color: #fff;
    transition: transform 0.08s ease, filter 0.15s ease, opacity 0.15s;
    margin-top: 12px;
}
.big-btn:active { transform: scale(0.985); }
.big-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.big-btn.primary { background: linear-gradient(135deg, var(--accent), var(--accent2)); }
.big-btn.primary:hover:not(:disabled) { filter: brightness(1.1); }
.big-btn.ghost { background: var(--field); border: 1px solid var(--card-border); }
.big-btn.record { background: var(--field); border: 1px solid var(--record); color: var(--record); display: flex; align-items: center; justify-content: center; gap: 10px; }
.big-btn.record.live { background: var(--record); color: #fff; animation: pulse 1.2s infinite; }
.big-btn.record .dot { width: 11px; height: 11px; border-radius: 50%; background: currentColor; }
.big-btn.record.live .dot { animation: blink 1s infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(255,71,87,0.5); } 50% { box-shadow: 0 0 0 14px rgba(255,71,87,0); } }
@keyframes blink { 50% { opacity: 0.25; } }

.capture-row { display: flex; gap: 12px; }
.capture-row .big-btn { margin-top: 0; }

/* Inputs */
.transcript, input, textarea, select {
    width: 100%;
    background: var(--field);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    color: var(--text);
    padding: 11px 13px;
    font-size: 14px;
    font-family: inherit;
    margin-top: 6px;
    resize: vertical;
}
.transcript { min-height: 92px; margin-top: 14px; }
input:focus, textarea:focus, select:focus, .transcript:focus { outline: none; border-color: var(--accent2); }
label { display: block; font-size: 13px; color: var(--muted); margin-top: 14px; font-weight: 500; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }

/* Screenshot preview */
.shot-preview { margin-top: 14px; position: relative; }
.shot-preview img { width: 100%; border-radius: 10px; border: 1px solid var(--card-border); }
.link-btn { background: none; border: none; color: var(--muted); cursor: pointer; text-decoration: underline; font-size: 13px; margin-top: 8px; }

/* Result */
.card.success { border-color: var(--ok); text-align: center; }
.card.success h2 { color: var(--ok); }
#resultLink { display: inline-block; width: auto; padding: 13px 28px; text-decoration: none; }

/* Toast */
.toast {
    position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
    background: #2c3060; color: #fff; padding: 13px 22px; border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5); font-size: 14px; z-index: 50;
    border: 1px solid var(--card-border);
}
.toast.err { border-color: var(--record); }

.hidden { display: none !important; }
