/* ================================================================
   IPTV Bulgaria — Animated Login, Signup & Reset Stylesheet
   ================================================================ */

.auth-body {
    background-color: #0a0f15;
    background-image: radial-gradient(circle at 10% 20%, rgba(0, 200, 150, 0.08) 0%, transparent 40%),
                      radial-gradient(circle at 90% 80%, rgba(0, 200, 150, 0.08) 0%, transparent 40%);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    min-height: 100vh;
    margin: 0;
    padding: 20px;
    box-sizing: border-box;
}

.auth-container {
    background-color: #141a29;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 
                0 0 40px rgba(0, 200, 150, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
    overflow: hidden;
    width: 850px;
    max-width: 100%;
    min-height: 720px;
    transition: all 0.5s ease-in-out;
}

.auth-form-container {
    position: absolute;
    top: 0;
    height: 100%;
    transition: all 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Sign In & Forgot Password Containers */
.auth-sign-in-container {
    left: 0;
    width: 50%;
    z-index: 3;
}

.auth-forgot-password-container {
    left: 0;
    width: 50%;
    z-index: 2;
    display: none; /* Controlled via JS */
}

/* Sign Up Container */
.auth-sign-up-container {
    left: 0;
    width: 50%;
    opacity: 0;
    z-index: 1;
    overflow-y: auto; /* Enable scroll if form content is long on smaller viewports */
}

/* Scrollbar styling for Sign Up panel */
.auth-sign-up-container::-webkit-scrollbar {
    width: 6px;
}
.auth-sign-up-container::-webkit-scrollbar-track {
    background: transparent;
}
.auth-sign-up-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}
.auth-sign-up-container::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 200, 150, 0.3);
}

/* Active panel transitions */
.auth-container.right-panel-active .auth-sign-in-container {
    transform: translateX(100%);
    opacity: 0;
    z-index: 1;
}

.auth-container.right-panel-active .auth-sign-up-container {
    transform: translateX(100%);
    opacity: 1;
    z-index: 5;
    animation: authShow 0.6s;
}

@keyframes authShow {
    0%, 49.99% {
        opacity: 0;
        z-index: 1;
    }
    50%, 100% {
        opacity: 1;
        z-index: 5;
    }
}

/* Form Styles */
.auth-form-container form {
    background-color: #141a29;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 30px 45px;
    height: 100%;
    text-align: center;
    box-sizing: border-box;
}

.auth-form-container h1 {
    font-weight: 800;
    margin: 0 0 10px 0;
    color: #ffffff;
    font-size: 1.85rem;
    letter-spacing: -0.5px;
}

.auth-form-container p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

/* Form Inputs Grid for Signup */
.auth-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    width: 100%;
    margin-bottom: 12px;
}

.auth-form-grid-full {
    grid-column: span 2;
}

/* Custom Input Styling */
.auth-input-wrapper {
    width: 100%;
    text-align: left;
}

.auth-input-wrapper label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.auth-form-container input,
.auth-form-container select {
    background-color: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    color: #ffffff;
    font-family: inherit;
    font-size: 0.9rem;
    padding: 11px 14px;
    width: 100%;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

.auth-form-container input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.auth-form-container input:focus,
.auth-form-container select:focus {
    outline: none;
    background-color: rgba(255, 255, 255, 0.07);
    border-color: #00c896;
    box-shadow: 0 0 10px rgba(0, 200, 150, 0.15);
}

.auth-form-container select option {
    background-color: #141a29;
    color: #ffffff;
}

/* Error/Validation States */
.auth-form-container input.is-invalid,
.auth-form-container select.is-invalid {
    border-color: #ef4444 !important;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.15);
}

.auth-invalid-feedback {
    color: #ef4444;
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 4px;
    text-align: left;
}

/* Links & Buttons */
.auth-form-container a {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
    text-decoration: none;
    margin: 12px 0 18px 0;
    transition: color 0.2s ease;
}

.auth-form-container a:hover {
    color: #00c896;
    text-decoration: underline;
}

.auth-btn {
    border-radius: 25px;
    border: none;
    background: linear-gradient(135deg, #00c896 0%, #00966e 100%);
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 12px 45px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(0, 200, 150, 0.25);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-btn:hover {
    background: linear-gradient(135deg, #00dba4 0%, #00a87b 100%);
    box-shadow: 0 8px 25px rgba(0, 200, 150, 0.35);
    transform: translateY(-1px);
}

.auth-btn:active {
    transform: scale(0.95);
}

.auth-btn.ghost {
    background: transparent !important;
    border: 2px solid #ffffff !important;
    box-shadow: none !important;
}

.auth-btn.ghost:hover {
    background: rgba(255, 255, 255, 0.1) !important;
}

/* Social buttons */
.auth-social-container {
    margin: 15px 0;
    display: flex;
    gap: 12px;
}

.auth-social {
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    height: 42px;
    width: 42px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.03);
    transition: all 0.3s ease;
    text-decoration: none !important;
}

.auth-social:hover {
    transform: translateY(-2px);
    border-color: #00c896;
    color: #00c896;
    box-shadow: 0 5px 15px rgba(0, 200, 150, 0.2);
}

/*divider */
.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    width: 100%;
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 15px 0;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.auth-divider:not(:empty)::before {
    margin-right: .75em;
}

.auth-divider:not(:empty)::after {
    margin-left: .75em;
}

/* Remember Me Checkbox */
.auth-remember-row {
    width: 100%;
    display: flex;
    justify-content: flex-start;
    margin-bottom: 15px;
}

.auth-remember-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    cursor: pointer;
    user-select: none;
}

.auth-remember-label input {
    width: auto !important;
    background-color: transparent !important;
    accent-color: #00c896;
    cursor: pointer;
}

/* Sliding Overlay panel */
.auth-overlay-container {
    position: absolute;
    top: 0;
    left: 50%;
    width: 50%;
    height: 100%;
    overflow: hidden;
    transition: transform 0.6s ease-in-out;
    z-index: 100;
}

.auth-container.right-panel-active .auth-overlay-container {
    transform: translateX(-100%);
}

.auth-overlay {
    background: linear-gradient(135deg, #00c896 0%, #004d3c 100%);
    color: #ffffff;
    position: relative;
    left: -100%;
    height: 100%;
    width: 200%;
    transform: translateX(0);
    transition: transform 0.6s ease-in-out;
}

.auth-container.right-panel-active .auth-overlay {
    transform: translateX(50%);
}

.auth-overlay-panel {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 0 40px;
    text-align: center;
    top: 0;
    height: 100%;
    width: 50%;
    transform: translateX(0);
    transition: transform 0.6s ease-in-out;
    box-sizing: border-box;
}

.auth-overlay-panel h1 {
    font-weight: 900;
    font-size: 2.2rem;
    margin: 0;
    letter-spacing: -0.5px;
}

.auth-overlay-panel p {
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 20px 0 30px;
    color: rgba(255, 255, 255, 0.85);
}

.auth-overlay-left {
    transform: translateX(-20%);
}

.auth-container.right-panel-active .auth-overlay-left {
    transform: translateX(0);
}

.auth-overlay-right {
    right: 0;
    transform: translateX(0);
}

.auth-container.right-panel-active .auth-overlay-right {
    transform: translateX(20%);
}

/* Captcha wrapper */
.auth-captcha-wrapper {
    margin: 10px 0 15px 0;
    width: 100%;
    display: flex;
    justify-content: center;
}

/* Go Back to Home Link */
.auth-back-to-home {
    margin-top: 20px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.4);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s ease;
    text-decoration: none;
}

.auth-back-to-home:hover {
    color: #00c896;
}

/* ================================================================
   RESPONSIVE DESIGN: Graceful Mobile Adaptation
   ================================================================ */
@media (max-width: 768px) {
    .auth-container {
        width: 100%;
        max-width: 440px;
        min-height: auto;
        border-radius: 12px;
    }

    /* Hide the sliding overlay container on mobile */
    .auth-overlay-container {
        display: none !important;
    }

    /* Make forms take full width */
    .auth-form-container {
        position: relative !important;
        width: 100% !important;
        height: auto !important;
        transform: none !important;
        opacity: 1 !important;
        display: none;
    }

    /* Display active container */
    .auth-form-container.active-mobile {
        display: block !important;
    }

    /* Reset Signup Scroll */
    .auth-sign-up-container {
        overflow-y: visible !important;
    }

    .auth-form-container form {
        padding: 30px 24px !important;
    }

    .auth-form-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .auth-form-grid-full {
        grid-column: span 1;
    }

    /* Add custom link to toggle between Sign In and Sign Up on mobile */
    .auth-mobile-toggle-link {
        display: block !important;
        margin-top: 15px !important;
        color: #00c896 !important;
        font-weight: 700 !important;
        font-size: 0.9rem !important;
        cursor: pointer;
        text-align: center;
    }
}
