:root {
    /* Modern Blue-Purple Theme (Default) */
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #0f172a;
    --accent: #8b5cf6;
    --dark: #0f172a;
    --darker: #020617;
    --light: #f8fafc;
    --light-gray: #f1f5f9;
    --medium-gray: #64748b;
    --dark-gray: #334155;
    --success: #10b981;
    --error: #ef4444;
    --border-radius: 16px;
    --box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --gradient-secondary: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}

/* Mint Green Theme */
.white-red-theme {
    --primary: #059669;
    --primary-dark: #047857;
    --primary-light: #10b981;
    --secondary: #ffffff;
    --accent: #06b6d4;
    --dark: #ffffff;
    --darker: #f0fdf4;
    --light: #064e3b;
    --light-gray: #1f2937;
    --medium-gray: #4b5563;
    --dark-gray: #111827;
    --gradient-primary: linear-gradient(135deg, #059669 0%, #06b6d4 100%);
    --gradient-secondary: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%);
}

/* Dark Ocean Theme */
.black-red-theme {
    --primary: #0ea5e9;
    --primary-dark: #0284c7;
    --primary-light: #38bdf8;
    --secondary: #000000;
    --accent: #06b6d4;
    --dark: #000000;
    --darker: #0c0a09;
    --light: #f0f9ff;
    --light-gray: #082f49;
    --medium-gray: #075985;
    --dark-gray: #0c4a6e;
    --gradient-primary: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 100%);
    --gradient-secondary: linear-gradient(135deg, #0c0a09 0%, #000000 100%);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--gradient-secondary);
    color: var(--light);
    line-height: 1.6;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    transition: var(--transition);
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(99, 102, 241, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(139, 92, 246, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(99, 102, 241, 0.05) 0%, transparent 50%);
    z-index: -1;
    pointer-events: none;
}

.theme-toggle {
    position: fixed;
    top: 24px;
    right: 24px;
    display: flex;
    gap: 8px;
    z-index: 1000;
    backdrop-filter: blur(20px);
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.theme-toggle button {
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--light);
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-transform: capitalize;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.theme-toggle button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    opacity: 0;
    transition: var(--transition);
    z-index: -1;
}

.theme-toggle button.active::before,
.theme-toggle button:hover::before {
    opacity: 1;
}

.theme-toggle button.active {
    color: white;
    font-weight: 600;
}

.container {
    width: 100%;
    max-width: 420px;
    perspective: 1200px;
}

.auth-container {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    position: relative;
    transform-style: preserve-3d;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition);
}

.auth-container:hover {
    transform: translateY(-4px);
    box-shadow: 0 32px 64px -12px rgba(0, 0, 0, 0.35);
}

.logo-container {
    text-align: center;
    padding: 60px 20px 50px;
    position: relative;
    overflow: hidden;
    background: var(--gradient-primary);
}

.logo-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 70% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    z-index: 0;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(1deg); }
}

.logo-container h1 {
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 8px;
    position: relative;
    z-index: 1;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: white;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.logo-container h1 span {
    background: linear-gradient(45deg, #ffffff, #f0f9ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 2px 8px rgba(255, 255, 255, 0.3));
}

.logo-container p {
    font-size: 0.9rem;
    opacity: 0.9;
    position: relative;
    z-index: 1;
    letter-spacing: 4px;
    text-transform: uppercase;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.8);
}

.pulse-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1), transparent 70%);
    z-index: 0;
    animation: pulse 4s infinite;
}

@keyframes pulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.3;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 0.1;
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.3;
    }
}

.form-wrapper {
    padding: 40px 32px;
    display: none;
    position: relative;
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(10px);
}

.form-wrapper.active {
    display: block;
    animation: slideIn 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-header {
    margin-bottom: 35px;
    text-align: center;
}

.form-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--light);
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 2px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.form-divider {
    height: 3px;
    width: 80px;
    background: var(--gradient-primary);
    margin: 0 auto;
    border-radius: 2px;
    position: relative;
    overflow: hidden;
}

.form-divider::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.input-group {
    margin-bottom: 28px;
    position: relative;
}

.input-group label {
    position: absolute;
    top: 18px;
    left: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--medium-gray);
    pointer-events: none;
    transition: var(--transition);
    text-transform: capitalize;
    letter-spacing: 0.5px;
}

.input-group input {
    width: 100%;
    padding: 20px 20px 12px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    font-size: 1rem;
    transition: var(--transition);
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    color: var(--light);
    caret-color: var(--primary);
    font-family: 'Inter', sans-serif;
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.input-group input:focus + label,
.input-group input:not(:placeholder-shown) + label {
    top: -8px;
    left: 16px;
    font-size: 0.7rem;
    color: var(--primary);
    background: var(--darker);
    padding: 0 8px;
    border-radius: 4px;
}

.input-highlight {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: var(--transition);
    border-radius: 1px;
}

.input-group input:focus ~ .input-highlight {
    width: 100%;
}

.btn {
    display: block;
    width: 100%;
    padding: 18px;
    border: none;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: 'Inter', sans-serif;
}

.primary-btn {
    background: var(--gradient-primary);
    color: white;
    z-index: 1;
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.3);
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(99, 102, 241, 0.4);
}

.btn-hover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transform: translateX(-100%);
    transition: var(--transition);
    z-index: -1;
}

.primary-btn:hover .btn-hover {
    transform: translateX(100%);
}

.form-footer {
    text-align: center;
    margin-top: 30px;
    font-size: 0.85rem;
    color: var(--medium-gray);
}

.form-footer a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    text-transform: capitalize;
    letter-spacing: 0.5px;
    position: relative;
}

.form-footer a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: var(--transition);
}

.form-footer a:hover::after {
    width: 100%;
}

.form-footer a:hover {
    color: var(--primary-light);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 400px;
    padding: 50px 35px;
    text-align: center;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: modalSlideIn 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 25px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    border: 3px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.3);
}

.modal-icon svg {
    width: 32px;
    height: 32px;
    fill: white;
}

.modal h3 {
    font-size: 1.6rem;
    margin-bottom: 18px;
    color: var(--light);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
}

.modal p {
    color: var(--medium-gray);
    margin-bottom: 30px;
    font-size: 0.95rem;
    line-height: 1.7;
}

.modal-close-btn {
    margin-top: 25px;
}

/* Enhanced Animations */
@keyframes floatUp {
    0% {
        transform: translateY(40px);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

.float-up {
    animation: floatUp 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

/* Responsive Styles */
@media (max-width: 480px) {
    .logo-container {
        padding: 50px 20px 40px;
    }
    
    .form-wrapper {
        padding: 30px 24px;
    }
    
    .logo-container h1 {
        font-size: 2.2rem;
        letter-spacing: 2px;
    }
    
    .theme-toggle {
        top: 16px;
        right: 16px;
        padding: 3px;
    }
    
    .theme-toggle button {
        padding: 8px 12px;
        font-size: 0.75rem;
    }
    
    .container {
        max-width: 380px;
    }
    }
