* { 
    padding: 0; 
    margin: 0; 
    box-sizing: border-box; 
    font-family: 'Poppins', sans-serif;
}
html { 
    scroll-behavior: smooth;
}
body {
    background-image: url('../img/back.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    min-height: 100vh;
    overflow-x: hidden;
}
.responsive-logo {
    width: 140px;
    height: 140px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}
.login-logo {
    text-align: center;
    margin-bottom: 1rem;
}
.login-logo h3 { 
    font-size: 1.6em;
    margin: 0 0 0.5rem 0; 
    text-align: center;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 700;
    letter-spacing: 1px;
}
/* Mobile: Smaller logo */
@media (max-width: 768px) {
    .responsive-logo {
        width: 100px;
        height: 100px;
        max-width: 100%;
        display: block;
        margin: 0 auto 0.75rem;
    }
    .login-logo h3 { 
        font-size: 1.3em; 
        margin: 0 0 0.5rem 0; 
    }
}
/* Desktop: Full size */
@media (min-width: 769px) {
    .responsive-logo {
        width: 140px;
        height: 140px;
        display: block;
        margin: 0 auto 1rem;
    }
}
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 5rem;
}
.form-box {
    width: min(90%, 500px);
    height: 550px;
    position: relative;
    margin: 2rem auto;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 2rem;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
}
.form-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}
.button-box {
    width: 280px;
    margin: 0 auto 2rem;
    position: relative;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    display: flex;
    height: 48px;
    left: 50%;
    transform: translateX(-50%);
}
.button-box:hover {
    background: rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}
.toggle-btn {
    padding: 12px 25px;
    cursor: pointer;
    background: transparent;
    border: none;
    outline: none;
    position: relative;
    color: #333;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    z-index: 2;
    flex: 1;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap; /* Prevents text wrapping */
}
.toggle-btn:hover {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}
/* Login button active state */
.toggle-btn.active {
    color: #333;
}
#btn {
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 30px;
    transition: left 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    pointer-events: none;
}
#btn.right {
    left: 50%;
}
.input-group {
    position: absolute;
    width: 100%;
    max-width: 360px;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    opacity: 0;
}
.login-form.active, .register-form.active { 
    opacity: 1; 
    z-index: 10;
}
.login-form:not(.active) { 
    left: -100%;
}
.register-form:not(.active) { 
    left: 100%;
}
.input-field {
    width: 75%;
    max-width: 280px;
    margin: 1rem auto;
    padding: 12px 0;
    border: none;
    border-bottom: 2px solid rgba(255, 255, 255, 0.6);
    background: transparent;
    color: #fff;
    font-size: 1rem;
    transition: all 0.3s ease;
    display: block;
}
.input-field:hover {
    border-bottom-color: rgba(255, 255, 255, 0.9);
}
.input-field:focus {
    outline: none;
    border-bottom-color: rgba(255, 255, 255, 1);
}
.input-field::placeholder { 
    color: rgba(255, 255, 255, 0.7);
}
.check-box {
    margin: 1.5rem 0;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
}
.check-box input {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: #fff;
    flex-shrink: 0;
}
.check-box span {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.85rem;
    line-height: 1.4;
}
.check-box a { 
    color: rgba(255, 255, 255, 1); 
    text-decoration: none;
}
.check-box a:hover { 
    text-decoration: underline;
}
.submit-btn {
    width: 75%;
    max-width: 280px;
    padding: 12px 30px;
    margin: 2rem auto 0;
    display: block;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    border: 2px solid transparent;
    border-radius: 30px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
}
.submit-btn:hover {
    background: transparent;
    color: #fff;
    border-color: rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}
.error { 
    color: #ff6b6b; 
    font-size: 0.85rem; 
    margin-bottom: 1rem; 
    text-align: center;
}
.success { 
    color: #51cf66; 
    font-size: 0.85rem; 
    margin-bottom: 1rem; 
    text-align: center;
}
@media (max-width: 480px) {
    .form-box { 
        width: 95%; 
        height: 580px; 
        padding: 1.5rem; 
        margin: 1rem auto;
        max-width: 420px;
    }
    .button-box {
        width: 240px;
        margin: 0 auto 2rem;
        left: 50%;
        transform: translateX(-50%);
    }
    .toggle-btn { 
        padding: 10px 20px; 
        font-size: 0.9rem;
    }
    .input-group {
        max-width: 300px;
    }
    .input-field {
        width: 85%;
        max-width: 240px;
    }
    .submit-btn {
        width: 85%;
        max-width: 240px;
    }
    .hero {
        min-height: 100vh;
        height: fit-content;
        max-height: 650px;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 20px;
        box-sizing: border-box;
    }
    .login-logo h3 { 
        font-size: 1.3em; 
        margin: 0 0 0.5rem 0; 
        text-align: center;
    }
    .responsive-logo { 
        width: 80px !important; 
        height: 80px !important; 
        display: block;
        margin: 0 auto 0.75rem;
    }
    .login-box { 
        max-width: 420px;
        width: 100%;
        max-height: 500px;
    }
    .form-box { 
        padding: 15px;
    }
    /* Mobile optimization */
    @media (max-height: 700px) {
        .hero { 
            padding: 10px; 
            max-height: 100vh;
        }
        .login-logo h3 { 
            font-size: 1.2em; 
            margin-bottom: 0.25rem;
        }
        .responsive-logo { 
            width: 70px !important; 
            height: 70px !important;
            margin: 0 auto 0.5rem;
        }
        .form-box { 
            padding: 12px;
        }
        .login-box { 
            max-height: 450px;
        }
    }
}
