/* ========================================
   Login & Register Page Styles (Authentication)
   ======================================== */

html,
body {
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

/* Dots Animation Background */
.hero-dots-left {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    pointer-events: none;
}

.floating-dots-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.floating-dot {
    position: absolute;
    width: 20px;
    height: 20px;
    background: #ffffff;
    border-radius: 50%;
    opacity: 0.9;
    will-change: transform, opacity;
}

/* Auth Section - Full width, no constraints */
.auth-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 72px 20px 32px;
    background: transparent;
    position: relative;
    z-index: 10;
}

/* Override parent container constraints */
.auth-section > .container {
    max-width: none !important;
    width: 100%;
    padding: 0;
}

.auth-container {
    width: 540px;
    max-width: 94vw;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 28px 32px;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 2;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Tabs */
.auth-tabs {
    display: flex;
    gap: 15px;
    margin-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 8px;
}

.tab-btn {
    font-family: var(--font-body);
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    flex: 1;
    text-align: center;
}

.tab-btn.active {
    color: #ffffff;
}

.tab-btn.active::after {
    content: "";
    position: absolute;
    bottom: -9px;
    left: 0;
    right: 0;
    height: 2px;
    background: #ffffff;
    border-radius: 2px;
}

.tab-btn:hover {
    color: #c0c0c0;
}

/* Auth Forms */
.auth-form {
    display: none;
    animation: fadeIn 0.3s ease-out;
}

.auth-form.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.auth-form h2 {
    font-family: var(--font-body);
    color: #ffffff;
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 2px;
    text-align: center;
}

.form-subtitle {
    text-align: center;
    color: #c0c0c0;
    margin-bottom: 12px;
    font-size: 0.8rem;
}

/* ── Register form: 2-column compact grid ── */
.reg-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 0;
}

.reg-row .form-group {
    margin-bottom: 10px;
}

#register-form .form-group {
    margin-bottom: 10px;
}

#register-form .auth-btn {
    margin-top: 4px;
    padding: 11px;
}

/* Eye toggle button inside password fields */
.eye-toggle {
    position: absolute;
    left: 10px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    font-size: 0.85rem;
    z-index: 1;
    transition: color 0.2s ease;
}

.eye-toggle:hover {
    color: rgba(255, 255, 255, 0.7);
}

/* Form Groups */
.form-group {
    margin-bottom: 12px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.82rem;
    font-weight: 500;
}

.input-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon .icon {
    position: absolute;
    right: 12px;
    font-size: 1rem;
    color: #808080;
    pointer-events: none;
}

.input-icon input {
    width: 100%;
    padding: 10px 36px 10px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: #ffffff;
    font-family: var(--font-body);
    font-size: 0.88rem;
    transition: all 0.2s ease;
}

.input-icon input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.05);
}

.input-icon input::placeholder {
    color: rgba(255, 255, 255, 0.55);
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.remember-me,
.terms {
    display: flex;
    align-items: center;
    gap: 6px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    cursor: pointer;
}

.remember-me input,
.terms input {
    cursor: pointer;
}

.forgot-password {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s ease;
}

.forgot-password:hover {
    color: #ffffff;
}

.terms a {
    color: #808080;
    text-decoration: none;
    transition: color 0.3s ease;
}

.terms a:hover {
    color: #4c1d95;
    text-decoration: underline;
}

/* Auth Button */
.auth-btn {
    width: 100%;
    padding: 14px;
    background: #ffffff;
    color: #000000;
    border: none;
    border-radius: 12px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
    margin-top: 10px;
    margin-bottom: 12px;
}

.auth-btn:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-1px);
}

.btn-arrow {
    transition: transform 0.3s ease;
}

.auth-btn:hover .btn-arrow {
    transform: translateX(-5px);
}

/* Separator */
.auth-separator {
    text-align: center;
    margin: 15px 0;
    position: relative;
}

.auth-separator::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        #2a2a2a 50%,
        transparent 100%
    );
}

.auth-separator span {
    position: relative;
    background: #1a1a1a;
    padding: 0 15px;
    color: #606060;
    font-size: 0.9rem;
}

/* Social Login */
.social-login {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.social-btn {
    padding: 12px;
    background: #0a0a0a;
    border: 2px solid #2a2a2a;
    border-radius: 10px;
    color: #c0c0c0;
    font-family: var(--font-body);
    font-size: 0.95rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.social-btn:hover {
    border-color: #4c1d95;
    background: #111111;
    transform: translateY(-2px);
}

.social-btn span {
    font-size: 1.3rem;
}

/* Alert Messages */
.auth-alert {
    margin-top: 20px;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    font-size: 0.95rem;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-alert.success {
    background: rgba(40, 167, 69, 0.1);
    border: 1px solid rgba(40, 167, 69, 0.3);
    color: #28a745;
}

.auth-alert.error {
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.3);
    color: #dc3545;
}

.auth-alert.info {
    background: rgba(0, 123, 255, 0.1);
    border: 1px solid rgba(0, 123, 255, 0.3);
    color: #007bff;
}

/* Loading State */
.auth-btn.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.8;
}

.auth-btn.loading::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Responsive */
@media (max-width: 768px) {
    .auth-section {
        padding: 80px 16px 32px;
    }

    .auth-container {
        padding: 24px 20px;
        margin: 0 auto;
        max-width: 96vw;
        border-radius: 20px;
    }

    .auth-form h2 {
        font-size: 1.3rem;
    }

    .form-subtitle {
        font-size: 0.76rem;
    }

    .tab-btn {
        font-size: 0.88rem;
        padding: 6px 10px;
    }

    .reg-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .reg-row .form-group {
        margin-bottom: 8px;
    }

    .social-login {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .social-btn {
        font-size: 0.88rem;
        padding: 10px;
    }

    .auth-btn {
        padding: 12px;
        font-size: 0.9rem;
    }

    .input-icon input {
        padding: 10px 36px 10px 12px;
        font-size: 0.85rem;
    }

    .form-group label {
        font-size: 0.78rem;
    }

    .remember-me,
    .forgot-password {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .auth-section {
        padding: 72px 10px 24px;
    }

    .auth-container {
        padding: 20px 14px;
        border-radius: 16px;
    }

    .auth-form h2 {
        font-size: 1.15rem;
    }

    .form-subtitle {
        font-size: 0.72rem;
        margin-bottom: 8px;
    }

    .tab-btn {
        font-size: 0.82rem;
        padding: 5px 8px;
    }

    .auth-tabs {
        gap: 8px;
        margin-bottom: 12px;
        padding-bottom: 6px;
    }

    .form-options {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }

    .input-icon input {
        padding: 9px 32px 9px 10px;
        font-size: 0.82rem;
        border-radius: 8px;
    }

    .input-icon .icon {
        right: 10px;
        font-size: 0.9rem;
    }

    .form-group {
        margin-bottom: 10px;
    }

    .form-group label {
        font-size: 0.74rem;
        margin-bottom: 4px;
    }

    .social-btn {
        font-size: 0.82rem;
        padding: 9px;
    }

    .social-btn span {
        font-size: 1.1rem;
    }

    .auth-btn {
        padding: 11px;
        font-size: 0.85rem;
        border-radius: 10px;
    }

    .auth-alert {
        padding: 10px;
        font-size: 0.85rem;
        margin-top: 14px;
    }

    .eye-toggle {
        font-size: 0.78rem;
    }
}
