/* ========================================
   MULTI-STEP ONBOARDING LANDING PAGE
   Mobile-First with Character Showcase
   ======================================== */

/* ===== BASE LANDING PAGE ===== */
.landing-page {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    height: 100dvh;
    overflow: hidden;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    /* Center the container */
    padding: var(--safe-area-inset-bottom) 0;
}

/* Responsive Background - Mobile First */
.landing-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../assets/landing_mobile.jpg') center/cover no-repeat;
    z-index: -2;
}

.landing-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg,
            rgba(18, 8, 31, 0.85) 0%,
            rgba(38, 18, 61, 0.75) 50%,
            rgba(18, 8, 31, 0.9) 100%);
    z-index: -1;
}

/* === HIDE GLOBAL ELEMENTS ON ONBOARDING === */
.landing-page-active #globalBottomNav,
.landing-page-active .bottom-nav,
body.landing-page-active #globalBottomNav,
body.landing-page-active .bottom-nav {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Also hide bottom nav when class selection is visible (before registration) */
.class-selection:not(.hidden)~#globalBottomNav,
#classSelection:not(.hidden)~#globalBottomNav {
    display: none !important;
}

/* === ONBOARDING ROOT === */
.onboarding-container {
    width: 95%;
    max-width: 500px;
    height: 90%;
    max-height: 800px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    /* Space content and nav */
    padding: 2rem 0.5rem;
    position: relative;
    z-index: 2;
}

/* ===== STEP CONTENT ===== */
.onboarding-step {
    width: 100%;
    flex: 1;
    display: none;
    opacity: 0;
    animation: fadeOut 0.3s ease-out;
}

.onboarding-step.active {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }

    to {
        opacity: 0;
        transform: translateY(-30px);
    }
}

.step-content {
    text-align: center;
    padding: 1.25rem;
    /* Tighter padding for mobile */
    background: linear-gradient(135deg,
            rgba(18, 8, 31, 0.95),
            rgba(38, 18, 61, 0.9));
    border: 2px solid rgba(218, 165, 32, 0.6);
    border-radius: 20px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.8),
        0 0 40px rgba(138, 43, 226, 0.4);
    width: 100%;
    max-width: 440px;
}

/* Logo */
.game-logo {
    width: 90%;
    max-width: 400px;
    height: auto;
    margin: 0 auto 1.5rem;
    display: block;
    filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.6)) drop-shadow(0 0 40px rgba(255, 165, 0, 0.4));
    animation: logoGlow 3s ease-in-out infinite;
}

@keyframes logoGlow {

    0%,
    100% {
        filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.6)) drop-shadow(0 0 40px rgba(255, 165, 0, 0.4));
    }

    50% {
        filter: drop-shadow(0 0 30px rgba(255, 215, 0, 0.9)) drop-shadow(0 0 60px rgba(255, 165, 0, 0.6));
    }
}

/* Typography */
.onboarding-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.5rem;
    font-weight: 900;
    color: #FFD700;
    text-shadow:
        0 0 20px rgba(255, 215, 0, 0.8),
        0 0 40px rgba(255, 215, 0, 0.4);
    margin-bottom: 0.5rem;
    letter-spacing: 0.1em;
}

.onboarding-subtitle {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.5rem;
    color: #B224EF;
    text-shadow: 0 0 15px rgba(178, 36, 239, 0.8);
    margin-bottom: 2rem;
    letter-spacing: 0.08em;
}

.step-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 2rem;
    font-weight: 900;
    color: #FFD700;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.8);
    margin-bottom: 1.5rem;
}

.onboarding-text {
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.1rem;
    line-height: 1.8;
    color: #e0e0e0;
    margin-bottom: 1rem;
}

.onboarding-text.large {
    font-size: 1.3rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 1.5rem;
}

/* ===== FEATURES GRID (Step 2) ===== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    /* 2x2 grid on mobile */
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.feature-item {
    text-align: center;
    padding: 1rem 0.5rem;
    background: linear-gradient(135deg,
            rgba(75, 0, 130, 0.5),
            rgba(138, 43, 226, 0.3));
    border: 1px solid rgba(218, 165, 32, 0.4);
    border-radius: 15px;
    transition: all 0.3s ease;
}

.feature-item:hover {
    border-color: rgba(218, 165, 32, 0.8);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(138, 43, 226, 0.6);
}

.feature-icon-wrapper {
    width: 64px;
    height: 64px;
    margin: 0 auto 0.75rem;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-icon-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.4));
    transition: all 0.3s ease;
}

.feature-item:hover .feature-icon-wrapper img {
    transform: scale(1.1);
    filter: drop-shadow(0 0 15px rgba(255, 215, 0, 0.7));
}

.feature-item h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.85rem;
    color: #FFD700;
    margin-bottom: 0.25rem;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.feature-item p {
    font-size: 0.7rem;
    color: #c0c0c0;
    line-height: 1.3;
}

/* === NPC PREVIEW GRID (Step 3) === */
.npc-preview-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-top: 1rem;
}

.npc-preview-card {
    padding: 0.75rem 0.5rem;
    background: linear-gradient(135deg,
            rgba(30, 30, 50, 0.8),
            rgba(15, 15, 25, 0.9));
    border: 1.5px solid rgba(255, 215, 0, 0.3);
    border-radius: 15px;
    text-align: center;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.npc-preview-card:hover {
    border-color: rgba(255, 215, 0, 0.8);
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(255, 215, 0, 0.2);
}

.npc-peek-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid var(--clr-gold-neon, #FFD700);
    overflow: hidden;
    background: #000;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.npc-peek-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.npc-preview-card h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.85rem;
    color: #FFD700;
    margin: 0;
}

.npc-role {
    font-size: 0.65rem;
    color: #c0c0c0;
    line-height: 1.2;
    margin: 0;
}

/* ===== STEP INDICATORS ===== */
.step-indicators {
    display: flex;
    gap: 1rem;
    margin: 2rem 0;
}

.step-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(218, 165, 32, 0.3);
    border: 2px solid rgba(218, 165, 32, 0.5);
    transition: all 0.3s ease;
    cursor: pointer;
}

.step-dot.active {
    width: 40px;
    border-radius: 10px;
    background: linear-gradient(90deg, #FFD700, #FFA500);
    border-color: #FFD700;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.8);
}

/* ===== NAVIGATION BUTTONS ===== */
.onboarding-nav {
    display: flex;
    gap: 0.75rem;
    width: 100%;
    justify-content: center;
    margin-top: auto;
    padding-bottom: 1rem;
    position: relative;
    z-index: 10001;
    pointer-events: auto;
}

.btn-nav {
    flex: 1;
    max-width: 200px;
    padding: 1rem 2rem;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 56px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    position: relative;
    z-index: 10002;
    pointer-events: auto !important;
}

.btn-back {
    background: linear-gradient(135deg,
            rgba(75, 0, 130, 0.6),
            rgba(138, 43, 226, 0.4));
    border: 2px solid rgba(218, 165, 32, 0.5);
    color: #FFD700;
}

.btn-back:hover {
    background: linear-gradient(135deg,
            rgba(75, 0, 130, 0.8),
            rgba(138, 43, 226, 0.6));
    border-color: rgba(218, 165, 32, 0.8);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(138, 43, 226, 0.6);
}

.btn-next {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    border: 3px solid #FFD700;
    color: #1a0a2e;
    box-shadow:
        0 10px 30px rgba(255, 215, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.btn-next:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow:
        0 15px 40px rgba(255, 215, 0, 0.8),
        inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.btn-next:active,
.btn-back:active {
    transform: translateY(0) scale(0.98);
}

/* ===== DESKTOP RESPONSIVE ===== */
@media (min-width: 1024px) {

    /* Desktop background */
    .landing-bg {
        background: url('../assets/landing_desktop.jpg') center/cover no-repeat;
    }

    .onboarding-container {
        max-width: 1100px;
        /* Wider for PC */
        height: 85vh;
    }

    .step-content {
        padding: 3rem 4rem;
        border-radius: 40px;
        max-width: 1000px;
        /* Increased to fit 4 columns on PC */
    }

    .game-logo {
        max-width: 600px;
        margin-bottom: 2rem;
    }

    .onboarding-title {
        font-size: 4rem;
    }

    .onboarding-subtitle {
        font-size: 2rem;
    }

    .step-title {
        font-size: 3rem;
    }

    .onboarding-text {
        font-size: 1.3rem;
    }

    .onboarding-text.large {
        font-size: 1.6rem;
    }

    /* Features grid - 2 columns */
    .features-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 1.5rem;
    }

    .feature-item {
        padding: 2rem 1rem;
    }

    .feature-icon-wrapper {
        width: 100px;
        height: 100px;
        margin-bottom: 1.5rem;
    }

    .feature-item h3 {
        font-size: 1.5rem;
    }

    .feature-item p {
        font-size: 1.1rem;
    }

    /* NPC preview - 4 columns */
    .npc-preview-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 1.5rem;
    }

    .npc-peek-avatar {
        width: 100px;
        height: 100px;
    }

    .npc-preview-card h3 {
        font-size: 1.2rem;
    }

    .npc-role {
        font-size: 0.9rem;
    }

    /* Step indicators */
    .step-dot {
        width: 15px;
        height: 15px;
    }

    .step-dot.active {
        width: 50px;
    }

    /* Navigation buttons */
    .btn-nav {
        max-width: 250px;
        padding: 1.2rem 2.5rem;
        font-size: 1.3rem;
    }
}

/* ===== TABLET LANDSCAPE ===== */
@media (min-width: 768px) and (max-width: 1023px) {
    .onboarding-container {
        max-width: 700px;
    }

    .step-content {
        padding: 2.5rem 3rem;
    }

    .onboarding-title {
        font-size: 3rem;
    }

    .step-title {
        font-size: 2.5rem;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .npc-preview-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Keep guide modal styles from old landing.css */
.guide-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(15px);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    animation: fadeIn 0.3s ease-out;
}

.guide-modal-overlay.hidden {
    display: none;
}

.guide-modal {
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    background: linear-gradient(135deg,
            rgba(18, 8, 31, 0.98),
            rgba(38, 18, 61, 0.98));
    border: 3px solid rgba(218, 165, 32, 0.6);
    border-radius: 20px;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.8),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    overflow: hidden;
    animation: modalSlideIn 0.4s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg,
            rgba(75, 0, 130, 0.6),
            rgba(138, 43, 226, 0.4));
    border-bottom: 2px solid rgba(218, 165, 32, 0.4);
}

.modal-title {
    color: #FFD700;
    font-size: 1.8rem;
    font-weight: 900;
    font-family: 'Orbitron', sans-serif;
    margin: 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

.modal-close {
    background: rgba(255, 0, 0, 0.2);
    border: 2px solid rgba(255, 0, 0, 0.5);
    color: #fff;
    font-size: 2rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.modal-close:hover {
    background: rgba(255, 0, 0, 0.5);
    border-color: rgba(255, 0, 0, 0.9);
    transform: rotate(90deg);
}

.modal-body {
    display: flex;
    gap: 1.5rem;
    padding: 2rem;
    max-height: calc(90vh - 100px);
    overflow-y: auto;
}

.modal-npc {
    flex-shrink: 0;
    width: 150px;
    display: none;
}

.modal-npc img {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 0 20px rgba(138, 43, 226, 0.6));
}

.modal-content {
    flex: 1;
    color: #e0e0e0;
    font-family: 'Rajdhani', sans-serif;
    font-size: 1rem;
    line-height: 1.8;
}

.modal-content h3 {
    color: #FFD700;
    font-size: 1.4rem;
    margin-top: 1.5rem;
    margin-bottom: 0.8rem;
    font-weight: 700;
}

.modal-content p {
    margin-bottom: 1rem;
}

.modal-content ul {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.modal-content li {
    margin-bottom: 0.5rem;
}

.modal-content strong {
    color: #FFD700;
}

@media (min-width: 1024px) {
    .modal-npc {
        display: block;
        width: 250px;
    }

    .modal-title {
        font-size: 2.5rem;
    }

    .modal-content {
        font-size: 1.1rem;
        line-height: 2;
    }

    .modal-content h3 {
        font-size: 1.8rem;
    }
}

/* === ACCOUNT SETUP STYLES === */
.account-setup-area {
    margin: 2rem 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    width: 100%;
}

.premium-input {
    width: 80%;
    max-width: 300px;
    padding: 1rem 1.5rem;
    background: rgba(0, 0, 0, 0.4);
    border: 3px solid rgba(255, 215, 0, 0.4);
    border-radius: 12px;
    color: #FFD700;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.25rem;
    text-align: center;
    letter-spacing: 0.1em;
    transition: all 0.3s ease;
}

.premium-input:focus {
    outline: none;
    border-color: #FFD700;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.4);
    background: rgba(0, 0, 0, 0.6);
}

.premium-input::placeholder {
    color: rgba(255, 215, 0, 0.3);
}

.status-online {
    color: #00ff88;
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
    font-weight: bold;
}

.status-offline {
    color: #ff4d4d;
    opacity: 0.7;
}

.sync-status-indicator {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.5rem;
}