* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Cairo', sans-serif;
    overflow: hidden;
    height: 100vh;
    position: relative;
    background: #0a0a0a;
}

/* Background Image */
.login-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('assets/ui/login_bg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 1;
}

/* Dark Overlay */
.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        rgba(10, 0, 0, 0.85) 0%,
        rgba(20, 0, 0, 0.75) 50%,
        rgba(139, 0, 0, 0.65) 100%
    );
    z-index: 2;
    animation: overlayPulse 8s ease-in-out infinite;
}

@keyframes overlayPulse {
    0%, 100% { opacity: 0.9; }
    50% { opacity: 0.7; }
}

/* Main Container */
.login-container {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    padding: 20px;
}

/* Logo Section */
.game-logo {
    text-align: center;
    margin-bottom: 40px;
    animation: fadeInDown 1s ease-out;
}

.game-title {
    font-size: 4em;
    font-weight: 900;
    color: #d4af37;
    text-shadow: 
        0 0 10px rgba(212, 175, 55, 0.8),
        0 0 20px rgba(212, 175, 55, 0.6),
        0 0 30px rgba(212, 175, 55, 0.4),
        0 4px 6px rgba(0, 0, 0, 0.9);
    letter-spacing: 3px;
    animation: titleGlow 3s ease-in-out infinite;
}

.game-subtitle {
    font-size: 1.3em;
    color: #e74c3c;
    font-weight: 600;
    margin-top: 10px;
    text-shadow: 
        0 0 8px rgba(231, 76, 60, 0.6),
        0 2px 4px rgba(0, 0, 0, 0.8);
    letter-spacing: 2px;
}

@keyframes titleGlow {
    0%, 100% {
        text-shadow: 
            0 0 10px rgba(212, 175, 55, 0.8),
            0 0 20px rgba(212, 175, 55, 0.6),
            0 0 30px rgba(212, 175, 55, 0.4),
            0 4px 6px rgba(0, 0, 0, 0.9);
    }
    50% {
        text-shadow: 
            0 0 20px rgba(212, 175, 55, 1),
            0 0 40px rgba(212, 175, 55, 0.8),
            0 0 60px rgba(212, 175, 55, 0.6),
            0 4px 6px rgba(0, 0, 0, 0.9);
    }
}

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

/* Auth Box */
.auth-box {
    background: rgba(0, 0, 0, 0.85);
    border: 2px solid rgba(139, 0, 0, 0.6);
    border-radius: 12px;
    padding: 40px;
    width: 100%;
    max-width: 450px;
    box-shadow: 
        0 0 20px rgba(139, 0, 0, 0.5),
        0 0 40px rgba(139, 0, 0, 0.3),
        inset 0 0 60px rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    animation: fadeInUp 1s ease-out 0.3s backwards, boxGlow 4s ease-in-out infinite;
}

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

@keyframes boxGlow {
    0%, 100% {
        border-color: rgba(139, 0, 0, 0.6);
        box-shadow: 
            0 0 20px rgba(139, 0, 0, 0.5),
            0 0 40px rgba(139, 0, 0, 0.3),
            inset 0 0 60px rgba(0, 0, 0, 0.8);
    }
    50% {
        border-color: rgba(212, 175, 55, 0.8);
        box-shadow: 
            0 0 30px rgba(212, 175, 55, 0.6),
            0 0 60px rgba(139, 0, 0, 0.5),
            inset 0 0 60px rgba(0, 0, 0, 0.8);
    }
}

/* Form */
.auth-form {
    animation: fadeIn 0.5s ease-out;
}

.auth-form.hidden {
    display: none;
}

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

.form-title {
    color: #d4af37;
    font-size: 2em;
    font-weight: 700;
    text-align: center;
    margin-bottom: 30px;
    text-shadow: 
        0 0 10px rgba(212, 175, 55, 0.6),
        0 2px 4px rgba(0, 0, 0, 0.8);
}

/* Input Groups */
.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    color: #f7e9b3;
    font-size: 0.95em;
    font-weight: 600;
    margin-bottom: 8px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.auth-input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid rgba(139, 0, 0, 0.4);
    border-radius: 6px;
    color: #f7e9b3;
    font-family: 'Cairo', sans-serif;
    font-size: 1em;
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.6);
}

.auth-input:focus {
    outline: none;
    border-color: #d4af37;
    box-shadow: 
        0 0 15px rgba(212, 175, 55, 0.5),
        inset 0 2px 4px rgba(0, 0, 0, 0.6);
    background: rgba(0, 0, 0, 0.8);
}

.auth-input::placeholder {
    color: rgba(247, 233, 179, 0.4);
}

/* Buttons */
.auth-btn {
    width: 100%;
    padding: 14px;
    font-family: 'Cairo', sans-serif;
    font-size: 1.1em;
    font-weight: 700;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.primary-btn {
    background: linear-gradient(135deg, #8b0000 0%, #c0392b 100%);
    color: #f7e9b3;
    border: 2px solid rgba(139, 0, 0, 0.6);
    box-shadow: 
        0 0 15px rgba(139, 0, 0, 0.5),
        inset 0 2px 10px rgba(255, 255, 255, 0.1);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

.primary-btn:hover {
    background: linear-gradient(135deg, #a00000 0%, #e74c3c 100%);
    border-color: #d4af37;
    box-shadow: 
        0 0 25px rgba(212, 175, 55, 0.6),
        0 0 40px rgba(139, 0, 0, 0.4),
        inset 0 2px 10px rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

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

/* Button Glow Effect */
.btn-glow {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.primary-btn:hover .btn-glow {
    left: 100%;
}

/* Google Button */
.google-btn {
    background: #ffffff;
    color: #333;
    border: 2px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
}

.google-btn:hover {
    background: #f8f8f8;
    border-color: #d4af37;
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
    transform: translateY(-2px);
}

.google-icon {
    width: 24px;
    height: 24px;
}

/* Divider */
.divider {
    display: flex;
    align-items: center;
    margin: 25px 0;
    color: #888;
    font-size: 0.9em;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(139, 0, 0, 0.5), transparent);
}

.divider span {
    padding: 0 15px;
    color: #888;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

/* Switch Text */
.switch-text {
    text-align: center;
    margin-top: 25px;
    color: #aaa;
    font-size: 0.95em;
}

.switch-link {
    color: #d4af37;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    text-shadow: 0 0 5px rgba(212, 175, 55, 0.3);
}

.switch-link:hover {
    color: #f1c40f;
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.6);
}

/* Footer */
.login-footer {
    position: absolute;
    bottom: 20px;
    text-align: center;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.85em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

/* Responsive */
@media (max-width: 600px) {
    .game-title {
        font-size: 2.5em;
    }
    
    .game-subtitle {
        font-size: 1em;
    }
    
    .auth-box {
        padding: 30px 20px;
    }
    
    .form-title {
        font-size: 1.5em;
    }
}

/* Loading Animation (Optional) */
.loading {
    pointer-events: none;
    opacity: 0.6;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 4px solid rgba(212, 175, 55, 0.3);
    border-top-color: #d4af37;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}
