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

:root {
    /* Light Theme Colors */
    --bg-primary: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 100%);
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --text-muted: #999999;
    --border-color: #e0e0e0;
    --shadow-sm: rgba(0, 0, 0, 0.05);
    --shadow-md: rgba(0, 0, 0, 0.08);
    --input-bg: #ffffff;
    --input-border: #e0e0e0;
}

[data-theme="dark"] {
    /* Dark Theme Colors */
    --bg-primary: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    --bg-secondary: #1e293b;
    --bg-card: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --border-color: #475569;
    --shadow-sm: rgba(0, 0, 0, 0.3);
    --shadow-md: rgba(0, 0, 0, 0.4);
    --input-bg: #1e293b;
    --input-border: #475569;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
}

/* Navigation */
.navbar {
    background: var(--bg-secondary);
    padding: 1rem 2rem;
    box-shadow: 0 2px 8px var(--shadow-sm);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text-primary);
}

.logo-icon {
    width: 40px;
    height: 40px;
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    display: inline-flex;
    gap: 0.02rem;
    align-items: center;
}

/* Two-tone logo children (copied from global styles to ensure consistency) */
.logo-text .logo-exam {
    color: var(--text-primary);
    transition: color 0.2s ease;
    display: inline-block;
    margin-right: 0.02rem;
    letter-spacing: normal;
}

.logo-text .logo-vault {
    background: linear-gradient(135deg, #00d4aa 0%, #00a3ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
    letter-spacing: -0.01em;
}

/* Dark theme adjustments */
[data-theme="dark"] .logo-text .logo-exam {
    color: var(--text-primary);
}

/* Prevent link/active/visited styles from overriding the gradient */
.logo a, .logo a:link, .logo a:visited, .logo a:active {
    color: inherit;
    text-decoration: none;
}

.logo a .logo-vault, .logo a:visited .logo-vault, .logo a:active .logo-vault {
    background: linear-gradient(135deg, #00d4aa 0%, #00a3ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Forgot Password Container */
.forgot-container {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 1rem;
    min-height: calc(100vh - 80px);
}

.card {
    background: var(--bg-secondary);
    padding: 3rem;
    border-radius: 16px;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 20px 60px var(--shadow-md);
}

.card h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.card > p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.6;
}

/* Form */
.forgot-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

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

.forgot-form input[type="email"] {
    width: 100%;
    padding: 0.875rem 1rem;
    border-radius: 8px;
    border: 2px solid var(--input-border);
    background: var(--input-bg);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.forgot-form input[type="email"]:focus {
    outline: none;
    border-color: #00a3ff;
    box-shadow: 0 0 0 3px rgba(0, 163, 255, 0.1);
}

.forgot-form input[type="email"]:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary {
    background: linear-gradient(135deg, #00d4aa 0%, #00a3ff 100%);
    color: white;
    border: none;
    padding: 0.875rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 163, 255, 0.3);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 163, 255, 0.4);
}

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

.message {
    margin-top: 0.5rem;
    min-height: 1.25rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.back-link {
    margin-top: 1.5rem;
    text-align: center;
}

.back-link a {
    color: #00a3ff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.back-link a:hover {
    color: #0080cc;
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 480px) {
    .card {
        padding: 2rem 1.5rem;
    }

    .card h1 {
        font-size: 1.75rem;
    }
}