/* ===========================================
   ZENXNET VPN - AUTH PAGE STYLES
   Login / Register / Password Reset
   =========================================== */

/* ============= CSS VARIABLES ============= */
:root {
    --gradient-light: #DBEDEF;
    --gradient-medium: #51D0E0;
    --gradient-dark: #008798;
    --text-dark: #1a1a1a;
    --text-light: #666;
    --white: #ffffff;
    --border-radius: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============= BASE STYLES ============= */
.auth-body {
    font-family: 'Poppins', sans-serif;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, var(--gradient-light) 0%, var(--gradient-medium) 50%, var(--gradient-dark) 100%);
}

/* ============= SPLIT CONTAINER ============= */
.split-container {
    display: flex;
    min-height: 100vh;
    position: relative;
    overflow: visible;
}

/* ============= BRAND SECTION (Left Side) ============= */
.brand-section {
    flex: 1;
    background: linear-gradient(135deg, var(--gradient-medium) 0%, var(--gradient-dark) 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 60px 40px;
    color: white;
    position: relative;
    overflow: hidden;
}

.brand-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="%23ffffff" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>') repeat;
    animation: float 20s ease-in-out infinite;
    pointer-events: none;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }
}

.brand-content {
    text-align: center;
    z-index: 2;
    position: relative;
}

.brand-logo {
    font-size: 4.5rem;
    font-weight: 800;
    letter-spacing: -2px;
    margin-bottom: 20px;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    color: #ffffff;
}

.brand-tagline {
    font-size: 1.4rem;
    font-weight: 300;
    margin-bottom: 40px;
    opacity: 0.9;
    line-height: 1.6;
}

.feature-list {
    list-style: none;
    margin-top: 40px;
    padding: 0;
}

.feature-item {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    font-size: 1.1rem;
    opacity: 0.9;
}

.feature-item i {
    margin-right: 15px;
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.8);
}

/* ============= FLOATING ELEMENTS ============= */
.floating-element {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    animation: floatUpDown 6s ease-in-out infinite;
}

.floating-element:nth-child(1) {
    width: 80px;
    height: 80px;
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.floating-element:nth-child(2) {
    width: 60px;
    height: 60px;
    top: 60%;
    right: 15%;
    animation-delay: 2s;
}

.floating-element:nth-child(3) {
    width: 40px;
    height: 40px;
    top: 80%;
    left: 20%;
    animation-delay: 4s;
}

@keyframes floatUpDown {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-30px);
    }
}

/* ============= LOGIN SECTION (Right Side) ============= */
.login-section {
    flex: 1;
    background: var(--white);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 60px 50px;
    position: relative;
}

.login-container {
    width: 100%;
    max-width: 420px;
    margin-bottom: 20px;
}

.login-header {
    text-align: center;
    margin-bottom: 40px;
}

.login-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.login-subtitle {
    font-size: 1rem;
    color: var(--text-light);
    font-weight: 400;
}

/* ============= TAB NAVIGATION ============= */
.auth-tabs {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 6px;
    margin-bottom: 30px;
    display: flex;
}

.auth-tab {
    flex: 1;
    border-radius: 8px;
    padding: 12px 24px;
    font-weight: 500;
    color: var(--text-light);
    border: none;
    background: transparent;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
}

.auth-tab i {
    margin-right: 8px;
    font-size: 1.1rem;
}

.auth-tab.active {
    background: linear-gradient(135deg, var(--gradient-medium), var(--gradient-dark));
    color: white;
    box-shadow: 0 4px 15px rgba(81, 208, 224, 0.3);
    transform: translateY(-1px);
}

.auth-tab:hover:not(.active) {
    background: rgba(81, 208, 224, 0.1);
    color: var(--gradient-dark);
}

/* ============= FORM STYLES ============= */
.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 8px;
    display: block;
}

.form-control {
    background: #f8f9fa;
    border: 2px solid transparent;
    border-radius: 12px;
    padding: 16px 20px;
    font-size: 1rem;
    transition: var(--transition);
    width: 100%;
    font-family: 'Poppins', sans-serif;
    box-sizing: border-box;
}

.form-control:focus {
    background: white;
    border-color: var(--gradient-medium);
    box-shadow: 0 0 0 4px rgba(81, 208, 224, 0.1);
    outline: none;
}

.form-control:disabled {
    background: #e9ecef;
    opacity: 0.7;
}

.form-control.is-invalid {
    border-color: #dc3545;
}

.form-control.is-valid {
    border-color: #28a745;
}

/* ============= BUTTONS ============= */
.btn-auth {
    background: linear-gradient(135deg, var(--gradient-medium), var(--gradient-dark));
    border: none;
    border-radius: 12px;
    padding: 16px 32px;
    font-weight: 600;
    font-size: 1rem;
    color: white;
    width: 100%;
    transition: box-shadow 0.3s ease;
    box-shadow: 0 4px 15px rgba(81, 208, 224, 0.3);
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Ripple wave effect from center */
.btn-auth::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0) 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.5s ease, height 0.5s ease;
    pointer-events: none;
}

.btn-auth:hover::before {
    width: 400%;
    height: 400%;
}

.btn-auth:hover:not(:disabled) {
    box-shadow: 0 6px 20px rgba(81, 208, 224, 0.4);
}

.btn-auth:focus {
    outline: none;
}

.btn-auth:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-link {
    color: var(--gradient-dark);
    text-decoration: none;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 8px;
    transition: var(--transition);
    background: transparent;
    border: none;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
}

.btn-link:hover {
    background: rgba(81, 208, 224, 0.1);
    color: var(--gradient-dark);
}

/* ============= ALERTS ============= */
.auth-alert {
    border-radius: 12px;
    border: none;
    padding: 16px 20px;
    margin-bottom: 20px;
    display: none;
}

.auth-alert.show {
    display: block;
}

.auth-alert.alert-success {
    background: rgba(34, 197, 94, 0.1);
    color: #059669;
}

.auth-alert.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

.auth-alert.alert-info {
    background: rgba(59, 130, 246, 0.1);
    color: #2563eb;
}

/* ============= BACK TO HOME ============= */
.back-home {
    display: block;
    text-align: center;
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
    padding: 15px 20px;
    margin-top: 30px;
}

.back-home:hover {
    color: var(--gradient-dark);
}

/* ============= LOADING SPINNER ============= */
.spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    margin-left: 8px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ============= HIDDEN GROUPS ============= */
.form-group.hidden {
    display: none;
}

/* ============= RESPONSIVE DESIGN ============= */
@media (max-width: 768px) {
    .split-container {
        flex-direction: column;
        min-height: 100vh;
        height: auto;
        overflow: visible;
    }

    .brand-section {
        flex: none;
        height: 35vh;
        min-height: 250px;
        padding: 30px 25px;
    }

    .brand-logo {
        font-size: 3rem;
        margin-bottom: 15px;
    }

    .brand-tagline {
        font-size: 1.1rem;
        margin-bottom: 20px;
    }

    .feature-list {
        display: none;
    }

    .login-section {
        padding: 30px 25px;
        flex: 1;
        min-height: auto;
        justify-content: flex-start;
        padding-top: 40px;
    }

    .login-container {
        width: 100%;
        max-width: 100%;
        padding: 0 5px;
    }

    .login-header {
        margin-bottom: 30px;
    }

    .login-title {
        font-size: 1.8rem;
    }

    .floating-element {
        display: none;
    }

    .back-home {
        margin-top: 20px;
        padding: 12px;
    }

    .form-control {
        font-size: 16px;
        /* Prevents zoom on iOS */
    }
}

@media (max-width: 480px) {
    .brand-section {
        height: 30vh;
        min-height: 200px;
        padding: 20px 20px;
    }

    .brand-logo {
        font-size: 2.5rem;
    }

    .brand-tagline {
        font-size: 1rem;
    }

    .login-section {
        padding: 20px 20px;
        padding-top: 30px;
        min-height: auto;
    }

    .login-container {
        max-width: 100%;
        padding: 0 10px;
    }

    .login-title {
        font-size: 1.6rem;
    }

    .login-subtitle {
        font-size: 0.9rem;
    }

    .auth-tab {
        padding: 10px 16px;
        font-size: 0.9rem;
    }

    .form-control {
        padding: 14px 16px;
        font-size: 16px;
        margin-bottom: 8px;
    }

    .btn-auth {
        padding: 14px 24px;
        font-size: 1rem;
        margin-bottom: 25px;
    }

    .form-group {
        margin-bottom: 20px;
    }

    .back-home {
        margin-top: 15px;
        font-size: 0.9rem;
        padding: 10px;
    }
}

/* ============= TOAST NOTIFICATIONS ============= */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    min-width: 280px;
    max-width: 400px;
    pointer-events: auto;
    transform: translateX(120%);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast.toast-success {
    border-left: 4px solid #10b981;
}

.toast.toast-danger {
    border-left: 4px solid #ef4444;
}

.toast.toast-info {
    border-left: 4px solid #3b82f6;
}

.toast-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.toast-success .toast-icon {
    color: #10b981;
}

.toast-danger .toast-icon {
    color: #ef4444;
}

.toast-info .toast-icon {
    color: #3b82f6;
}

.toast-message {
    flex: 1;
    font-size: 0.9rem;
    color: var(--text-dark);
}

.toast-close {
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 4px;
    font-size: 1rem;
    transition: color 0.2s;
}

.toast-close:hover {
    color: var(--text-dark);
}

@media (max-width: 480px) {
    .toast-container {
        left: 16px;
        right: 16px;
        bottom: 16px;
    }

    .toast {
        min-width: auto;
        max-width: none;
    }
}