@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Poppins:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --primary-light: #818cf8;
    --primary-glow: rgba(79, 70, 229, 0.35);
    --secondary: #06b6d4;
    --accent: #f43f5e;
    --bg-gradient: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #0f172a 100%);
    --card-bg: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --input-bg: #f8fafc;
    --input-border: #e2e8f0;
    --input-focus: #4f46e5;
    --radius-lg: 28px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --shadow-premium: 0 25px 60px -15px rgba(0, 0, 0, 0.35), 0 0 40px rgba(79, 70, 229, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', 'Poppins', sans-serif;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: var(--bg-gradient);
    position: relative;
    overflow-x: hidden;
    padding: 20px;
}

/* Ambient Background Orbs */
.ambient-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    z-index: 0;
    pointer-events: none;
    opacity: 0.6;
}

.ambient-1 {
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, #6366f1 0%, transparent 70%);
    top: -100px;
    left: -100px;
}

.ambient-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, #06b6d4 0%, transparent 70%);
    bottom: -100px;
    right: -100px;
}

/* Brand Header */
.brand-header {
    position: absolute;
    top: 25px;
    left: 40px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 10;
    text-decoration: none;
}

.brand-logo-icon {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, #6366f1, #06b6d4);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 22px;
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.35);
}

.brand-text {
    font-size: 24px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.5px;
}

.brand-text span {
    background: linear-gradient(135deg, #818cf8, #38bdf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Quick Top Controls */
.top-nav-controls {
    position: absolute;
    top: 25px;
    right: 40px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 20;
}

.verify-pill, .demo-pill {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 8px 16px;
    border-radius: 30px;
    color: #e2e8f0;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.25s ease;
}

.verify-pill:hover, .demo-pill:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
    color: #fff;
}

.verify-pill i {
    color: #34d399;
}

.demo-pill i {
    color: #38bdf8;
}

/* Main Auth Container */
.container {
    position: relative;
    width: 900px;
    height: 600px;
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-premium);
    overflow: hidden;
    z-index: 1;
}

/* Form Boxes (Login & Register) */
.form-box {
    position: absolute;
    right: 0;
    width: 50%;
    height: 100%;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--text-main);
    text-align: center;
    padding: 40px 48px;
    z-index: 1;
    transition: .6s ease-in-out 1.2s, visibility 0s 1s;
}

.container.active .form-box {
    right: 50%;
}

.form-box.register {
    visibility: hidden;
}

.container.active .form-box.register {
    visibility: visible;
}

form {
    width: 100%;
}

.form-box h1 {
    font-size: 32px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.5px;
    margin-bottom: 6px;
}

.form-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 24px;
}

/* Input Box */
.input-box {
    position: relative;
    margin: 16px 0;
}

.input-box input {
    width: 100%;
    padding: 13px 48px 13px 18px;
    background: var(--input-bg);
    border-radius: var(--radius-md);
    border: 1.5px solid var(--input-border);
    outline: none;
    font-size: 15px;
    color: var(--text-main);
    font-weight: 500;
    transition: all 0.25s ease;
}

.input-box input:focus {
    border-color: var(--primary);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12);
}

.input-box input::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

.input-box .field-icon {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    color: #94a3b8;
    transition: color 0.25s;
    pointer-events: none;
}

.input-box input:focus ~ .field-icon {
    color: var(--primary);
}

.password-toggle {
    position: absolute;
    right: 44px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    color: #94a3b8;
    cursor: pointer;
    transition: color 0.2s ease;
    padding: 4px;
}

.password-toggle:hover {
    color: var(--text-main);
}

/* Links & Help */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 6px 0 20px;
    font-size: 13.5px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 13px;
}

.remember-me input {
    accent-color: var(--primary);
    cursor: pointer;
}

.forgot-link a {
    font-size: 13.5px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.forgot-link a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* Submit Button */
.btn {
    width: 100%;
    height: 48px;
    background: linear-gradient(135deg, #4f46e5, #6366f1);
    border-radius: var(--radius-md);
    box-shadow: 0 10px 25px -5px var(--primary-glow);
    border: none;
    cursor: pointer;
    font-size: 15px;
    color: #fff;
    font-weight: 700;
    letter-spacing: 0.3px;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn:hover {
    background: linear-gradient(135deg, #4338ca, #4f46e5);
    transform: translateY(-2px);
    box-shadow: 0 15px 30px -5px var(--primary-glow);
}

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

.btn i {
    font-size: 18px;
}

/* Divider & Socials */
.social-divider {
    display: flex;
    align-items: center;
    margin: 20px 0 16px;
    color: #94a3b8;
    font-size: 13px;
}

.social-divider::before,
.social-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e2e8f0;
}

.social-divider span {
    padding: 0 12px;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1.5px solid #e2e8f0;
    border-radius: var(--radius-md);
    font-size: 20px;
    color: #475569;
    text-decoration: none;
    transition: all 0.25s ease;
    background: #fff;
}

.social-icons a:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(79, 70, 229, 0.15);
}

/* Toggle Box & Animated Wave Panel */
.toggle-box {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.toggle-box::before {
    content: '';
    position: absolute;
    left: -250%;
    width: 300%;
    height: 100%;
    background: linear-gradient(135deg, #4338ca 0%, #4f46e5 50%, #06b6d4 100%);
    border-radius: 160px;
    z-index: 2;
    transition: 1.8s ease-in-out;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.25);
}

.container.active .toggle-box::before {
    left: 50%;
}

.toggle-panel {
    position: absolute;
    width: 50%;
    height: 100%;
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 2;
    transition: .6s ease-in-out;
    padding: 0 45px;
    text-align: center;
    pointer-events: auto;
}

.toggle-panel.toggle-left {
    left: 0;
    transition-delay: 1.2s;
}

.container.active .toggle-panel.toggle-left {
    left: -50%;
    transition-delay: .6s;
}

.toggle-panel.toggle-right {
    right: -50%;
    transition-delay: .6s;
}

.container.active .toggle-panel.toggle-right {
    right: 0;
    transition-delay: 1.2s;
}

.toggle-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(8px);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.toggle-panel h1 {
    font-size: 34px;
    font-weight: 800;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.toggle-panel p {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 28px;
    line-height: 1.6;
    max-width: 320px;
}

.toggle-panel .btn {
    width: 170px;
    height: 48px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.85);
    color: #fff;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    border-radius: 30px;
    font-weight: 700;
}

.toggle-panel .btn:hover {
    background: #ffffff;
    color: var(--primary);
    border-color: #ffffff;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

/* Spinner Loader */
.spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2.5px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Password strength meter */
.strength-meter {
    height: 4px;
    width: 100%;
    background: #e2e8f0;
    border-radius: 2px;
    margin-top: 6px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.strength-bar {
    height: 100%;
    width: 0%;
    transition: width 0.3s ease, background-color 0.3s ease;
}

/* Modal styles for Forgot Password */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-card {
    background: #ffffff;
    width: 100%;
    max-width: 420px;
    border-radius: var(--radius-lg);
    padding: 36px 32px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    text-align: center;
}

.modal-overlay.active .modal-card {
    transform: translateY(0) scale(1);
}

.modal-close-btn {
    position: absolute;
    top: 18px;
    right: 18px;
    background: none;
    border: none;
    font-size: 22px;
    color: #94a3b8;
    cursor: pointer;
    transition: color 0.2s;
}

.modal-close-btn:hover {
    color: #0f172a;
}

.modal-icon {
    width: 56px;
    height: 56px;
    background: #eff6ff;
    color: var(--primary);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    margin-bottom: 16px;
}

/* Responsive Media Queries */
@media screen and (max-width: 920px) {
    .container {
        width: 100%;
        max-width: 800px;
        height: 580px;
    }
    
    .brand-header {
        top: 16px;
        left: 20px;
    }
    
    .top-nav-controls {
        top: 16px;
        right: 20px;
    }
}

@media screen and (max-width: 768px) {
    body {
        padding: 80px 16px 20px;
        min-height: 100vh;
        align-items: flex-start;
    }

    .container {
        height: auto;
        min-height: 620px;
        border-radius: 20px;
        display: flex;
        flex-direction: column;
    }

    .form-box {
        position: relative;
        width: 100%;
        height: auto;
        padding: 32px 24px;
        transition: none;
    }

    .form-box.register {
        display: none;
    }

    .container.active .form-box.login {
        display: none;
    }

    .container.active .form-box.register {
        display: flex;
        visibility: visible;
        right: 0;
    }

    .toggle-box {
        display: none;
    }

    .mobile-switcher {
        display: block !important;
        margin-top: 18px;
        font-size: 14px;
        color: var(--text-muted);
    }

    .mobile-switcher a {
        color: var(--primary);
        font-weight: 700;
        text-decoration: none;
    }
}

.mobile-switcher {
    display: none;
}
