:root {
    --gold-primary: #D4A547;
    --gold-light: #E8C670;
    --gold-dark: #9d7d38;
    --dark-bg: #0a0e27;
    --dark-card: #1a1f3a;
    --text-dark: #e8e6e1;
    --text-muted: #9a9590;
    --border-dark: #2a3050;
    --accent-red: #c41e3a;
    --accent-green: #2d5a2d;
    --light-bg: #faf8f3;
    --light-card: #ffffff;
    --light-border: #e0ddd6;
    --light-text: #1a1f3a;
    --light-muted: #6b6865;
}

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

body {
    font-family: 'Crimson Text', Georgia, serif;
    background:
        radial-gradient(ellipse 80% 60% at 50% -10%, rgba(212,165,71,0.08) 0%, transparent 55%),
        #090c1f;
    color: var(--text-dark);
    line-height: 1.7;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

body.light-mode {
    background: linear-gradient(135deg, #faf8f3 0%, #f0ede8 100%);
    color: var(--light-text);
}

.auth-container {
    width: 100%;
    max-width: 420px;
}

.auth-card {
    background-color: #111527;
    border: 1px solid var(--border-dark);
    border-radius: 6px;
    padding: 2.5rem 2rem;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5), 0 0 0 1px rgba(212,165,71,0.05);
}

body.light-mode .auth-card {
    background-color: var(--light-card);
    border-color: var(--light-border);
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo {
    width: 50px;
    height: 50px;
    margin: 0 auto 1.25rem;
    background: rgba(212,165,71,0.08);
    border: 1px solid var(--gold-dark);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold-primary);
    font-size: 1.4rem;
    font-family: 'IM Fell English', serif;
}

.auth-header h1 {
    font-family: 'IM Fell English', serif;
    font-size: 1.75rem;
    letter-spacing: 1px;
    color: var(--gold-primary);
    margin-bottom: 0.5rem;
    font-weight: normal;
}

body.light-mode .auth-header h1 {
    color: var(--gold-dark);
}

.auth-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

body.light-mode .auth-header p {
    color: var(--light-muted);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.95rem;
}

body.light-mode .form-label {
    color: var(--light-text);
}

.form-control {
    width: 100%;
    padding: 0.7rem 1rem;
    border: 1px solid var(--border-dark);
    background-color: #090c1f;
    color: var(--text-dark);
    font-family: 'Crimson Text', Georgia, serif;
    font-size: 1rem;
    border-radius: 4px;
    transition: border-color 0.2s ease;
}

body.light-mode .form-control {
    background-color: #f9f7f2;
    color: var(--light-text);
    border-color: var(--light-border);
}

.form-control:focus {
    outline: none;
    border-color: var(--gold-primary);
    box-shadow: 0 0 0 2px rgba(212, 165, 71, 0.1);
}

.error-message {
    color: var(--accent-red);
    font-size: 0.85rem;
    margin-top: 0.35rem;
    display: block;
}

.btn {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid transparent;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.18s ease;
    font-family: 'Crimson Text', Georgia, serif;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-primary {
    background-color: var(--gold-primary);
    border-color: var(--gold-primary);
    color: #090c1f;
    margin-top: 1.25rem;
}

.btn-primary:hover {
    background-color: var(--gold-light);
    border-color: var(--gold-light);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(212,165,71,0.3);
}

.alert {
    padding: 1rem;
    border-left: 3px solid;
    border-radius: 2px;
    margin-bottom: 1.5rem;
    display: flex;
    gap: 0.75rem;
    font-size: 0.9rem;
}

.alert-danger {
    background-color: rgba(196, 30, 58, 0.15);
    border-left-color: var(--accent-red);
    color: var(--accent-red);
}

.auth-alert-spaced {
    margin-bottom: 1.25rem;
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

body.light-mode .auth-footer {
    color: var(--light-muted);
}

.auth-footer a {
    color: var(--gold-primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

body.light-mode .auth-footer a {
    color: var(--gold-dark);
}

.auth-footer a:hover {
    color: var(--gold-light);
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 1rem 0;
}

.checkbox-group label {
    font-weight: normal;
    color: var(--text-muted);
    cursor: pointer;
}

.checkbox-group input {
    cursor: pointer;
}

.theme-toggle {
    position: fixed;
    top: 2rem;
    right: 2rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--gold-primary);
    padding: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
    z-index: 1000;
}

.theme-toggle:hover {
    color: var(--gold-light);
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.5;
}

.auth-help-text {
    color: var(--text-muted);
    font-size: 0.88rem;
    margin-bottom: 0.75rem;
}

.auth-source-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.auth-source-action {
    font-size: 0.85rem;
    margin: 0;
    padding: 0.45rem 0.7rem;
    width: auto;
}

.auth-source-list {
    border: 1px solid var(--border-dark);
    border-radius: 4px;
    display: grid;
    gap: 0.6rem;
    max-height: 260px;
    overflow: auto;
    padding: 0.75rem;
}

.auth-source-summary {
    color: var(--gold-primary);
    cursor: pointer;
    font-weight: 700;
}

.auth-source-items {
    display: grid;
    gap: 0.35rem;
    margin-top: 0.5rem;
}

.auth-source-option {
    align-items: center;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    font-size: 0.9rem;
    gap: 0.45rem;
}

.auth-verify-panel {
    padding: 1rem 0 2rem;
    text-align: center;
}

.auth-verify-icon {
    margin-bottom: 1.25rem;
    stroke: var(--gold-primary);
}

.auth-verify-email {
    color: var(--text-dark);
    margin-bottom: 0.75rem;
}

.auth-verify-hint {
    font-size: 0.9rem;
}

.auth-secondary-form {
    margin-top: 1rem;
}

