/* ============================================
   AUTH PAGES - PREMIUM NETFLIX STYLE
   Login & Register - cadit.top
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Assistant:wght@300;400;500;600;700;800&display=swap');

/* ===== CSS VARIABLES ===== */
:root {
    /* Background Colors */
    --bg-primary: #0d1117;
    --bg-secondary: #161b22;
    --bg-card: #1c2128;
    --bg-hover: #21262d;
    
    /* Accent Colors */
    --accent-primary: #e53935;
    --accent-secondary: #b71c1c;
    --accent-gold: #ffd700;
    
    /* Text Colors */
    --text-primary: #ffffff;
    --text-secondary: #8b949e;
    --text-muted: #6e7681;
    
    /* UI Colors */
    --border: #30363d;
    --success: #3fb950;
    --error: #f85149;
    
    /* Shadows & Effects */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 30px rgba(229, 57, 53, 0.4);
    
    /* Borders */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 16px;
}

/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Assistant', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== AUTH CONTAINER ===== */
.auth-container {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #0d1117 0%, #161b22 50%, #1c2128 100%);
}

/* Animated Background Particles */
.auth-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(229, 57, 53, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: particlesMove 20s linear infinite;
    pointer-events: none;
}

@keyframes particlesMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

/* Red Glow Effect */
.auth-container::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(229, 57, 53, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(60px);
    animation: glowPulse 4s ease-in-out infinite;
    pointer-events: none;
}

@keyframes glowPulse {
    0%, 100% { opacity: 0.5; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 0.8; transform: translate(-50%, -50%) scale(1.1); }
}

/* ===== AUTH BOX ===== */
.auth-box {
    background: rgba(28, 33, 40, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    padding: 48px 40px;
    max-width: 480px;
    width: 100%;
    position: relative;
    z-index: 10;
    animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Top Red Bar */
.auth-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

/* ===== HEADER ===== */
.auth-box h1 {
    text-align: center;
    color: var(--text-primary);
    margin-bottom: 32px;
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== FORM GROUPS ===== */
.form-group {
    margin-bottom: 24px;
    animation: fadeInUp 0.5s ease backwards;
}

.form-group:nth-child(1) { animation-delay: 0.1s; }
.form-group:nth-child(2) { animation-delay: 0.2s; }
.form-group:nth-child(3) { animation-delay: 0.3s; }
.form-group:nth-child(4) { animation-delay: 0.4s; }
.form-group:nth-child(5) { animation-delay: 0.5s; }

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 14px;
    letter-spacing: 0.3px;
    transition: color 0.3s ease;
}

/* ===== INPUTS ===== */
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"] {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-primary);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 15px;
    font-family: inherit;
    font-weight: 400;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
}

.form-group input::placeholder {
    color: var(--text-muted);
}

.form-group input:focus {
    border-color: var(--accent-primary);
    background: var(--bg-secondary);
    box-shadow: 0 0 0 4px rgba(229, 57, 53, 0.1), 
                0 0 20px rgba(229, 57, 53, 0.2);
    transform: translateY(-2px);
}

.form-group input:focus + label {
    color: var(--accent-primary);
}

/* ===== CHECKBOX ===== */
.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
    animation: fadeInUp 0.5s ease 0.6s backwards;
}

.checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--accent-primary);
    border-radius: 4px;
}

.checkbox-group label {
    margin: 0;
    cursor: pointer;
    user-select: none;
    font-size: 14px;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.checkbox-group:hover label {
    color: var(--text-primary);
}

/* ===== BUTTONS ===== */
.btn {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.5s ease 0.7s backwards;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: var(--text-primary);
    box-shadow: 0 4px 15px rgba(229, 57, 53, 0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Button Ripple Effect */
.btn-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-primary:active::before {
    width: 300px;
    height: 300px;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(229, 57, 53, 0.5), var(--shadow-glow);
}

.btn-primary:active {
    transform: translateY(-1px);
}

/* ===== MESSAGES ===== */
.message {
    margin-top: 20px;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    display: none;
    animation: messageSlide 0.4s ease;
}

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

.message.success {
    display: block;
    background: rgba(63, 185, 80, 0.15);
    color: var(--success);
    border: 1px solid rgba(63, 185, 80, 0.3);
    box-shadow: 0 0 20px rgba(63, 185, 80, 0.1);
}

.message.error {
    display: block;
    background: rgba(248, 81, 73, 0.15);
    color: var(--error);
    border: 1px solid rgba(248, 81, 73, 0.3);
    box-shadow: 0 0 20px rgba(248, 81, 73, 0.1);
}

/* ===== FOOTER ===== */
.auth-footer {
    text-align: center;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 14px;
    animation: fadeInUp 0.5s ease 0.8s backwards;
}

.auth-footer a {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
}

.auth-footer a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-primary);
    transition: width 0.3s ease;
}

.auth-footer a:hover {
    color: var(--accent-secondary);
}

.auth-footer a:hover::after {
    width: 100%;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .auth-container {
        padding: 16px;
    }
    
    .auth-box {
        padding: 32px 24px;
    }
    
    .auth-box h1 {
        font-size: 28px;
        margin-bottom: 24px;
    }
    
    .form-group {
        margin-bottom: 20px;
    }
    
    .btn {
        padding: 14px;
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .auth-box {
        padding: 24px 20px;
    }
    
    .auth-box h1 {
        font-size: 24px;
    }
}

/* ===== LOADING STATE ===== */
.btn-primary.loading {
    pointer-events: none;
    position: relative;
}

.btn-primary.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

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

/* ===== ACCESSIBILITY ===== */
.form-group input:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

.btn:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 4px;
}

/* ===== PRINT STYLES ===== */
@media print {
    .auth-container::before,
    .auth-container::after {
        display: none;
    }
}
