/* Auth Game Theme - Glassmorphism Design */

/* CSS Variables */
:root {
    --auth-bg-dark: #1a103c;
    --auth-bg-gradient: linear-gradient(135deg, #1a103c 0%, #2d1b5e 50%, #1a103c 100%);
    --card-bg: rgba(255, 255, 255, 0.1);
    --card-border: rgba(255, 255, 255, 0.2);
    --card-glow: rgba(255, 107, 53, 0.3);
    --input-border: #00d4ff;
    --input-glow: rgba(0, 212, 255, 0.5);
    --btn-primary: #ff6b35;
    --btn-primary-hover: #ff8555;
    --text-light: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.7);
    --neon-orange: #ff6b35;
    --neon-cyan: #00d4ff;
    --neon-pink: #ff00ff;
}

/* Body & Background */
.auth-game-page {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background: #0d0d1a;
    font-family: 'Montserrat', sans-serif;
    overflow-x: hidden;
    position: relative;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   BACKGROUND (Lobby mirror)
   ═══════════════════════════════════════════════════════════════════════════════ */
.checkout-background {
    position: fixed;
    inset: 0;
    background-image: url('../images/background.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0;
}

.checkout-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 6, 25, 0.55);
    z-index: 1;
    pointer-events: none;
    box-shadow: inset 0 0 120px 40px rgba(5, 3, 15, 0.5);
}

/* Stars */
.checkout-background .star {
    position: absolute;
    background: white;
    border-radius: 50%;
    animation: checkoutTwinkle 3s ease-in-out infinite;
}

.checkout-background .star-1 {
    width: 3px;
    height: 3px;
    top: 10%;
    left: 20%;
    animation-delay: 0s;
}

.checkout-background .star-2 {
    width: 2px;
    height: 2px;
    top: 25%;
    left: 80%;
    animation-delay: 0.5s;
}

.checkout-background .star-3 {
    width: 4px;
    height: 4px;
    top: 60%;
    left: 15%;
    animation-delay: 1s;
}

.checkout-background .star-4 {
    width: 2px;
    height: 2px;
    top: 80%;
    left: 70%;
    animation-delay: 1.5s;
}

.checkout-background .star-5 {
    width: 3px;
    height: 3px;
    top: 40%;
    left: 90%;
    animation-delay: 2s;
}

@keyframes checkoutTwinkle {

    0%,
    100% {
        opacity: 0.3;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.2);
        box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
    }
}

/* Animated Background Container */
.auth-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    /* Stay above starry background but below panel */
    overflow: hidden;
    mask-image: radial-gradient(ellipse at center, transparent 15%, black 60%);
    -webkit-mask-image: radial-gradient(ellipse at center, transparent 15%, black 60%);
}

/* Aurora Lights */
.aurora-light {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.15;
    z-index: 0;
}

.aurora-light-1 {
    width: 600px;
    height: 600px;
    background: rgba(120, 90, 255, 0.4);
    top: -100px;
    left: -100px;
}

.aurora-light-2 {
    width: 500px;
    height: 500px;
    background: rgba(0, 212, 255, 0.3);
    bottom: -50px;
    right: -100px;
}

/* Floating Emojis - bottom to top like voting page */
.auth-floaters {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}

.auth-float {
    position: absolute;
    font-size: 3.2rem;
    opacity: 0.3;
    animation: authFloat linear infinite;
    animation-fill-mode: both;
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.2));
}

@keyframes authFloat {
    0% {
        transform: translateY(110vh) rotate(0deg) scale(0.8);
        opacity: 0;
    }

    10% {
        opacity: 0.3;
    }

    90% {
        opacity: 0.3;
    }

    100% {
        transform: translateY(-10vh) rotate(360deg) scale(1.1);
        opacity: 0;
    }
}

/* Icon Bubbles - Exclamation and Question */
.icon-bubble {
    position: absolute;
    font-size: 2rem;
    background: white;
    border-radius: 12px;
    padding: 6px 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    animation: bubbleFloat 10s ease-in-out infinite;
    z-index: 1;
    opacity: 0.15;
    filter: blur(1px);
}

.bubble-exclamation {
    top: 30%;
    right: 20%;
    animation-delay: 2s;
    color: #ff4444;
}

.bubble-question {
    bottom: 55%;
    left: 15%;
    animation-delay: 5s;
    color: #ff8800;
}

.icon-bubble::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 8px 6px 0;
    border-style: solid;
    border-color: white transparent transparent;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    25% {
        transform: translateY(-20px) rotate(5deg);
    }

    50% {
        transform: translateY(-10px) rotate(-5deg);
    }

    75% {
        transform: translateY(-25px) rotate(3deg);
    }
}

/* Speech Bubbles */
.speech-bubble {
    position: absolute;
    background: rgba(255, 255, 255, 0.9);
    color: #1a103c;
    padding: 0.6rem 1.2rem;
    border-radius: 15px;
    font-weight: 700;
    font-size: 1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    animation: bubbleFloat 10s ease-in-out infinite;
    opacity: 0.15;
    filter: blur(1px);
}

.speech-bubble::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 10px 10px 0;
    border-style: solid;
    border-color: rgba(255, 255, 255, 0.9) transparent transparent;
}

.bubble-1 {
    top: 3%;
    left: 15%;
    animation-delay: 0s;
}

.bubble-2 {
    top: 8%;
    right: 12%;
    animation-delay: 1.5s;
}

.bubble-3 {
    top: 20%;
    left: 5%;
    animation-delay: 3s;
}

.bubble-4 {
    top: 35%;
    right: 8%;
    animation-delay: 4.5s;
}

.bubble-5 {
    bottom: 40%;
    left: 12%;
    animation-delay: 6s;
}

.bubble-6 {
    top: 50%;
    right: 15%;
    animation-delay: 7.5s;
}

.bubble-7 {
    bottom: 15%;
    right: 8%;
    animation-delay: 9s;
}

.bubble-8 {
    bottom: 25%;
    left: 18%;
    animation-delay: 2s;
}

@keyframes bubbleFloat {

    0%,
    100% {
        transform: translateY(0) scale(1);
    }

    50% {
        transform: translateY(-15px) scale(1.05);
    }
}

/* Main Container */
.auth-game-container {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

/* Card Wrapper */
.auth-card-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 420px;
    position: relative;
}

/* Logo Container */
.auth-logo-container {
    margin-bottom: 1rem;
    text-align: center;
    z-index: 2;
}

.auth-logo-img {
    max-width: 200px;
    height: auto;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.3));
}

/* Auth Content - Card */
.auth-content {
    position: relative;
    width: 440px;
    padding: 36px 44px 36px;
    border-radius: 26px;
    overflow: visible;
    background: rgba(20, 14, 40, 0.7);
    backdrop-filter: blur(16px) saturate(1.2);
    -webkit-backdrop-filter: blur(16px) saturate(1.2);
    border: 1px solid rgba(120, 90, 255, 0.3);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
    z-index: 10;
}

.auth-content:hover {
    border-color: rgba(0, 212, 255, 0.4);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7), 0 0 15px rgba(120, 90, 255, 0.15);
}

/* Mascot */
.auth-maskot {
    position: absolute;
    right: -123px;
    top: 250px;
    width: 130px;
    height: auto;
    z-index: -1;
    filter: drop-shadow(-10px 10px 15px rgba(0, 0, 0, 0.5));
}

@keyframes mascotBounce {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-10px) rotate(2deg);
    }
}

/* Auth Card Inner */
.auth-card {
    width: 100%;
}

/* Logo inside Card */
.auth-logo {
    text-align: center;
    margin-bottom: 1.5rem;
}

.auth-logo img {
    max-width: 350px;
    height: auto;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.3));
}

/* Tabs */
.auth-tabs {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid rgba(120, 90, 255, 0.2);
    padding-bottom: 0.5rem;
}

.auth-tab {
    color: rgba(232, 228, 248, 0.5);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    padding: 0.5rem 1rem;
    position: relative;
    transition: all 0.3s ease;
}

.auth-tab:hover {
    color: rgba(232, 228, 248, 0.8);
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.2);
}

.auth-tab.active {
    color: #3ddcff;
    text-shadow: 0 0 12px rgba(61, 220, 255, 0.6);
}

.auth-tab.active::after {
    content: '';
    position: absolute;
    bottom: -0.6rem;
    left: 0;
    right: 0;
    height: 3px;
    background: #3ddcff;
    border-radius: 2px;
    box-shadow: 0 0 12px #3ddcff;
}

/* Form Styles */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 0.5rem;
}

.form-label {
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 500;
}

/* Neon Input */
.auth-input {
    width: 100%;
    padding: 0.85rem 1rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(120, 90, 255, 0.3);
    border-radius: 12px;
    color: #ffffff;
    font-size: 1rem;
    font-family: 'Montserrat', sans-serif;
    transition: all 0.25s ease;
}

.auth-input::placeholder {
    color: rgba(255, 255, 255, 0.25);
    font-weight: 100;
}

.auth-input:focus,
.auth-input:hover {
    outline: none;
    background: rgba(0, 0, 0, 0.3);
    border-color: #3ddcff;
    box-shadow: 0 0 15px rgba(61, 220, 255, 0.3), inset 0 0 10px rgba(0, 212, 255, 0.05);
}

.auth-input.is-invalid {
    border-color: #ff4444;
    box-shadow: 0 0 10px rgba(255, 68, 68, 0.3);
}

/* Password Wrapper */
.password-wrapper {
    position: relative;
}

.password-wrapper .auth-input {
    padding-right: 3rem;
}

.password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.password-toggle:hover {
    color: var(--text-light);
}

.password-toggle svg {
    width: 1.25rem;
    height: 1.25rem;
}

/* Form Error */
.form-error {
    color: #ff6b6b;
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

/* Form Options Row */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
}

/* Checkbox */
.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.checkbox {
    width: 18px;
    height: 18px;
    accent-color: var(--neon-orange);
    cursor: pointer;
}

.checkbox-label {
    color: var(--text-muted);
    font-size: 0.875rem;
    cursor: pointer;
}

/* Forgot Password Link */
.forgot-password {
    color: var(--neon-cyan);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
}

.forgot-password:hover {
    color: var(--text-light);
    text-shadow: 0 0 10px var(--neon-cyan);
}

/* Play Now Button */
.btn-play-now {
    width: 100%;
    padding: 1.1rem 2rem;
    background: linear-gradient(180deg, #ff7a18 0%, #ff3d00 100%);
    border: 1px solid rgba(255, 122, 24, 0.8);
    border-radius: 14px;
    color: white;
    font-family: 'Montserrat', sans-serif;
    font-size: 1.15rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 15px rgba(255, 61, 0, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.5rem;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-play-now::before {
    content: '';
    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;
}

.btn-play-now:hover {
    background: linear-gradient(180deg, #ff8c33 0%, #ff521a 100%);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 0 12px rgba(255, 120, 40, 0.35), 0 6px 20px rgba(255, 61, 0, 0.4);
}

.btn-play-now:hover::before {
    left: 100%;
}

.btn-play-now:active {
    transform: translateY(0) scale(0.97);
    box-shadow: 0 2px 10px rgba(255, 61, 0, 0.4);
}

.btn-play-now:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Atmospheric Text */
.auth-atmosphere-text {
    text-align: center;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.8rem;
    margin-top: 1.5rem;
    font-style: italic;
}

/* Social Login Section */
.social-login {
    margin-top: 1.5rem;
    text-align: center;
}

.social-divider {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 1rem;
    position: relative;
}

.social-divider::before,
.social-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 80px;
    height: 1px;
    background: rgba(255, 255, 255, 0.2);
}

.social-divider::before {
    left: 0;
}

.social-divider::after {
    right: 0;
}

.social-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.social-btn {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.social-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--neon-cyan);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
    transform: translateY(-2px);
}

.social-btn img {
    width: 24px;
    height: 24px;
}

/* Alert Error */
.alert-error {
    background: rgba(255, 68, 68, 0.15);
    border: 1px solid rgba(255, 68, 68, 0.3);
    border-radius: 10px;
    padding: 1rem;
    color: #ff6b6b;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .auth-game-container {
        padding: 1rem;
    }

    .auth-content {
        padding: 2rem 1.5rem;
    }

    .auth-maskot {
        width: 120px;
        right: -40px;
        top: -40px;
    }

    .auth-logo-img {
        max-width: 160px;
    }

    .floating-emoji {
        font-size: 1.8rem;
    }

    .speech-bubble {
        font-size: 0.75rem;
        padding: 0.4rem 0.8rem;
    }

    .auth-tabs {
        gap: 1.5rem;
    }

    .auth-tab {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .auth-content {
        padding: 1.5rem;
    }

    .auth-maskot {
        width: 100px;
        right: -20px;
        top: -30px;
    }

    .auth-input {
        padding: 0.875rem 1rem;
    }

    .btn-play-now {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
}