:root {
    --bg:            #001524;
    --surface:       #0a2035;
    --surface-2:     #06121c;
    --accent:        #c9a84c;
    --accent-soft:   rgba(201, 168, 76, 0.2);
    --accent-softer: rgba(201, 168, 76, 0.1);
    --accent-glow:   rgba(201, 168, 76, 0.4);
    --text:          #e8dcc8;
    --text-muted:    rgba(232, 220, 200, 0.65);
    --dark-text:     #1a0f05;
    --border:        rgba(201, 168, 76, 0.2);
}

/* ── Standalone auth page layout ── */
body.auth-page {
    margin: 0;
    min-height: 100svh;
    background-color: var(--bg);
    background-image:
        radial-gradient(ellipse 90% 55% at 50% 0%,   rgba(201,168,76,0.07) 0%, transparent 65%),
        radial-gradient(ellipse 60% 40% at 85% 100%,  rgba(139,26,26,0.08) 0%, transparent 60%);
    color: var(--text);
    font-family: 'Crimson Text', Georgia, serif;
    font-size: 1.05rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 16px;
    position: relative;
    overflow-x: hidden;
}

.auth-top-rune {
    position: absolute;
    top: 18px;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    color: var(--accent);
    opacity: 0.2;
    font-size: 0.65rem;
    letter-spacing: 6px;
    pointer-events: none;
    user-select: none;
}

/* ── Card wrapper ── */
.auth-wrapper {
    width: 100%;
    max-width: 420px;
}

/* ── Card ── */
.auth-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 40px 36px;
    position: relative;
    box-shadow:
        0 0 60px rgba(201,168,76,0.05),
        0 12px 40px rgba(0, 0, 0, 0.55);
}

/* Corner bracket decorations */
.auth-card::before,
.auth-card::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    border-color: var(--accent);
    border-style: solid;
    opacity: 0.45;
    pointer-events: none;
}
.auth-card::before { top: -1px; left: -1px;  border-width: 2px 0 0 2px; }
.auth-card::after  { bottom: -1px; right: -1px; border-width: 0 2px 2px 0; }

/* ── Logo ── */
.auth-logo {
    text-align: center;
    margin-bottom: 6px;
}
.auth-logo img {
    max-height: 64px;
    max-width: 200px;
    display: inline-block;
}

/* ── Rune subtitle divider ── */
.auth-rune-sub {
    text-align: center;
    color: var(--accent);
    opacity: 0.22;
    font-size: 0.6rem;
    letter-spacing: 5px;
    margin-bottom: 18px;
    user-select: none;
}

/* ── Headings ── */
.auth-card h1 {
    font-family: 'Cinzel', 'Trajan Pro', serif;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--accent);
    text-align: center;
    margin: 0 0 5px;
    letter-spacing: 0.04em;
}

.auth-subtitle {
    font-style: italic;
    color: var(--text-muted);
    text-align: center;
    margin: 0 0 22px;
    font-size: 0.95rem;
}

/* ── Alert ── */
.auth-alert {
    display: none;
    padding: 10px 14px;
    border-radius: 3px;
    font-size: 0.9rem;
    margin-bottom: 16px;
    border-left: 3px solid;
    line-height: 1.4;
}
.auth-alert.show  { display: block; }
.auth-alert.error {
    background: rgba(139, 26, 26, 0.18);
    border-color: #8b1a1a;
    color: #e07070;
}
.auth-alert.success {
    background: rgba(76, 175, 80, 0.1);
    border-color: #4caf50;
    color: #81c784;
}

/* ── Google button ── */
.btn-google {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 11px 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 3px;
    color: var(--text);
    font-family: 'Cinzel', serif;
    font-size: 0.82rem;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    margin-bottom: 16px;
}
.btn-google:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.24);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}
.btn-google:active { background: rgba(255,255,255,0.05); }
.btn-google svg { width: 18px; height: 18px; flex-shrink: 0; }

/* ── Divider ── */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-muted);
    font-size: 0.78rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 16px;
}
.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* ── Form ── */
.auth-form { margin: 0; }

.form-group { margin-bottom: 16px; }

.form-group label {
    display: block;
    font-family: 'Cinzel', serif;
    font-size: 0.7rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.input-with-icon { position: relative; }

.input-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1rem;
    pointer-events: none;
    z-index: 1;
}

.form-control {
    width: 100%;
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid var(--border);
    border-radius: 3px;
    color: var(--text);
    padding: 10px 12px 10px 38px;
    font-family: 'Crimson Text', Georgia, serif;
    font-size: 1rem;
    line-height: 1.4;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    outline: none;
    -webkit-appearance: none;
    box-sizing: border-box;
}
.form-control:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.13);
}
.form-control::placeholder { color: rgba(232, 220, 200, 0.28); }

/* Inputs with password toggle need right padding */
.has-toggle .form-control { padding-right: 40px; }

/* ── Password toggle ── */
.password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    font-size: 1rem;
    line-height: 1;
    transition: color 0.2s ease;
}
.password-toggle:hover { color: var(--accent); }

/* ── Form helper ── */
.form-helper {
    margin-top: 6px;
    text-align: right;
}
.form-helper a {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-decoration: none;
    cursor: pointer;
    transition: color 0.2s ease;
}
.form-helper a:hover { color: var(--accent); }

/* ── Submit button ── */
.btn-submit {
    width: 100%;
    padding: 12px;
    background: var(--accent);
    border: none;
    border-radius: 3px;
    color: var(--dark-text);
    font-family: 'Cinzel', serif;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    cursor: pointer;
    margin-top: 8px;
    transition: background 0.2s ease, box-shadow 0.2s ease;
}
.btn-submit:hover {
    background: #d8b75a;
    box-shadow: 0 4px 20px rgba(201, 168, 76, 0.32);
}
.btn-submit:active { background: #c0a045; }
.btn-submit:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    box-shadow: none;
}

/* ── Footer ── */
.auth-footer {
    text-align: center;
    margin-top: 22px;
    font-size: 0.9rem;
    color: var(--text-muted);
}
.auth-footer a {
    color: var(--accent);
    text-decoration: none;
    cursor: pointer;
    transition: color 0.2s ease;
}
.auth-footer a:hover { color: #d8b75a; }

/* ── Back link ── */
.auth-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-decoration: none;
    cursor: pointer;
    margin-bottom: 20px;
    transition: color 0.2s ease;
}
.auth-back:hover { color: var(--accent); }
.auth-back i { font-size: 1rem; }

/* ── Verify email state ── */
.verify-icon {
    text-align: center;
    margin-bottom: 16px;
}
.verify-icon i {
    font-size: 3.2rem;
    color: var(--accent);
    opacity: 0.85;
}

.verify-body {
    text-align: center;
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.65;
    margin-bottom: 12px;
}
.verify-body strong { color: var(--text); }

.verify-body-small {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-style: italic;
    margin-bottom: 0;
}

.verify-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 24px;
}

.btn-secondary {
    width: 100%;
    padding: 11px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 3px;
    color: var(--text-muted);
    font-family: 'Cinzel', serif;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease;
}
.btn-secondary:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* ── Responsive ── */
@media (max-width: 480px) {
    .auth-card {
        padding: 32px 20px;
    }
}
