/**
 * Netflix Events Theme - Authentication Pages CSS
 * Styles for login, register, and lost password pages
 * Compatible with Hostinger, PHP 8, MariaDB
 * 
 * @package NetflixEventsTheme
 * @author MiniMax Agent
 * @version 1.3
 */

/* ===== SHARED AUTHENTICATION STYLES ===== */

.auth-container {
    min-height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--netflix-gradient);
}

.auth-background-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    opacity: 0.3;
}

.auth-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.7) 0%,
        rgba(0, 0, 0, 0.9) 100%
    );
    z-index: 2;
}

.auth-content {
    position: relative;
    z-index: 3;
    max-width: 450px;
    width: 90%;
    background: rgba(0, 0, 0, 0.85);
    padding: 60px 68px 40px;
    border-radius: 8px;
    backdrop-filter: blur(10px);
    animation: fadeInUp 0.8s ease-out;
}

.auth-logo {
    text-align: center;
    margin-bottom: 28px;
}

.auth-logo h1 {
    font-family: 'Bebas Neue', cursive;
    font-size: 36px;
    color: var(--netflix-red);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin: 0;
}

.auth-title {
    font-size: 32px;
    font-weight: 300;
    color: var(--netflix-white);
    margin-bottom: 24px;
    text-align: center;
}

.auth-form {
    width: 100%;
}

.auth-input-group {
    position: relative;
    margin-bottom: 16px;
}

.auth-input-row {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.auth-input-group.half-width {
    flex: 1;
    margin-bottom: 0;
}

.auth-input {
    width: 100%;
    height: 52px;
    padding: 18px 16px 6px;
    background: #333333;
    border: 1px solid #404040;
    border-radius: 4px;
    color: var(--netflix-white);
    font-size: 16px;
    font-family: 'Roboto', sans-serif;
    transition: border-color 0.3s ease, background-color 0.3s ease;
}

.auth-input:focus {
    outline: none;
    border-color: var(--netflix-red);
    background-color: #454545;
}

.auth-input:not(:placeholder-shown) + .auth-label,
.auth-input:focus + .auth-label {
    top: 8px;
    font-size: 12px;
    color: var(--netflix-red);
}

.auth-label {
    position: absolute;
    top: 18px;
    left: 16px;
    color: var(--netflix-light-gray);
    font-size: 16px;
    pointer-events: none;
    transition: all 0.3s ease;
}

.auth-input.error {
    border-color: #f44336;
    background-color: rgba(244, 67, 54, 0.1);
    animation: shake 0.5s ease-in-out;
}

.auth-input.valid {
    border-color: #4CAF50;
    background-color: rgba(76, 175, 80, 0.1);
}

.auth-button {
    width: 100%;
    height: 48px;
    background: var(--netflix-red);
    border: none;
    border-radius: 4px;
    color: var(--netflix-white);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 20px;
    transition: background-color 0.3s ease, transform 0.1s ease;
    position: relative;
}

.auth-button:hover {
    background: var(--netflix-dark-red);
}

.auth-button:active {
    transform: translateY(1px);
}

.auth-button:disabled {
    background: #666666;
    cursor: not-allowed;
    transform: none;
}

.auth-button.loading .auth-button-text {
    opacity: 0;
}

.auth-button.loading .auth-loading-spinner {
    display: inline-block;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.auth-loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid var(--netflix-white);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: none;
}

/* ===== ERROR AND SUCCESS MESSAGES ===== */

.auth-error-message {
    background: rgba(229, 9, 20, 0.15);
    border: 1px solid var(--netflix-red);
    border-radius: 4px;
    padding: 12px 16px;
    margin-bottom: 20px;
    font-size: 14px;
    color: var(--netflix-red);
    text-align: left;
    animation: shake 0.5s ease-in-out;
}

.auth-success-message {
    background: rgba(76, 175, 80, 0.15);
    border: 1px solid #4CAF50;
    border-radius: 4px;
    padding: 16px 20px;
    margin-bottom: 24px;
    font-size: 14px;
    color: #4CAF50;
    text-align: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    animation: slideIn 0.5s ease-out;
}

.auth-success-icon {
    width: 24px;
    height: 24px;
    background: #4CAF50;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 14px;
    flex-shrink: 0;
}

/* ===== NAVIGATION LINKS ===== */

.auth-back-link {
    margin-top: 30px;
    font-size: 14px;
    color: var(--netflix-light-gray);
    text-align: center;
}

.auth-back-text {
    color: var(--netflix-light-gray);
}

.auth-back-link a {
    color: var(--netflix-white);
    text-decoration: none;
    margin-left: 4px;
    font-weight: 500;
}

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

.auth-signup-link {
    margin-top: 16px;
    font-size: 14px;
    color: var(--netflix-light-gray);
    text-align: center;
}

.auth-signup-text {
    color: var(--netflix-light-gray);
}

.auth-signup-link a {
    color: var(--netflix-white);
    text-decoration: none;
    margin-left: 4px;
    font-weight: 500;
}

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

/* ===== FORM HELPERS ===== */

.auth-help-text {
    margin: 12px 0;
    font-size: 13px;
    color: var(--netflix-light-gray);
    text-align: center;
}

.auth-divider {
    display: flex;
    align-items: center;
    margin: 20px 0;
    color: var(--netflix-light-gray);
    font-size: 14px;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--netflix-light-gray);
    opacity: 0.3;
}

.auth-divider span {
    padding: 0 16px;
}

/* ===== GOOGLE SIGN-IN ===== */

.google-auth-button {
    width: 100%;
    height: 48px;
    background: var(--netflix-white);
    border: none;
    border-radius: 4px;
    color: #3c4043;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: background 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
    margin-bottom: 20px;
}

.google-auth-button:hover {
    background: #f8f9fa;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15), 0 1px 4px rgba(0, 0, 0, 0.1);
}

.google-auth-icon {
    width: 18px;
    height: 18px;
}

/* ===== ANIMATIONS ===== */

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    0% {
        opacity: 0;
        transform: translateY(-10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* ===== REMEMBER ME CHECKBOX ===== */

.remember-me {
    display: flex;
    align-items: center;
    margin-top: 16px;
    font-size: 13px;
    color: var(--netflix-light-gray);
    cursor: pointer;
}

.remember-me input[type="checkbox"] {
    margin-right: 8px;
    accent-color: var(--netflix-red);
    width: 16px;
    height: 16px;
}

/* ===== LOADING STATES ===== */

.auth-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.3s ease-out;
}

.auth-loading-content {
    text-align: center;
    color: var(--netflix-white);
}

.auth-loading-spinner-large {
    width: 40px;
    height: 40px;
    border: 4px solid transparent;
    border-top: 4px solid var(--netflix-red);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

.auth-loading-text {
    font-size: 18px;
    font-weight: 500;
}

/* ===== RESPONSIVE DESIGN ===== */

@media (max-width: 768px) {
    .auth-content {
        padding: 40px 28px;
        margin: 20px;
    }
    
    .auth-title {
        font-size: 28px;
        margin-bottom: 24px;
    }
    
    .auth-logo h1 {
        font-size: 28px;
    }
    
    .auth-input-row {
        flex-direction: column;
        gap: 0;
    }
    
    .auth-input-group.half-width {
        margin-bottom: 16px;
    }
    
    .google-auth-button {
        height: 44px;
        font-size: 13px;
    }
    
    .auth-back-link,
    .auth-signup-link {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .auth-content {
        padding: 30px 20px;
        margin: 10px;
    }
    
    .auth-title {
        font-size: 24px;
        margin-bottom: 20px;
    }
    
    .auth-logo h1 {
        font-size: 24px;
    }
    
    .auth-input {
        height: 48px;
        font-size: 14px;
    }
    
    .auth-button {
        height: 44px;
        font-size: 14px;
    }
    
    .auth-success-message {
        flex-direction: column;
        gap: 8px;
        padding: 12px 16px;
    }
    
    .auth-success-icon {
        width: 20px;
        height: 20px;
        font-size: 12px;
    }
    
    .auth-error-message {
        font-size: 13px;
        padding: 10px 14px;
    }
}

/* ===== ACCESSIBILITY ===== */

@media (prefers-reduced-motion: reduce) {
    .auth-content,
    .auth-success-message,
    .auth-error-message {
        animation: none;
    }
    
    .auth-loading-spinner,
    .auth-loading-spinner-large {
        animation: none;
        border-top-color: var(--netflix-red);
    }
}

/* Focus styles for keyboard navigation */
.auth-input:focus,
.auth-button:focus,
.google-auth-button:focus {
    outline: 2px solid var(--netflix-red);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .auth-content {
        background: #000000;
        border: 2px solid #FFFFFF;
    }
    
    .auth-input {
        background: #FFFFFF;
        color: #000000;
        border: 2px solid #000000;
    }
    
    .auth-input:focus {
        border-color: #FFFF00;
    }
}

/* Dark mode adjustments */
@media (prefers-color-scheme: dark) {
    .auth-content {
        background: rgba(0, 0, 0, 0.95);
    }
}