/* Design Tokens & Variables */
:root {
    --bg-dark: #08090d;
    --bg-card: rgba(17, 19, 30, 0.85);
    --bg-card-hover: rgba(25, 28, 45, 0.95);
    --border-color: rgba(255, 255, 255, 0.08);
    --primary-neon: #00f0ff;
    --primary-glow: rgba(0, 240, 255, 0.35);
    --secondary-neon: #ff007f;
    --secondary-glow: rgba(255, 0, 127, 0.35);
    --accent-green: #39ff14;
    --text-main: #f0f3ff;
    --text-muted: #8c94b5;
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Outfit', sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --header-height: 60px;
}

/* Global Reset */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Typography & Links */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    letter-spacing: -0.02em;
    font-weight: 700;
}

a {
    color: inherit;
    text-decoration: none;
}

/* Scrollbar Customization */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary-neon);
}

/* Header & Sticky Integrated HUD Bar */
.header {
    height: var(--header-height);
    background: rgba(8, 9, 13, 0.85);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.logo {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.35rem;
    letter-spacing: 0.05em;
    color: #fff;
    white-space: nowrap;
}

.logo-accent {
    color: var(--primary-neon);
    text-shadow: 0 0 10px var(--primary-glow);
}

/* HUD Version Switcher Tabs */
.version-tabs {
    display: inline-flex;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    padding: 4px;
    border-radius: 30px;
    gap: 4px;
}

.tab-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 6px 18px;
    border-radius: 20px;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
    white-space: nowrap;
}

.tab-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.04);
}

.tab-btn.active {
    color: #fff;
    background: rgba(0, 240, 255, 0.12);
    box-shadow: inset 0 0 0 1px var(--primary-neon);
}

.tab-btn:nth-child(2).active {
    background: rgba(255, 0, 127, 0.12);
    box-shadow: inset 0 0 0 1px var(--secondary-neon);
}

.tab-indicator {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--text-muted);
    display: inline-block;
    transition: var(--transition);
}

.tab-btn.active .tab-indicator {
    background: var(--primary-neon);
    box-shadow: 0 0 6px var(--primary-neon);
}

.tab-btn:nth-child(2).active .tab-indicator {
    background: var(--secondary-neon);
    box-shadow: 0 0 6px var(--secondary-neon);
}

/* Controls & Anchors Group */
.controls-group {
    display: flex;
    align-items: center;
    gap: 16px;
}

.btn-hud-action {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    padding: 0;
}

.btn-hud-action:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
}

#fullscreenBtn:hover {
    color: var(--primary-neon);
    box-shadow: 0 0 10px var(--primary-glow);
    border-color: var(--primary-neon);
}

/* Navigation Dots for Guides */
.nav-shortcuts {
    display: flex;
    gap: 8px;
    border-left: 1px solid var(--border-color);
    padding-left: 16px;
}

.nav-dot {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    transition: var(--transition);
    white-space: nowrap;
}

.nav-dot:hover, .nav-dot.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--primary-neon);
    box-shadow: 0 0 8px rgba(0, 240, 255, 0.1);
}

/* 100% Game Viewport Section (First Fold) */
.game-viewport {
    position: relative;
    width: 100%;
    height: calc(100vh - var(--header-height));
    margin-top: var(--header-height);
    background: #000;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.8);
}

.game-viewport iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* Scroll Down Overlay Helper */
.scroll-down-helper {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: #fff;
    background: rgba(8, 9, 13, 0.65);
    padding: 8px 16px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
    pointer-events: none;
    z-index: 5;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    transition: opacity 0.5s ease;
}

.scroll-down-helper.hidden {
    opacity: 0;
}

.pulse-text {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    animation: textPulse 2s ease-in-out infinite;
    color: var(--text-main);
    opacity: 0.8;
}

.bounce-arrow {
    font-size: 1.1rem;
    font-weight: 800;
    animation: arrowBounce 1.5s infinite;
    color: var(--primary-neon);
}

/* Loading Overlay in Game Viewport */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #090a0f;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;
    transition: opacity 0.5s ease;
}

.loading-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.spinner {
    width: 44px;
    height: 44px;
    border: 3px solid rgba(0, 240, 255, 0.05);
    border-radius: 50%;
    border-top-color: var(--primary-neon);
    animation: spin 1s linear infinite;
    margin-bottom: 12px;
    box-shadow: 0 0 15px var(--primary-glow);
}

.loading-overlay p {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-family: var(--font-heading);
    letter-spacing: 0.05em;
    animation: pulse 1.5s ease-in-out infinite;
}

/* Second Fold Content Container */
.main-content-container {
    max-width: 1200px;
    margin: 40px auto 60px;
    padding: 0 24px;
}

/* Tips Ticker Banner */
.tips-ticker {
    background: rgba(255, 0, 127, 0.05);
    border: 1px solid rgba(255, 0, 127, 0.12);
    border-radius: 8px;
    padding: 10px 20px;
    margin-bottom: 30px;
    overflow: hidden;
    position: relative;
}

.ticker-content {
    display: flex;
    gap: 50px;
    white-space: nowrap;
    animation: ticker 25s linear infinite;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-main);
}

.ticker-content:hover {
    animation-play-state: paused;
}

/* Wiki / SEO Content Grid */
.wiki-content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.wiki-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 30px;
    transition: var(--transition);
}

.wiki-card:hover {
    border-color: rgba(255, 255, 255, 0.12);
    background: var(--bg-card-hover);
}

.wiki-card.full-width {
    grid-column: span 2;
}

.card-header {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 16px;
    margin-bottom: 20px;
}

.card-header h2 {
    font-size: 1.4rem;
    color: #fff;
}

.section-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 20px;
}

/* Controls Table Style */
.controls-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.controls-table th, .controls-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.92rem;
}

.controls-table th {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
}

.controls-table td strong {
    color: #fff;
}

kbd {
    background-color: #2b2e3f;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-bottom-width: 3px;
    border-radius: 4px;
    color: #fff;
    display: inline-block;
    font-family: monospace;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 2px 6px;
    margin: 0 2px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.tip-box {
    background: rgba(0, 240, 255, 0.05);
    border-left: 4px solid var(--primary-neon);
    padding: 16px;
    border-radius: 0 8px 8px 0;
    font-size: 0.92rem;
    color: var(--text-main);
}

/* Walkthrough Stepper */
.walkthrough-steps {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.walkthrough-steps li {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.step-badge {
    background: rgba(255, 255, 255, 0.05);
    color: var(--primary-neon);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.8rem;
    padding: 4px 10px;
    border-radius: 12px;
    border: 1px solid rgba(0, 240, 255, 0.3);
    white-space: nowrap;
}

.walkthrough-steps li:nth-child(even) .step-badge {
    color: var(--secondary-neon);
    border-color: rgba(255, 0, 127, 0.3);
}

.step-text h3 {
    font-size: 1.05rem;
    color: #fff;
    margin-bottom: 4px;
}

.step-text p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Shortcuts Grid */
.shortcuts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.shortcut-item {
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 24px;
    position: relative;
    transition: var(--transition);
}

.shortcut-item:hover {
    border-color: rgba(0, 240, 255, 0.15);
    background: rgba(0, 240, 255, 0.02);
}

.shortcut-num {
    position: absolute;
    top: 16px;
    right: 20px;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.03);
    transition: var(--transition);
}

.shortcut-item:hover .shortcut-num {
    color: rgba(0, 240, 255, 0.08);
}

.shortcut-item h3 {
    font-size: 1.1rem;
    color: #fff;
    margin-bottom: 8px;
}

.shortcut-item p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* FAQ Accordion */
.faq-accordion {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.faq-item {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 16px;
}

.faq-item h3 {
    font-size: 1.05rem;
    color: #fff;
    cursor: pointer;
    position: relative;
    padding-right: 24px;
    margin-bottom: 8px;
}

.faq-item h3::after {
    content: '+';
    position: absolute;
    right: 0;
    color: var(--text-muted);
    font-size: 1.1rem;
}

.faq-answer p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Footer Section */
.footer {
    border-top: 1px solid var(--border-color);
    background: #050609;
    padding: 30px 24px;
    text-align: center;
    margin-top: 60px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
}

.footer p {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.footer-sub {
    font-size: 0.72rem !important;
    opacity: 0.6;
}

/* Keyframe Animations */
@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

@keyframes textPulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

@keyframes arrowBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(6px); }
}

@keyframes ticker {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Responsive Media Queries */
@media (max-width: 990px) {
    .header-container {
        padding: 0 16px;
    }
    
    .nav-shortcuts {
        display: none; /* Hide anchor links on small screens to save space */
    }
    
    .wiki-content-grid {
        grid-template-columns: 1fr;
    }
    
    .wiki-card.full-width {
        grid-column: span 1;
    }
}

@media (max-width: 600px) {
    .header-container {
        gap: 8px;
    }
    .logo {
        font-size: 1.15rem;
    }
    .tab-btn {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
    .controls-group {
        gap: 8px;
    }
}

/* Optimized layout when the site is embedded inside an external iframe (removes scrollbars and clutter) */
.is-embedded .main-content-container,
.is-embedded .footer,
.is-embedded .scroll-down-helper {
    display: none !important;
}

.is-embedded body {
    overflow: hidden !important;
}

.is-embedded .game-viewport {
    height: calc(100vh - var(--header-height)) !important;
    box-shadow: none !important;
}

/* Option to completely hide the header for a clean full-viewport game embed */
.hide-header .header {
    display: none !important;
}

.hide-header .game-viewport {
    height: 100vh !important;
    margin-top: 0 !important;
}
