/* Reset y estilos base para login */
.login-page-wrapper {
    display: flex;
    height: 100vh;
    background: #ffffff;
    position: relative;
    overflow: hidden;
    font-family: 'Segoe UI', sans-serif;
}

.login-left {
    flex: 0 0 60%;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 50%, #1a1a1a 100%);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.login-left::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.03)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    pointer-events: none;
    z-index: 1;
}

.login-left::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 150%;
    height: 150%;
    background: radial-gradient(circle, rgba(227, 179, 42, 0.15) 0%, transparent 60%);
    pointer-events: none;
    z-index: 1;
}

.login-right {
    flex: 0 0 40%;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
    z-index: 10;
    overflow-y: auto;
    flex-direction: column;
}

.swipe-indicator {
    display: none;
    position: absolute;
    bottom: 160px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(227, 179, 42, 0.15);
    border: 1px solid rgba(227, 179, 42, 0.5);
    color: #ffd700;
    font-weight: 600;
    font-size: 0.85rem;
    padding: 0.45rem 1rem;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    box-shadow: 0 0 12px rgba(227, 179, 42, 0.3);
    backdrop-filter: blur(6px);
    opacity: 0.95;
    cursor: pointer;
    user-select: none;
    transition: all 0.3s ease;
    animation: glow-bounce 2s infinite;
    z-index: 15;
    appearance: none;
}

.swipe-indicator:hover {
    background: rgba(227, 179, 42, 0.35);
    box-shadow: 0 0 20px rgba(227, 179, 42, 0.6);
    transform: translateX(-50%) scale(1.05);
}

.swipe-indicator:focus-visible {
    outline: 2px solid #ffd700;
    outline-offset: 4px;
}

@keyframes glow-bounce {
    0%, 100% {
        transform: translate(-50%, 0);
        box-shadow: 0 0 10px rgba(227, 179, 42, 0.4);
    }
    50% {
        transform: translate(-50%, -8px);
        box-shadow: 0 0 20px rgba(227, 179, 42, 0.8);
    }
}

@media (max-width: 768px) {
    .swipe-indicator {
        display: block;
    }
}

#spaceGame {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    touch-action: none;
}

.brand-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 10;
    pointer-events: none;
    max-width: 90%;
}

.brand-logo {
    max-height: 280px;
    margin-bottom: 1.5rem;
    transition: transform 0.3s ease;
    pointer-events: auto;
}

.brand-content:hover .brand-logo {
    transform: scale(1.08);
}

.credits {
    color: #999;
    font-size: 0.85rem;
    pointer-events: auto;
}

#scoreDisplay {
    position: absolute;
    top: 1rem;
    left: 1rem;
    color: #e3b32a;
    font-weight: 700;
    font-size: 1.4rem;
    z-index: 11;
    text-shadow: 0 0 10px rgba(227, 179, 42, 0.6);
    font-family: 'Courier New', monospace;
}

#gameOver {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.9);
    color: #e3b32a;
    padding: 2rem 3rem;
    border: 3px solid #e3b32a;
    border-radius: 15px;
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    z-index: 20;
    display: none;
    box-shadow: 0 0 30px rgba(227, 179, 42, 0.8);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 30px rgba(227, 179, 42, 0.8); }
    50% { box-shadow: 0 0 50px rgba(227, 179, 42, 1); }
    100% { box-shadow: 0 0 30px rgba(227, 179, 42, 0.8); }
}

#restartBtn {
    margin-top: 1rem;
    padding: 0.8rem 2rem;
    background: #e3b32a;
    color: #1a1a1a;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
}

#restartBtn:hover {
    background: #ffd700;
    transform: scale(1.05);
}

.mobile-hint {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(227, 179, 42, 0.25);
    color: #e3b32a;
    padding: 0.6rem 1.2rem;
    border-radius: 25px;
    font-size: 0.85rem;
    z-index: 11;
    pointer-events: none;
    opacity: 0;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(227, 179, 42, 0.4);
}

@media (pointer: coarse) {
    .mobile-hint {
        opacity: 1;
        bottom: 5rem;
    }
}

@media (max-width: 992px) {
    .login-page-wrapper {
        flex-direction: column;
        height: 200vh;
        overflow-y: scroll;
        scroll-snap-type: y mandatory;
    }

    .login-left,
    .login-right {
        flex: 0 0 100vh;
        scroll-snap-align: start;
    }

    .login-left {
        touch-action: pan-y;
        position: relative;
    }

    .login-right {
        justify-content: center;
        padding: 3rem 2rem;
        background: #fff;
        overflow: visible;
        z-index: 20;
    }

    #spaceGame {
        pointer-events: auto;
        touch-action: none;
    }

    .brand-logo {
        max-height: 180px !important;
    }

    #scoreDisplay {
        font-size: 1.2rem;
        top: 0.8rem;
        left: 0.8rem;
    }
}

@media (max-width: 576px) {
    .brand-logo {
        max-height: 140px;
    }

    .mobile-hint {
        font-size: 0.75rem;
        padding: 0.5rem 1rem;
    }

    #gameOver {
        font-size: 1.5rem;
        padding: 1.5rem;
    }
}

.language-top {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 10;
}

.language-top a {
    font-size: 0.9rem;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    color: #6c757d;
    text-decoration: none;
}

.language-top a:hover {
    background: rgba(227, 179, 42, 0.1);
    color: #1a1a1a;
}

.language-top a.fw-bold {
    color: #1a1a1a;
    background: rgba(227, 179, 42, 0.15);
}

.login-container {
    width: 100%;
    max-width: 430px;
}

.form-title {
    color: #1a1a1a;
    font-weight: 600;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.form-subtitle {
    color: #6c757d;
    font-size: 0.95rem;
    margin-bottom: 2rem;
    line-height: 1.5;
}

.form-control {
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 0.6rem 0.8rem;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    background: #fff;
    height: auto;
}

.form-control:focus {
    border-color: #e3b32a;
    box-shadow: 0 0 0 2px rgba(227, 179, 42, 0.1);
}

.password-toggle-wrap {
    cursor: pointer;
    z-index: 5;
}

.btn-primary {
    background: linear-gradient(135deg, #e3b32a 0%, #d4a017 100%);
    border: none;
    border-radius: 6px;
    padding: 0.6rem 1.5rem;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    width: 100%;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(227, 179, 42, 0.3);
}

.alert-danger {
    background: rgba(220, 53, 69, 0.08);
    color: #dc3545;
    border: 1px solid rgba(220, 53, 69, 0.2);
    border-radius: 6px;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
}

.recaptcha-footer {
    position: absolute;
    bottom: 1rem;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 0.75rem;
    color: #6c757d;
    padding: 0 2rem;
    line-height: 1.4;
    opacity: 0.2;
    transition: opacity 0.3s ease;
}

.recaptcha-footer a {
    color: #6c757d;
    text-decoration: underline;
}

.recaptcha-footer a:hover {
    color: #1a1a1a;
}

.recaptcha-footer:hover,
.grecaptcha-badge:hover {
    opacity: 0.8 !important;
}

.grecaptcha-badge {
    opacity: 0.2 !important;
    transition: opacity 0.3s ease !important;
    pointer-events: none;
}

.grecaptcha-badge > div {
    opacity: 0.2 !important;
}

.btn-back {
    background: transparent;
    border: 2px solid rgba(26, 26, 26, 0.12);
    color: rgba(26, 26, 26, 0.72);
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    border-radius: 6px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.btn-back:hover {
    background: rgba(26, 26, 26, 0.05);
    border-color: rgba(26, 26, 26, 0.2);
    color: rgba(26, 26, 26, 0.92);
    transform: translateY(-2px);
}

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

@media (max-width: 768px) {
    .btn-back {
        font-size: 12px;
        padding: 6px 12px;
        width: 100%;
        display: flex;
    }

    .mt-3.text-end {
        text-align: center !important;
    }
}
