/* Single source of truth for theme tokens and cross-page styles. Page/component-specific rules
   live in that component's own .razor.css and consume the variables declared here. */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --color-bg: #0a0a0a;
    --color-surface: #141414;
    --color-surface-2: #1c1c1c;
    --color-text: #fff;
    --color-text-dim: rgba(255,255,255,.65);
    --color-text-mute: rgba(255,255,255,.4);
    --color-text-faint: rgba(255,255,255,.3);
    --color-border: rgba(255,255,255,.08);
    --color-border-strong: rgba(255,255,255,.15);
    --color-urgent: #ef4444;
    --color-urgent-soft: rgba(239,68,68,.15);
    --color-urgent-edge: rgba(239,68,68,.3);
    --color-gold: #fbbf24;
    --color-gold-deep: #f59e0b;
    --color-gold-soft: rgba(251,191,36,.12);
    --color-gold-edge: rgba(251,191,36,.3);
    --color-gold-ink: #1a0f00;
    --color-win: #4ade80;
    --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --radius-card: 20px;
    --radius-control: 14px;
    --radius-input: 12px;
    --content-width: 380px;
    --card-width: 420px;
}

html, body {
    background: var(--color-bg);
    font-family: var(--font-body);
    color: var(--color-text);
    min-height: 100vh;
}

h1 {
    font-size: clamp(28px, 7vw, 42px);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 16px;
    letter-spacing: -.02em;
}

h1:focus { outline: none; }

.screen {
    display: flex;
    min-height: 100vh;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 72px 24px 32px; /* top clears the fixed account bar */
    text-align: center;
}

.page-heading { font-size: clamp(22px, 6vw, 30px); }

.sub {
    color: var(--color-text-dim);
    font-size: 16px;
    line-height: 1.6;
    max-width: var(--content-width);
    margin-bottom: 36px;
}

.eyebrow-gold {
    color: var(--color-gold);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .2em;
    text-transform: uppercase;
    margin-bottom: 6px;
}

/* Buttons */
.btn {
    width: 100%;
    max-width: var(--content-width);
    padding: 18px;
    border-radius: var(--radius-control);
    border: none;
    background: var(--color-gold);
    color: var(--color-gold-ink);
    font-weight: 800;
    font-size: 16px;
    cursor: pointer;
    margin-bottom: 12px;
    letter-spacing: .01em;
    font-family: inherit;
    transition: transform .15s ease, background .15s ease;
}

.btn:hover { background: var(--color-gold-deep); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn.disabled { opacity: .4; pointer-events: none; }
.btn-urgent { background: var(--color-urgent); color: var(--color-text); }
.btn-urgent:hover { background: #dc2626; }
.btn-ghost { background: transparent; border: 1px solid var(--color-border-strong); color: rgba(255,255,255,.5); font-weight: 500; font-size: 14px; }
.btn-ghost:hover { background: rgba(255,255,255,.06); transform: none; }
.no-margin { margin: 0; }
.top-spaced { margin-top: 4px; }
.top-spaced-16 { margin-top: 16px; }

.copy-btn {
    background: rgba(255,255,255,.05);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    padding: 12px 20px;
    color: var(--color-text);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    max-width: var(--card-width);
    margin-bottom: 10px;
    font-family: inherit;
}

.copy-btn:active { background: rgba(255,255,255,.1); }

/* Form controls */
input, textarea {
    width: 100%;
    max-width: var(--content-width);
    background: rgba(255,255,255,.04);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-input);
    padding: 16px;
    color: var(--color-text);
    font-size: 15px;
    font-family: inherit;
    outline: none;
    margin-bottom: 16px;
    display: block;
    transition: border-color .15s ease;
}

input:focus, textarea:focus { border-color: var(--color-gold); }
textarea { min-height: 100px; resize: vertical; line-height: 1.6; }

label {
    color: var(--color-text-mute);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .15em;
    display: block;
    text-align: left;
    margin-bottom: 8px;
    max-width: var(--content-width);
    width: 100%;
}

.error-msg { color: var(--color-urgent); font-size: 13px; margin-top: 8px; max-width: var(--content-width); }

/* Pitch card */
.pitch-box {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-card);
    padding: 28px;
    max-width: var(--card-width);
    width: 100%;
    text-align: left;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}

.pitch-box::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: var(--color-gold);
}

.pitch-label {
    color: var(--color-gold);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .15em;
    margin-bottom: 14px;
}

.pitch-text { color: var(--color-text); font-size: 16px; line-height: 1.8; font-weight: 400; }
.pitch-text.wrap { white-space: pre-wrap; }

/* Loading / feedback */
.loading { color: var(--color-text-mute); font-size: 15px; }
.dot-spin::after { content: '...'; animation: dots 1.5s infinite; }

.attribution-section {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,.06);
    width: 100%;
    max-width: var(--card-width);
    text-align: center;
}

.attribution-caption { color: var(--color-text-mute); font-size: 12px; margin: 0 0 10px; }
.attribution-link { color: var(--color-gold); font-size: 13px; font-weight: 600; text-decoration: none; letter-spacing: .02em; }

.fade-in { animation: fadeIn .5s ease forwards; }
.fade-in-delay { opacity: 0; animation: fadeIn .5s ease .6s forwards; }
.fade-in-delay2 { opacity: 0; animation: fadeIn .5s ease 1.2s forwards; }
.fade-in-delay3 { opacity: 0; animation: fadeIn .5s ease 1.8s forwards; }

/* Keyframes stay global so scoped component styles can reference them by name. */
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(239,68,68,.6); }
    70% { box-shadow: 0 0 0 10px rgba(239,68,68,0); }
    100% { box-shadow: 0 0 0 0 rgba(239,68,68,0); }
}

@keyframes micPulse {
    0% { box-shadow: 0 0 0 0 rgba(239,68,68,.5); }
    70% { box-shadow: 0 0 0 8px rgba(239,68,68,0); }
    100% { box-shadow: 0 0 0 0 rgba(239,68,68,0); }
}

@keyframes dots {
    0% { content: '.'; }
    33% { content: '..'; }
    66% { content: '...'; }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
    color: black;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

.blazor-error-boundary {
    background: #b32121;
    padding: 1rem;
    color: white;
}

.blazor-error-boundary::after { content: "An error has occurred."; }
