:root {
    /* Light Theme */
    --bg-color: #f0f2f5;
    --bg-gradient: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    --card-bg: rgba(255, 255, 255, 0.9);
    --card-border: rgba(255, 255, 255, 0.5);
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --accent-color: #4f46e5;
    --accent-hover: #4338ca;
    --accent-light: #e0e7ff;
    --border-color: #e2e8f0;
    --input-bg: #f8fafc;
    --danger-color: #ef4444;
    --success-color: #10b981;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
}

[data-theme="dark"] {
    /* Dark Theme */
    --bg-color: #0f172a;
    --bg-gradient: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    --card-bg: rgba(30, 41, 59, 0.8);
    --card-border: rgba(255, 255, 255, 0.1);
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --accent-color: #6366f1;
    --accent-hover: #818cf8;
    --accent-light: rgba(99, 102, 241, 0.1);
    --border-color: #334155;
    --input-bg: #1e293b;
    --danger-color: #f87171;
    --success-color: #34d399;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.3);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.3);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

/* Global Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-gradient);
    color: var(--text-primary);
    min-height: 100vh;
    transition: background 0.3s ease, color 0.3s ease;
}

/* Shared Utilities */
.hidden {
    display: none !important;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-primary);
}

.logo i {
    font-size: 2rem;
    color: var(--accent-color);
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 800;
}

/* Buttons */
.icon-btn {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    width: 48px;
    height: 48px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.icon-btn:hover {
    background-color: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
    transform: translateY(-2px);
}

.primary-btn {
    background: linear-gradient(135deg, var(--accent-color), var(--accent-hover));
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 14px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.4);
}

.full-width {
    width: 100%;
}

/* Landing Page */
.landing-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.landing-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.landing-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.hero-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    width: 100%;
    gap: 80px;
    flex-wrap: wrap;
}

.hero-content {
    flex: 1;
    min-width: 300px;
}

.hero-content h1 {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 24px;
    font-weight: 800;
    letter-spacing: -1px;
}

.hero-content .highlight {
    color: var(--accent-color);
    position: relative;
}

.hero-content p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 48px;
    max-width: 600px;
    line-height: 1.6;
}

.features-grid {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--card-bg);
    padding: 12px 20px;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--card-border);
}

.feature-item i {
    color: var(--accent-color);
    font-size: 1.2rem;
}

.feature-item span {
    font-weight: 600;
    color: var(--text-primary);
}

/* Auth Card */
.auth-card-wrapper {
    flex: 1;
    display: flex;
    justify-content: center;
    min-width: 350px;
    max-width: 500px;
}

.auth-card {
    background-color: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 48px;
    border-radius: 32px;
    box-shadow: var(--glass-shadow);
    width: 100%;
    border: 1px solid var(--card-border);
    position: relative;
    overflow: hidden;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, var(--accent-color), #a855f7);
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-title {
    font-size: 2rem;
    margin-bottom: 8px;
    font-weight: 800;
    color: var(--text-primary);
}

.auth-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Forms */
.auth-form {
    width: 100%;
}

.form-group {
    margin-bottom: 24px;
    width: 100%;
}

label {
    display: block;
    color: var(--text-primary);
    margin-bottom: 10px;
    font-weight: 600;
    font-size: 0.95rem;
}

.input-with-icon {
    position: relative;
    width: 100%;
}

.input-with-icon i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    transition: color 0.2s ease;
    z-index: 1;
}

.input-with-icon input {
    padding-left: 48px;
}

.form-input {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--border-color);
    border-radius: 14px;
    background-color: var(--input-bg);
    color: var(--text-primary);
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
    box-sizing: border-box;
    outline: none;
}

.form-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

.form-input:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 4px var(--accent-light);
}

.input-with-icon input:focus~i {
    color: var(--accent-color);
}

/* Dark mode input fixes */
[data-theme="dark"] .form-input {
    background-color: rgba(15, 23, 42, 0.8);
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

[data-theme="dark"] .form-input:focus {
    border-color: var(--accent-color);
    background-color: rgba(15, 23, 42, 0.9);
}

[data-theme="dark"] .form-input:-webkit-autofill,
[data-theme="dark"] .form-input:-webkit-autofill:hover,
[data-theme="dark"] .form-input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--text-primary);
    -webkit-box-shadow: 0 0 0 1000px rgba(15, 23, 42, 0.9) inset;
    transition: background-color 5000s ease-in-out 0s;
}

/* Auth Footer */
.auth-footer {
    margin-top: 24px;
    text-align: center;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.auth-footer a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.2s ease;
}

.auth-footer a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

/* Landing Footer */
.landing-footer {
    text-align: center;
    padding: 24px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Responsive */
@media (max-width: 968px) {
    .hero-section {
        flex-direction: column;
        text-align: center;
        gap: 60px;
    }

    .hero-content p {
        margin: 0 auto 40px;
    }

    .features-grid {
        justify-content: center;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .auth-card {
        padding: 32px;
    }
}

@media (max-width: 480px) {
    .landing-header {
        padding: 16px 20px;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .auth-card {
        padding: 24px;
    }

    .form-input {
        font-size: 16px;
        /* Prevents zoom on iOS */
    }
}