/* Authentication Pages - Split Screen Design */
.auth-split-container {
    min-height: 100vh;
    display: flex;
    background: var(--white);
    overflow-x: hidden;
    overflow-y: auto;
    position: relative;
    padding: clamp(1rem, 3vw, 3rem);
    gap: clamp(1rem, 3vw, 3rem);
    /* Hide scrollbar */
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE and Edge */
}

/* Hide scrollbar for Chrome, Safari and Opera */
.auth-split-container::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
    background: transparent;
}

.auth-split-container::-webkit-scrollbar-track {
    display: none;
}

.auth-split-container::-webkit-scrollbar-thumb {
    display: none;
}

/* Hide navbar on auth pages */
body:has(.auth-split-container) nav {
    display: none;
}

body:has(.auth-split-container) {
    overflow-x: hidden;
    margin: 0;
    padding: 0;
    background: var(--gray-50);
}

/* Left Panel - Geometric Shapes */
.auth-left-panel {
    flex: 1;
    background: linear-gradient(135deg, #f0f0f7 0%, #e0e0f0 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: clamp(1rem, 2.5vw, 2rem) clamp(2rem, 5vw, 4rem) clamp(2rem, 5vw, 4rem);
    position: relative;
    overflow: hidden;
    border-radius: clamp(16px, 2vw, 24px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
    min-height: 30vh;
}

.auth-logo {
    margin-bottom: clamp(1.5rem, 3vh, 2rem);
    text-align: center;
    display: flex;
    justify-content: center;
    z-index: 10;
    width: 100%;
    position: relative;
}

.auth-logo img {
    height: clamp(80px, 12vh, 120px);
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.1));
}

.auth-info {
    width: 100%;
    z-index: 10;
    position: relative;
}

.auth-info h2 {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    font-weight: 800;
    color: #1a1a1a;
    margin-bottom: clamp(1.5rem, 4vh, 2.5rem);
    letter-spacing: -0.02em;
    text-align: center;
}

.feature-list {
    display: flex;
    flex-direction: column;
    gap: clamp(1rem, 2vh, 1.5rem);
    width: 100%;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: clamp(1rem, 2vw, 1.25rem);
    padding: clamp(0.75rem, 1.5vw, 1rem);
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(12px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: #1a1a1a;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-item:hover {
    background: rgba(255, 255, 255, 0.85);
    transform: translateX(10px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.feature-item svg {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    color: #4f46e5;
    background: rgba(79, 70, 229, 0.1);
    padding: 6px;
    border-radius: 10px;
}

.feature-item div {
    display: flex;
    flex-direction: column;
}

.feature-item h3 {
    font-size: clamp(0.9rem, 1.8vw, 1rem);
    font-weight: 700;
    margin: 0 0 4px 0;
    color: #1a1a1a;
}

.feature-item p {
    font-size: clamp(0.75rem, 1.5vw, 0.85rem);
    margin: 0;
    color: #4b5563;
    line-height: 1.5;
}

.shapes-illustration {
    position: absolute;
    width: min(550px, 95vw);
    height: min(380px, 60vh);
    bottom: clamp(120px, 20vh, 200px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    opacity: 1;
}

/* Orange Semi-Circle - Front and Center Bottom */
.shape-semicircle {
    position: absolute;
    width: clamp(180px, 30vw, 280px);
    height: clamp(90px, 15vw, 140px);
    background: linear-gradient(135deg, #FF6B35 0%, #F7931E 100%);
    border-radius: 280px 280px 0 0;
    bottom: clamp(20px, 5vh, 50px);
    left: clamp(40px, 7vw, 60px);
    box-shadow: 0 10px 30px rgba(255, 107, 53, 0.5);
    z-index: 4;
}

/* Purple Rectangle - Tallest, Behind Orange */
.shape-rect-purple {
    position: absolute;
    width: clamp(130px, 22vw, 190px);
    height: clamp(180px, 35vh, 340px);
    background: linear-gradient(135deg, #7C3AED 0%, #6366F1 100%);
    border-radius: clamp(18px, 2.5vw, 24px);
    bottom: clamp(20px, 5vh, 50px);
    left: clamp(110px, 16vw, 165px);
    box-shadow: 0 10px 30px rgba(124, 58, 237, 0.5);
    z-index: 2;
}

/* Dark Rectangle - Medium Height, Right of Purple */
.shape-rect-dark {
    position: absolute;
    width: clamp(110px, 18vw, 165px);
    height: clamp(130px, 26vh, 230px);
    background: linear-gradient(135deg, #1F2937 0%, #111827 100%);
    border-radius: clamp(18px, 2.5vw, 24px);
    bottom: clamp(20px, 5vh, 50px);
    left: clamp(220px, 30vw, 330px);
    box-shadow: 0 10px 30px rgba(31, 41, 55, 0.6);
    z-index: 3;
}

/* Yellow Pill - Rightmost, Shortest */
.shape-pill-yellow {
    position: absolute;
    width: clamp(70px, 12vw, 100px);
    height: clamp(130px, 22vh, 180px);
    background: linear-gradient(135deg, #FBBF24 0%, #F59E0B 100%);
    border-radius: clamp(35px, 5vw, 60px);
    bottom: clamp(20px, 5vh, 50px);
    left: clamp(320px, 45vw, 480px);
    box-shadow: 0 10px 30px rgba(251, 191, 36, 0.5);
    z-index: 1;
}

/* Shape Faces */
.shape-face {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: row;
    gap: 18px;
    position: relative;
}

.shape-eye {
    width: 14px;
    height: 14px;
    background: rgba(0, 0, 0, 0.85);
    border-radius: 50%;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.shape-eye.looking-away .pupil {
    transform: translate(calc(-50% + 4px), -50%) !important;
    transition: transform 0.3s ease !important;
}

/* Positioning for each shape */
.shape-semicircle .shape-face {
    padding-top: 25px;
    gap: 22px;
}

.shape-rect-purple .shape-face {
    padding-top: 20px;
    gap: 18px;
}

.shape-rect-dark .shape-face {
    padding-top: 20px;
    gap: 18px;
}

.shape-pill-yellow .shape-face {
    flex-direction: column;
    gap: 18px;
    padding-top: 25px;
}

.pupil {
    width: 5px;
    height: 5px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s ease;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.shape-mouth {
    position: absolute;
}

.shape-mouth.happy {
    width: 45px;
    height: 22px;
    border: 3px solid rgba(0, 0, 0, 0.85);
    border-top: none;
    border-radius: 0 0 45px 45px;
    bottom: 18px;
}

.shape-mouth.line {
    width: 32px;
    height: 3px;
    background: rgba(0, 0, 0, 0.85);
    border-radius: 2px;
    bottom: 30px;
}

/* Brand Name */
.brand-name {
    position: absolute;
    bottom: clamp(20px, 5vh, 60px);
    left: 50%;
    transform: translateX(-50%);
    font-size: clamp(2rem, 8vw, 4rem);
    font-weight: 900;
    color: #1a1a1a;
    letter-spacing: -2px;
    text-transform: lowercase;
}

/* Feature Slider */
.feature-slider {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: none;
}

.feature-slider.active {
    display: flex;
    animation: fadeIn 0.3s ease forwards;
}

.feature-slider.closing {
    animation: fadeOut 0.3s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

.feature-slider-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.feature-slider-content {
    position: absolute;
    right: clamp(12px, 2vw, 24px);
    top: clamp(12px, 2vh, 24px);
    bottom: clamp(12px, 2vh, 24px);
    width: min(600px, calc(90vw - clamp(24px, 4vw, 48px)));
    background: white;
    border-radius: clamp(12px, 1.5vw, 20px);
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.3);
    overflow-y: auto;
    overflow-x: hidden;
    padding: clamp(24px, 4vw, 40px);
    animation: slideInRight 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    transform: translateX(calc(100% + clamp(12px, 2vw, 24px)));
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.feature-slider-content::-webkit-scrollbar {
    display: none;
}

@keyframes slideInRight {
    from {
        transform: translateX(calc(100% + clamp(12px, 2vw, 24px)));
        opacity: 0.8;
    }

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

.feature-slider-close {
    position: absolute;
    top: clamp(16px, 2vh, 20px);
    right: clamp(16px, 2vw, 20px);
    width: clamp(36px, 5vw, 40px);
    height: clamp(36px, 5vw, 40px);
    border: none;
    background: #f3f4f6;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
}

.feature-slider-close:hover {
    background: #e5e7eb;
    transform: rotate(90deg);
}

.feature-slider-close svg {
    width: clamp(18px, 2.5vw, 20px);
    height: clamp(18px, 2.5vw, 20px);
    stroke: #374151;
}

.feature-detail {
    display: none;
}

.feature-detail.active {
    display: block;
    animation: fadeInUp 0.5s ease forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

.feature-detail-icon {
    width: clamp(64px, 10vw, 80px);
    height: clamp(64px, 10vw, 80px);
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    border-radius: clamp(16px, 2vw, 20px);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: clamp(20px, 3vh, 24px);
}

.feature-detail-icon svg {
    width: clamp(32px, 5vw, 40px);
    height: clamp(32px, 5vw, 40px);
    stroke: white;
}

.feature-detail h2 {
    font-size: clamp(20px, 3.5vw, 26px);
    font-weight: 700;
    color: #111827;
    margin-bottom: clamp(6px, 1vh, 8px);
}

.feature-detail-subtitle {
    font-size: clamp(13px, 1.8vw, 14px);
    color: #6b7280;
    margin-bottom: clamp(24px, 4vh, 32px);
}

.feature-detail-content h3 {
    font-size: clamp(15px, 2.2vw, 17px);
    font-weight: 600;
    color: #111827;
    margin: clamp(20px, 3vh, 24px) 0 clamp(12px, 2vh, 16px) 0;
}

.feature-detail-content ul {
    list-style: none;
    padding: 0;
    margin: 0 0 clamp(20px, 3vh, 24px) 0;
}

.feature-detail-content li {
    padding: clamp(10px, 1.5vh, 12px) 0;
    padding-left: clamp(28px, 4vw, 32px);
    position: relative;
    color: #374151;
    line-height: 1.5;
    border-bottom: 1px solid #f3f4f6;
    font-size: clamp(12px, 1.6vw, 13.5px);
}

.feature-detail-content li:before {
    content: "✓";
    position: absolute;
    left: 0;
    top: clamp(10px, 1.5vh, 12px);
    width: clamp(20px, 3vw, 24px);
    height: clamp(20px, 3vw, 24px);
    background: #4f46e5;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(12px, 1.5vw, 14px);
    font-weight: bold;
}

.feature-detail-content li strong {
    color: #111827;
}

/* Right Panel - Login Form */
.auth-right-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(1rem, 2vw, 2rem);
    background: var(--white);
    overflow-y: auto;
    border-radius: clamp(16px, 2vw, 24px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    min-height: 50vh;
    /* Hide scrollbar */
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE and Edge */
}

/* Hide scrollbar for Chrome, Safari and Opera */
.auth-right-panel::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
    background: transparent;
}

.auth-right-panel::-webkit-scrollbar-track {
    display: none;
}

.auth-right-panel::-webkit-scrollbar-thumb {
    display: none;
}

.auth-form-container {
    width: 100%;
    max-width: min(420px, 90vw);
    padding: clamp(0.5rem, 1vw, 1rem) 0;
}

.auth-icon {
    width: clamp(40px, 6vw, 48px);
    height: clamp(40px, 6vw, 48px);
    background: var(--gray-900);
    border-radius: clamp(8px, 1.5vw, 12px);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: clamp(1rem, 2vh, 1.25rem);
}

.auth-icon svg {
    width: clamp(20px, 3vw, 24px);
    height: clamp(20px, 3vw, 24px);
    stroke: white;
}

.auth-form-container h1 {
    font-size: clamp(1.375rem, 3vw, 1.75rem);
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: clamp(0.3rem, 1vh, 0.4rem);
}

.auth-subtitle {
    color: var(--gray-600);
    margin-bottom: clamp(1.25rem, 2vh, 1.5rem);
    font-size: clamp(0.875rem, 1.5vw, 0.9rem);
}

.auth-form {
    margin-bottom: clamp(1rem, 2vh, 1.25rem);
}

.form-field {
    margin-bottom: clamp(1rem, 2vh, 1.25rem);
}

.form-field label {
    display: block;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: clamp(0.3rem, 1vh, 0.4rem);
    font-size: clamp(0.75rem, 1.2vw, 0.8rem);
}

.form-field input,
.form-field select {
    width: 100%;
    padding: clamp(0.75rem, 1.5vh, 0.875rem) clamp(0.75rem, 1.5vw, 0.85rem);
    border: none;
    border-bottom: 2px solid var(--gray-300);
    border-radius: 0;
    font-size: clamp(0.875rem, 1.8vw, 0.95rem);
    transition: all 0.2s;
    background: transparent;
}

.form-field input:focus,
.form-field select:focus {
    outline: none;
    border-bottom-color: var(--gray-900);
    background: transparent;
}

.password-field {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toggle-password svg {
    width: clamp(18px, 2.5vw, 20px);
    height: clamp(18px, 2.5vw, 20px);
    stroke: var(--gray-500);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: clamp(1.25rem, 2vh, 1.5rem);
    flex-wrap: wrap;
    gap: clamp(0.5rem, 1vh, 0.75rem);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: clamp(0.4rem, 1vw, 0.5rem);
    font-size: clamp(0.75rem, 1.2vw, 0.8rem);
    color: var(--gray-700);
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: clamp(14px, 2vw, 16px);
    height: clamp(14px, 2vw, 16px);
    cursor: pointer;
}

.forgot-link {
    font-size: clamp(0.75rem, 1.2vw, 0.8rem);
    color: var(--gray-900);
    font-weight: 600;
    text-decoration: none;
}

.forgot-link:hover {
    text-decoration: underline;
}

.error-alert {
    padding: clamp(0.75rem, 1.5vh, 0.875rem) clamp(0.75rem, 1.5vw, 0.85rem);
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--danger);
    border-radius: clamp(6px, 1vw, 8px);
    color: var(--danger);
    font-size: clamp(0.75rem, 1.2vw, 0.8rem);
    margin-bottom: clamp(0.875rem, 1.5vh, 1rem);
}

.btn-login {
    width: 100%;
    padding: clamp(0.875rem, 1.8vh, 1rem);
    background: var(--gray-900);
    color: var(--white);
    border: none;
    border-radius: 50px;
    font-size: clamp(0.875rem, 1.8vw, 0.95rem);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    touch-action: manipulation;
}

.btn-login:hover {
    background: var(--gray-800);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

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

.signup-link {
    text-align: center;
    color: var(--gray-600);
    font-size: clamp(0.75rem, 1.2vw, 0.8rem);
    margin-top: clamp(0.875rem, 1.5vh, 1rem);
}

.signup-link a {
    color: var(--gray-900);
    font-weight: 600;
    text-decoration: none;
}

.signup-link a:hover {
    text-decoration: underline;
}

/* --- Responsive Design --- */

/* Large Screens / TV (2560px and up) */
@media (min-width: 2000px) {
    :root {
        font-size: 18px;
        /* Scale up base font size for TV distance */
    }

    .auth-split-container {
        padding: 5rem;
        gap: 5rem;
        max-width: 2200px;
        margin: 0 auto;
    }

    .auth-form-container {
        max-width: 500px;
    }

    .feature-item {
        padding: 2.5rem;
    }
}

/* Desktop and Laptops (up to 1920px) */
@media (max-width: 1440px) {
    .auth-split-container {
        padding: clamp(1.5rem, 4vw, 3rem);
    }
}

/* Small Laptops / Tablets (up to 1024px) */
@media (max-width: 1024px) {
    .auth-split-container {
        flex-direction: column;
        padding: 1.5rem;
        gap: 1.5rem;
        height: auto;
    }

    .auth-left-panel {
        flex: 0 0 auto;
        padding: 3rem 2rem;
        min-height: auto;
    }

    .auth-right-panel {
        padding: 3rem 2rem;
        min-height: auto;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
    }

    .auth-info {
        max-width: 600px;
        margin: 0 auto 2rem;
    }

    .feature-list {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1.5rem;
        width: 100%;
    }

    .shapes-illustration {
        display: none !important;
        /* Hide decorative shapes on tablet/mobile to save space */
    }
}

/* Mobile (up to 768px) */
@media (max-width: 768px) {
    .auth-split-container {
        padding: 0;
        gap: 0;
        background: #fff;
    }

    .auth-left-panel {
        padding: 2.5rem 1.5rem;
        border-radius: 0 0 30px 30px;
        background: linear-gradient(135deg, #f0f0f7 0%, #e0e0f0 100%);
    }

    .auth-right-panel {
        padding: 2.5rem 1.5rem 4rem;
        border-radius: 0;
        box-shadow: none;
    }

    .feature-list {
        grid-template-columns: 1fr;
    }

    .auth-logo img {
        height: 90px;
    }

    .auth-form-container h1 {
        font-size: 1.75rem;
    }

    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}

/* Small Mobile (up to 480px) */
@media (max-width: 480px) {
    .auth-left-panel {
        padding: 2rem 1rem;
    }

    .auth-logo img {
        height: 70px;
    }

    .auth-info h2 {
        font-size: 1.1rem;
    }

    .feature-item {
        padding: 1rem;
        gap: 12px;
    }

    .feature-item h3 {
        font-size: 1rem;
    }

    .auth-right-panel {
        padding: 2rem 1rem 3rem;
    }
}