/* Authentication Pages Styling with Dark Mode Support */

:root {
    --bg-primary: #ffffff;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --input-bg: #ffffff;
    --input-border: #e5e7eb;
    --input-focus: #2563eb;
    --alert-error-bg: #fee;
    --alert-error-border: #fcc;
    --alert-error-text: #c33;
    --alert-success-bg: #efe;
    --alert-success-border: #cfc;
    --alert-success-text: #3c3;
    --link-color: #2563eb;
}

[data-theme="dark"] {
    --bg-primary: #1f2937;
    --text-primary: #f9fafb;
    --text-secondary: #d1d5db;
    --input-bg: #374151;
    --input-border: #4b5563;
    --input-focus: #3b82f6;
    --alert-error-bg: #7f1d1d;
    --alert-error-border: #991b1b;
    --alert-error-text: #fca5a5;
    --alert-success-bg: #14532d;
    --alert-success-border: #166534;
    --alert-success-text: #86efac;
    --link-color: #60a5fa;
}

.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 2rem;
    position: relative;
}

/* Theme Toggle Button */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--bg-primary);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.theme-toggle svg {
    width: 24px;
    height: 24px;
    stroke: var(--text-primary);
}

.theme-toggle .sun-icon {
    display: none;
}

.theme-toggle .moon-icon {
    display: block;
}

[data-theme="dark"] .theme-toggle .sun-icon {
    display: block;
}

[data-theme="dark"] .theme-toggle .moon-icon {
    display: none;
}

.auth-card {
    background: var(--bg-primary);
    border-radius: 20px;
    padding: 3rem;
    width: 100%;
    max-width: 450px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transition: background 0.3s ease;
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-logo svg {
    width: 40px;
    height: 40px;
    color: white;
}

.auth-header h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    transition: color 0.3s ease;
}

.auth-header p {
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 500;
    transition: color 0.3s ease;
}

.form-group input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--input-border);
    border-radius: 12px;
    font-size: 1rem;
    background: var(--input-bg);
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--input-focus);
}

.btn-primary {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.3);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.auth-footer {
    text-align: center;
    margin-top: 2rem;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.auth-footer a {
    color: var(--link-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.auth-footer a:hover {
    text-decoration: underline;
}

.alert {
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    display: none;
    transition: all 0.3s ease;
}

.alert.show {
    display: block;
}

.alert-error {
    background: var(--alert-error-bg);
    border: 1px solid var(--alert-error-border);
    color: var(--alert-error-text);
}

.alert-success {
    background: var(--alert-success-bg);
    border: 1px solid var(--alert-success-border);
    color: var(--alert-success-text);
}

.bonus-info {
    background: linear-gradient(135deg, #10b981, #06b6d4);
    color: white;
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    text-align: center;
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
    .auth-container {
        padding: 1rem;
    }

    .auth-card {
        padding: 2rem;
    }

    .theme-toggle {
        top: 10px;
        right: 10px;
        width: 45px;
        height: 45px;
    }

    .theme-toggle svg {
        width: 20px;
        height: 20px;
    }
}
