/* Lexo.nu - Modern Login Styles (V3 Export) */

:root {
    /* Premium Dark Theme */
    --background: hsl(230, 25%, 9%);
    --foreground: hsl(0, 0%, 98%);
    --card-bg: hsl(230, 20%, 13%);
    --text-primary: hsl(0, 0%, 98%);
    --text-secondary: hsl(230, 10%, 70%);
    --text-muted: hsl(230, 10%, 55%);
    --accent: hsl(217, 91%, 60%);
    --accent-dark: hsl(217, 85%, 52%);
    --border: hsl(230, 15%, 22%);
    --error: hsl(0, 72%, 51%);
    --success: hsl(152, 69%, 45%);
}

[data-theme="light"] {
    --background: hsl(240, 20%, 97%);
    --foreground: hsl(230, 25%, 12%);
    --card-bg: hsl(0, 0%, 100%);
    --text-primary: hsl(230, 25%, 12%);
    --text-secondary: hsl(230, 15%, 40%);
    --text-muted: hsl(230, 10%, 50%);
    --accent: hsl(217, 91%, 60%);
    /* Slightly darker for better visibility on light */
    --accent-dark: hsl(217, 85%, 52%);
    --border: hsl(230, 15%, 88%);
    --error: hsl(0, 72%, 51%);
    --success: hsl(152, 69%, 40%);
}

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

body {
    background: var(--background);
    color: var(--foreground);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', 'Roboto', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 1.5rem;
    position: relative;
    -webkit-font-smoothing: antialiased;
}

/* Background glow */
body::before {
    content: '';
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, hsla(217, 91%, 60%, 0.15) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.login-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    padding: 3rem;
    border-radius: 24px;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 8px 32px hsla(0, 0%, 0%, 0.3);
    border: 1px solid var(--border);
    position: relative;
    z-index: 10;
    animation: fadeIn 0.4s ease-out;
}

/* Logo Section */
.logo-section {
    text-align: center;
    margin-bottom: 2rem;
}

.logo-icon {
    /* Removed fixed width/height/background to support image logo cleanly */
    /* width: 64px; height: 64px; background: linear-gradient(...); border-radius: 16px; */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    /* Reduced shadow for image */
    /* box-shadow: 0 8px 24px hsla(239, 84%, 67%, 0.3); */
}

.logo-text {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--foreground);
}

.logo-suffix {
    color: var(--accent);
}

/* Tabs */
.tabs {
    display: flex;
    margin-bottom: 2rem;
    background: hsla(230, 15%, 18%, 0.5);
    border-radius: 12px;
    padding: 0.25rem;
    gap: 0.25rem;
}

.tab {
    flex: 1;
    padding: 0.75rem;
    text-align: center;
    background: transparent;
    color: var(--text-muted);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

.tab.active {
    background: var(--card-bg);
    color: var(--foreground);
    box-shadow: 0 2px 8px hsla(0, 0%, 0%, 0.1);
}

.tab:hover:not(.active) {
    color: var(--foreground);
    background: hsla(230, 15%, 18%, 0.3);
}

/* Recovery Message */
.recovery-msg {
    display: none;
    text-align: center;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: hsla(239, 84%, 67%, 0.1);
    border: 1px solid hsla(239, 84%, 67%, 0.3);
    border-radius: 12px;
}

.recovery-msg h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.recovery-msg p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Form */
#auth-form {
    margin-bottom: 1.5rem;
}

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

.form-group:last-of-type {
    margin-bottom: 0;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 600;
}

input {
    width: 100%;
    padding: 0.875rem 1rem;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: hsla(230, 15%, 18%, 0.5);
    color: var(--foreground);
    font-size: 1rem;
    outline: none;
    transition: all 0.2s;
    font-family: inherit;
}

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

input:focus {
    border-color: var(--accent);
    background: hsla(230, 15%, 18%, 0.7);
    box-shadow: 0 0 0 3px hsla(217, 91%, 60%, 0.15);
}

/* Password Groups */
#verify-password-group {
    display: none;
}

.password-hint {
    display: none;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 1rem;
    padding-left: 0.5rem;
}

.forgot-link {
    text-align: right;
    margin-bottom: 1.5rem;
}

.forgot-link a {
    color: var(--accent);
    font-size: 0.9rem;
    text-decoration: none;
    transition: color 0.2s;
}

.forgot-link a:hover {
    color: hsl(239, 84%, 75%);
}

/* Buttons */
.btn-primary,
.btn-google {
    width: 100%;
    padding: 0.875rem;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    color: white;
    margin-bottom: 1rem;
    box-shadow: 0 4px 15px hsla(239, 84%, 67%, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px hsla(239, 84%, 67%, 0.45);
}

.btn-primary:active {
    transform: translateY(0);
}

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

#save-password-btn {
    display: none;
}

.btn-google {
    background: #ffffff;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 0;
    box-shadow: 0 2px 8px hsla(0, 0%, 0%, 0.1);
}

.btn-google:hover {
    background: #f8f8f8;
    box-shadow: 0 4px 12px hsla(0, 0%, 0%, 0.15);
}

/* Error Message */
.error-msg {
    display: none;
    color: var(--error);
    font-size: 0.9rem;
    text-align: center;
    padding: 0.875rem;
    background: hsla(0, 72%, 51%, 0.1);
    border: 1px solid hsla(0, 72%, 51%, 0.3);
    border-radius: 10px;
    margin-bottom: 1rem;
}

/* Terms Link */
.terms-link {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.85rem;
}

.terms-link a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.terms-link a:hover {
    color: var(--text-secondary);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

    .logo-text {
        font-size: 1.5rem;
    }

    .logo-icon {
        width: auto;
        height: auto;
        /* box-shadow: none; */
    }
}

/* Theme Toggle */
.theme-toggle-fixed {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    z-index: 50;
    backdrop-filter: blur(12px);
}

.theme-toggle-fixed:hover {
    background: hsla(239, 84%, 67%, 0.1);
    border-color: var(--accent);
}

.theme-toggle-fixed svg {
    width: 20px;
    height: 20px;
    color: var(--foreground);
}

/* Back Button */
.back-button {
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 10px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    transition: all 0.3s;
    z-index: 50;
    backdrop-filter: blur(12px);
}

.back-button:hover {
    background: hsla(239, 84%, 67%, 0.1);
    border-color: var(--accent);
    color: var(--accent);
    transform: translateX(-2px);
}

.back-button svg {
    width: 20px;
    height: 20px;
}