/* =============================================
   COMPONENTS.CSS - UI Components Styles
   ============================================= */

/* ---------- Floating Decorations (Speed Lines) ---------- */
.floating-elements {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.speed-lines {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
}

.speed-line {
    position: absolute;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255,107,53,0.4), transparent);
    animation: speedMove 4s linear infinite;
}

/* =============================================
   HEADER / NAV
   ============================================= */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(10, 10, 18, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255,107,53,0.2);
    padding: 0 20px;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 50px;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--neon-orange), var(--neon-yellow));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 0 15px rgba(255,107,53,0.3);
}

.logo-text {
    font-family: 'Orbitron', sans-serif;
    font-weight: 900;
    font-size: 1.2rem;
    background: linear-gradient(135deg, var(--neon-orange), var(--neon-yellow));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 2px;
}

nav.main-nav {
    display: flex;
    gap: 8px;
}

nav.main-nav a {
    color: #888;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s;
    position: relative;
}

nav.main-nav a:hover,
nav.main-nav a.active {
    color: var(--neon-orange);
    background: rgba(255,107,53,0.1);
}

nav.main-nav a.active::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 3px;
    background: var(--neon-orange);
    border-radius: 2px;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
}

/* =============================================
   GAME HERO SECTION
   ============================================= */
.game-hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 80px 0 20px;
    position: relative;
    z-index: 1;
}

.game-container {
    width: 80%;
    max-width: 1100px;
    position: relative;
    padding: 0;
    margin: 0 auto;
}

/* Neon frame + bottom cover: outside frame, bottom aligns with border */
.game-embed-stack {
    display: flex;
    flex-direction: column;
    width: 100%;
    align-items: stretch;
}

/* ---- Game Frame (Gradient Border) ---- */
.game-frame-container {
    position: relative;
    border-radius: 20px;
    padding: 4px;
    background: linear-gradient(135deg, var(--neon-orange), var(--neon-yellow), var(--neon-blue));
    box-shadow:
        0 30px 80px rgba(0, 0, 0, 0.5),
        0 0 60px rgba(255,107,53,0.3);
    animation: frameBorder 4s linear infinite;
}

.game-frame-inner {
    background: var(--dark-bg);
    border-radius: 16px;
    padding: 0;
    position: relative;
    overflow: hidden;
    /* Above .corner-decor so neon corners do not paint over iframe / Skip button */
    z-index: 2;
}

/* ---- Game iframe Container ---- */
.game-frame-wrapper {
    position: relative;
    width: 100%;
    max-width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 10px;
    /* Match Gameflare embed footer bar (+1–2px bleed so no thin edge shows); Skip stays above bar */
    --gameflare-footer-strip-h: 34px;
}

.game-frame-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 10px;
}

/* Single full-width bar: same footprint as iframe bottom chrome, no gap / notch */
.gameflare-mask-bottom {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: var(--gameflare-footer-strip-h);
    background: var(--dark-bg);
    border-radius: 0 0 10px 10px;
    z-index: 10;
    pointer-events: none;
}

/* ---- Bottom Cover: outside neon frame, prevents crop edge + visual closure ---- */
.game-bottom-cover {
    flex-shrink: 0;
    height: 36px;
    margin-left: 12px;
    margin-right: 12px;
    background: var(--dark-bg);
    pointer-events: none;
    border-radius: 0 0 14px 14px;
}

/* ---- Fullscreen: entire stack (frame + cover) enters fullscreen ---- */
.game-embed-stack:fullscreen,
.game-embed-stack:-webkit-full-screen {
    width: 100vw !important;
    height: 100vh !important;
    max-width: 100vw;
    max-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--dark-bg);
}

/* Fullscreen: Remove gradient frame, padding and decorations, game fills viewport */
.game-embed-stack:fullscreen .corner-decor,
.game-embed-stack:-webkit-full-screen .corner-decor {
    display: none;
}

.game-embed-stack:fullscreen .game-frame-container,
.game-embed-stack:-webkit-full-screen .game-frame-container {
    flex: 1 1 auto;
    min-height: 0;
    border-radius: 0;
    padding: 0;
    background: transparent;
    box-shadow: none;
    animation: none;
    display: flex;
    flex-direction: column;
}

.game-embed-stack:fullscreen .game-frame-inner,
.game-embed-stack:-webkit-full-screen .game-frame-inner {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    border-radius: 0;
    padding: 0;
    height: 100%;
    background: var(--dark-bg);
}

.game-embed-stack:fullscreen .game-frame-wrapper,
.game-embed-stack:-webkit-full-screen .game-frame-wrapper {
    flex: 1;
    min-height: 0;
    aspect-ratio: unset;
    width: 100%;
    border-radius: 0;
}

.game-embed-stack:fullscreen .game-frame-wrapper iframe,
.game-embed-stack:-webkit-full-screen .game-frame-wrapper iframe {
    border-radius: 0;
    outline: none;
    box-shadow: none;
    height: 100%;
}

.game-embed-stack:fullscreen .gameflare-mask-bottom,
.game-embed-stack:-webkit-full-screen .gameflare-mask-bottom {
    border-radius: 0;
}

/* .game-bottom-cover removed — bottom crop handled by iframe container padding */

/* ---- Fullscreen Exit Button (inline, since iframe fullscreen hides outer button) ---- */
.fs-exit-inline {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 200;
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-radius: 10px;
    background: rgba(10, 10, 18, 0.85);
    color: #fff;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    backdrop-filter: blur(8px);
}

.fs-exit-inline:hover {
    border-color: var(--neon-orange);
    color: var(--neon-orange);
}

.game-embed-stack:fullscreen .fs-exit-inline,
.game-embed-stack:-webkit-full-screen .fs-exit-inline {
    display: flex;
}

/* ---- Corner Decorations (four corners) ---- */
.corner-decor {
    position: absolute;
    width: 80px;
    height: 80px;
    pointer-events: none;
    /* Below .game-frame-inner so inner content (and Skip) is not covered by neon corners */
    z-index: 1;
}

.corner-decor.top-left {
    top: -5px;
    left: -5px;
    border-top: 3px solid var(--neon-orange);
    border-left: 3px solid var(--neon-orange);
    border-radius: 20px 0 0 0;
}

.corner-decor.top-right {
    top: -5px;
    right: -5px;
    border-top: 3px solid var(--neon-yellow);
    border-right: 3px solid var(--neon-yellow);
    border-radius: 0 20px 0 0;
}

.corner-decor.bottom-left {
    bottom: -5px;
    left: -5px;
    border-bottom: 3px solid var(--neon-blue);
    border-left: 3px solid var(--neon-blue);
    border-radius: 0 0 0 20px;
}

.corner-decor.bottom-right {
    bottom: -5px;
    right: -5px;
    border-bottom: 3px solid var(--neon-purple);
    border-right: 3px solid var(--neon-purple);
    border-radius: 0 0 20px 0;
}

/* ---- Quick Action Buttons ---- */
.game-actions {
    display: flex;
    gap: 12px;
    margin-top: 14px;
    flex-wrap: wrap;
    justify-content: center;
}

.btn-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.3s;
    cursor: pointer;
    border: none;
}

.btn-action-primary {
    background: linear-gradient(135deg, var(--neon-orange), var(--neon-yellow));
    color: #0a0a12;
    box-shadow: 0 8px 30px rgba(255,107,53,0.4);
}

.btn-action-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(255,107,53,0.5);
}

.btn-action-secondary {
    background: transparent;
    color: var(--neon-blue);
    border: 2px solid var(--neon-blue);
}

.btn-action-secondary:hover {
    background: rgba(0,212,255,0.1);
    transform: translateY(-3px);
}

/* =============================================
   ABOUT SECTION
   ============================================= */
.about-section {
    padding: 100px 20px;
    position: relative;
    z-index: 1;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-tag {
    display: inline-block;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.8rem;
    color: var(--neon-orange);
    letter-spacing: 4px;
    text-transform: uppercase;
    margin-bottom: 15px;
}

.section-title {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 900;
    color: #fff;
    margin-bottom: 15px;
}

.section-desc {
    color: #666;
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    max-width: 1200px;
    margin: 0 auto;
}

.about-card {
    background: linear-gradient(145deg, var(--card-bg), #0d0d15);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 30px;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.about-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--neon-orange), var(--neon-yellow));
    opacity: 0;
    transition: opacity 0.3s;
}

.about-card:hover::before {
    opacity: 1;
}

.about-card:hover {
    transform: translateY(-8px);
    border-color: rgba(255,107,53,0.3);
    box-shadow: 0 20px 60px rgba(0,0,0,0.4), 0 0 40px rgba(255,107,53,0.1);
}

.about-card .icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
    display: block;
}

.about-card h3 {
    font-size: 1.3rem;
    color: #fff;
    margin-bottom: 12px;
    font-weight: 700;
}

.about-card p {
    color: #888;
    line-height: 1.7;
    font-size: 0.9rem;
}

/* =============================================
   FEATURES SECTION
   ============================================= */
.features-section {
    padding: 100px 20px;
    position: relative;
    z-index: 1;
    background: linear-gradient(180deg, transparent, rgba(255,107,53,0.02), transparent);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    padding: 22px;
    background: rgba(18,18,26,0.6);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    transition: all 0.3s;
}

.feature-item:hover {
    background: rgba(255,107,53,0.05);
    border-color: rgba(255,107,53,0.3);
    transform: translateX(10px);
}

.feature-icon {
    width: 50px;
    height: 50px;
    min-width: 50px;
    background: linear-gradient(135deg, rgba(255,107,53,0.2), rgba(247,197,49,0.1));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.feature-content h4 {
    color: var(--neon-yellow);
    font-size: 1.05rem;
    margin-bottom: 8px;
}

.feature-content p {
    color: #777;
    font-size: 0.85rem;
    line-height: 1.6;
}

/* =============================================
   CONTROLS SECTION
   ============================================= */
.controls-section {
    padding: 100px 20px;
    position: relative;
    z-index: 1;
}

.controls-wrapper {
    max-width: 900px;
    margin: 0 auto;
}

.controls-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
    margin-bottom: 40px;
}

.control-item {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s;
}

.control-item:hover {
    border-color: var(--neon-blue);
    box-shadow: 0 0 30px rgba(0,212,255,0.2);
}

.control-key {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 45px;
    height: 45px;
    background: linear-gradient(145deg, #1a1a24, #12121a);
    border: 2px solid #333;
    border-radius: 10px;
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    color: var(--neon-blue);
    font-size: 1rem;
    margin-bottom: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.control-item:hover .control-key {
    border-color: var(--neon-blue);
    box-shadow: 0 0 20px rgba(0,212,255,0.3);
}

.control-action {
    color: #fff;
    font-weight: 500;
    font-size: 0.9rem;
}

/* =============================================
   TAGS SECTION
   ============================================= */
.tags-section {
    padding: 80px 20px;
    position: relative;
    z-index: 1;
}

.tags-container {
    max-width: 900px;
    margin: 0 auto;
}

.tags-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.tag {
    background: linear-gradient(135deg, rgba(255,107,53,0.1), rgba(247,197,49,0.05));
    border: 1px solid rgba(255,107,53,0.3);
    color: var(--neon-yellow);
    padding: 10px 22px;
    border-radius: 50px;
    font-size: 0.9rem;
    transition: all 0.3s;
    cursor: default;
}

.tag:hover {
    background: linear-gradient(135deg, rgba(255,107,53,0.3), rgba(247,197,49,0.2));
    transform: scale(1.08);
    box-shadow: 0 10px 30px rgba(255,107,53,0.2);
}

/* =============================================
   ABOUT INTRO (SEO content)
   ============================================= */
.about-intro {
    max-width: 800px;
    margin: 0 auto 40px;
    text-align: center;
    color: #ccc;
    font-size: 1.05rem;
    line-height: 1.8;
    padding: 0 20px;
}

.about-intro strong {
    color: var(--neon-orange);
}

/* =============================================
   FAQ SECTION
   ============================================= */
.faq-section {
    padding: 80px 20px;
    position: relative;
    z-index: 1;
}

.faq-grid {
    max-width: 900px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.faq-item {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,107,53,0.2);
    border-radius: 16px;
    padding: 28px;
    transition: all 0.3s;
}

.faq-item:hover {
    border-color: rgba(255,107,53,0.5);
    background: rgba(255,107,53,0.05);
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(255,107,53,0.15);
}

.faq-item h4 {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    color: var(--neon-orange);
    margin-bottom: 12px;
}

.faq-item p {
    color: #aaa;
    font-size: 0.92rem;
    line-height: 1.7;
    margin: 0;
}

.faq-item p strong {
    color: var(--neon-yellow);
}

/* Screen-reader only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}
