/* Mnemosyne Authentication Styles */

:root {
    /* Color Palette - Dark Fantasy Theme */
    --bg-primary: #0a0e14;
    --bg-secondary: #141b24;
    --bg-card: #1a2332;
    --bg-input: #0d1219;

    --text-primary: #e8e6e3;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;

    --accent-gold: #d4af37;
    --accent-gold-hover: #e5c158;
    --accent-gold-dim: #8b7128;

    --border-color: #2d3748;
    --border-focus: #d4af37;

    --error-bg: #3c1f1f;
    --error-border: #991b1b;
    --error-text: #fca5a5;

    --success-bg: #1f3c2a;
    --success-border: #166534;
    --success-text: #86efac;

    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.5);

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
}

/* Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* Auth Container */
.auth-container {
    display: flex;
    min-height: 100vh;
}

.auth-card {
    flex: 1;
    max-width: 480px;
    padding: var(--spacing-xl);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-decoration {
    flex: 1;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    display: none;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-xl);
    border-left: 1px solid var(--border-color);
}

@media (min-width: 1024px) {
    .auth-card {
        padding: var(--spacing-xl) 4rem;
    }

    .auth-decoration {
        display: flex;
    }
}

/* Header */
.auth-header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.logo {
    margin-bottom: var(--spacing-md);
}

.logo-icon {
    font-size: 3rem;
    color: var(--accent-gold);
    text-shadow: 0 0 20px rgba(212, 175, 55, 0.3);
}

.auth-header h1 {
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* Alerts */
.alert {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-lg);
    font-size: 0.9rem;
}

.alert-icon {
    font-size: 1.2rem;
}

.alert-error {
    background: var(--error-bg);
    border: 1px solid var(--error-border);
    color: var(--error-text);
}

.alert-success {
    background: var(--success-bg);
    border: 1px solid var(--success-border);
    color: var(--success-text);
}

/* Form */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-group input {
    padding: var(--spacing-md);
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 1rem;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-group input::placeholder {
    color: var(--text-muted);
}

.form-group input:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15);
}

.form-group input:invalid:not(:placeholder-shown) {
    border-color: var(--error-border);
}

.form-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md) var(--spacing-lg);
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-gold) 0%, var(--accent-gold-dim) 100%);
    color: var(--bg-primary);
}

.btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--accent-gold-hover) 0%, var(--accent-gold) 100%);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--bg-card);
    border-color: var(--accent-gold-dim);
}

.btn-icon {
    font-size: 1.1rem;
}

/* Spinner */
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Footer */
.auth-footer {
    margin-top: var(--spacing-xl);
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.auth-footer a {
    color: var(--accent-gold);
    text-decoration: none;
    font-weight: 500;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* Dev Notice */
.dev-notice {
    margin-top: var(--spacing-xl);
    padding: var(--spacing-lg);
    background: var(--bg-secondary);
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-md);
    text-align: center;
}

.dev-notice p {
    margin-bottom: var(--spacing-md);
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Decoration */
.decoration-text {
    max-width: 400px;
    text-align: center;
}

.decoration-text blockquote {
    font-size: 1.5rem;
    font-style: italic;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: var(--spacing-lg);
}

.decoration-text cite {
    color: var(--accent-gold);
    font-size: 1rem;
}

/* Responsive */
@media (max-width: 640px) {
    .auth-card {
        padding: var(--spacing-lg);
    }

    .auth-header h1 {
        font-size: 1.5rem;
    }

    .logo-icon {
        font-size: 2.5rem;
    }
}
