/* css/features.css */
/* ---------- GAME SECTION STYLES (renamed .card to .game-card to avoid conflict) ---------- */
.game-landing {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 40px 20px;
    text-align: center;
    position: relative;
    z-index: 1;
    transition: opacity 0.6s ease;
    background: radial-gradient(ellipse at 20% 10%, rgba(182,125,255,0.15), transparent 50%),
                radial-gradient(ellipse at 80% 90%, rgba(255,73,192,0.15), transparent 50%),
                radial-gradient(ellipse at 50% 50%, #15152a 0%, #0a0a1a 70%);
}
.game-landing-label {
    display: inline-block;
    padding: 6px 18px;
    background: #fff;
    color: #212132;
    border-radius: 100vw;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 20px;
}
.game-landing-title {
    font-size: clamp(36px, 6vw, 72px);
    font-weight: 900;
    background: linear-gradient(135deg, #ffdd65 0%, #ffaa5c 30%, #ff49c0 60%, #b67dff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    cursor: pointer;
    user-select: none;
    position: relative;
    transition: transform 0.3s ease, filter 0.3s ease;
    padding: 20px 40px;
    display: inline-block;
    letter-spacing: 1px;
}
.game-landing-title::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 20px;
    background: linear-gradient(135deg, #ffdd65 0%, #ff49c0 100%);
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s;
    filter: blur(30px);
}
.game-landing-title:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 0 30px rgba(255,73,192,0.6));
}
.game-landing-title:hover::before { opacity: 0.4; }
.game-landing-hint {
    margin-top: 20px;
    color: rgba(255,255,255,0.5);
    font-size: 14px;
    letter-spacing: 2px;
    text-transform: uppercase;
    animation: hintPulse 2s infinite;
}
.game-landing-hint::before { content: '🎯 '; }
@keyframes hintPulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}
.game-completed-badge {
    margin-top: 24px;
    padding: 8px 20px;
    background: rgba(255,221,101,0.1);
    border: 1px solid rgba(255,221,101,0.3);
    border-radius: 100px;
    color: #ffdd65;
    font-size: 13px;
    letter-spacing: 1px;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.6s ease, transform 0.6s ease;
    pointer-events: none;
}
.game-completed-badge.show { opacity: 1; transform: translateY(0); }

.game-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: radial-gradient(ellipse at 20% 10%, rgba(182,125,255,0.2), transparent 50%),
                radial-gradient(ellipse at 80% 90%, rgba(255,73,192,0.2), transparent 50%),
                radial-gradient(ellipse at 50% 50%, #15152a 0%, #0a0a1a 70%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s ease;
    overflow: hidden;
}
.game-overlay.open {
    opacity: 1;
    pointer-events: auto;
}
.game-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.15);
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1100;
    transition: all 0.3s;
}
.game-close-btn:hover {
    background: rgba(255,73,192,0.3);
    transform: rotate(90deg) scale(1.1);
    border-color: #ff49c0;
}
.game-hud {
    position: absolute;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    pointer-events: none;
    z-index: 10;
    width: 90%;
    max-width: 600px;
}
.game-hud-label {
    display: inline-block;
    padding: 6px 18px;
    background: #fff;
    color: #212132;
    border-radius: 100vw;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 14px;
}
.game-hud-title {
    font-size: clamp(24px, 3.5vw, 40px);
    font-weight: 800;
    background: linear-gradient(135deg, #ffdd65 0%, #ffaa5c 30%, #ff49c0 60%, #b67dff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 8px;
    text-shadow: 0 0 40px rgba(255,221,101,0.3);
}
.game-hud-sub {
    color: rgba(255,255,255,0.6);
    font-size: 13px;
    line-height: 1.6;
}
.game-stage {
    position: absolute;
    inset: 0;
    perspective: 1500px;
    perspective-origin: 50% 50%;
    overflow: hidden;
}
.game-world {
    position: absolute;
    inset: 0;
    transform-style: preserve-3d;
    transition: transform 0.9s cubic-bezier(0.76, 0, 0.24, 1);
}
.game-card {
    position: absolute;
    left: 50%;
    top: 50%;
    width: min(420px, 85vw);
    height: min(520px, 70vh);
    transform-style: preserve-3d;
    transition: transform 0.9s cubic-bezier(0.76, 0, 0.24, 1), opacity 0.9s ease;
    will-change: transform, opacity;
}
.game-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 32px;
    padding: 5px;
    background: linear-gradient(135deg, #ffdd65 2.76%, #ffaa5c 29.66%, #ff49c0 61%, #b67dff 99.93%);
    box-shadow: 0 0 80px rgba(255,73,192,0.3), 0 20px 60px rgba(0,0,0,0.5);
}
.game-card-bg-glow {
    position: absolute;
    inset: 0;
    border-radius: 32px;
    background: linear-gradient(135deg, #ffdd65 2.76%, #ffaa5c 29.66%, #ff49c0 61%, #b67dff 99.93%);
    filter: blur(30px);
    opacity: 0.6;
    z-index: -1;
    transition: opacity 0.5s;
}
.game-card.highlight .game-card-bg-glow { opacity: 1; }
.game-card-box {
    width: 100%;
    height: 100%;
    background: #232323;
    border-radius: 27px;
    padding: 40px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    overflow: hidden;
    position: relative;
}
.game-card-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(255,221,101,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    margin-bottom: 30px;
    border: 2px solid rgba(255,221,101,0.3);
    flex-shrink: 0;
    transition: opacity 0.4s ease, transform 0.4s ease;
}
.game-card-number {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 110px;
    font-weight: 900;
    line-height: 1;
    background: linear-gradient(180deg, rgba(255,255,255,0.08), transparent);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    user-select: none;
    transition: opacity 0.4s ease;
}
.game-card-title {
    font-size: clamp(32px, 3vw, 48px);
    font-weight: 800;
    margin-bottom: 16px;
    line-height: 1.2;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}
.game-card-divider {
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #ffdd65, #ff49c0);
    margin-bottom: 20px;
    border-radius: 3px;
    opacity: 0;
    transform: scaleX(0);
    transform-origin: left;
    transition: opacity 0.5s ease, transform 0.6s ease;
}
.game-card-text {
    font-size: clamp(16px, 1.6vw, 20px);
    line-height: 1.7;
    color: rgba(255,255,255,0.85);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
    margin-bottom: 8px;
}
.game-card.revealed .game-card-title,
.game-card.revealed .game-card-text { opacity: 1; transform: translateY(0); }
.game-card.revealed .game-card-divider { opacity: 1; transform: scaleX(1); }
.game-card.revealed .game-card-title { transition-delay: 0.1s; }
.game-card.revealed .game-card-divider { transition-delay: 0.3s; }
.game-card.revealed .game-card-text:nth-of-type(1) { transition-delay: 0.5s; }
.game-card.revealed .game-card-text:nth-of-type(2) { transition-delay: 0.7s; }
.game-card.fading .game-card-icon { opacity: 0; transform: scale(0.5) rotate(-20deg); }
.game-card.fading .game-card-number { opacity: 0; }
.game-card.fading .game-card-title {
    opacity: 0 !important;
    transform: translateX(-50px) rotate(-5deg) !important;
    transition: opacity 0.3s ease, transform 0.3s ease !important;
    transition-delay: 0s !important;
}
.game-card.fading .game-card-divider {
    opacity: 0 !important;
    transform: scaleX(0) !important;
    transition: opacity 0.3s ease, transform 0.4s ease !important;
    transition-delay: 0.15s !important;
}
.game-card.fading .game-card-text:nth-of-type(1) {
    opacity: 0 !important;
    transform: translateX(-40px) !important;
    transition: opacity 0.3s ease, transform 0.3s ease !important;
    transition-delay: 0.3s !important;
}
.game-card.fading .game-card-text:nth-of-type(2) {
    opacity: 0 !important;
    transform: translateX(-40px) !important;
    transition: opacity 0.3s ease, transform 0.3s ease !important;
    transition-delay: 0.5s !important;
}
.game-card.state-waiting {
    opacity: 0;
    transform: translate(-50%, -50%) translateZ(-800px) rotateY(40deg) scale(0.5);
    pointer-events: none;
}
.game-card.state-active {
    opacity: 1;
    transform: translate(-50%, -50%) translateZ(0) rotateY(0) scale(1);
}
.game-card.state-highlight {
    opacity: 1;
    transform: translate(-50%, -50%) translateZ(100px) scale(1.05);
}
.game-card.state-hit {
    opacity: 0;
    transform: translate(-50%, -50%) translateZ(-200px) rotateY(-90deg) rotateX(30deg) scale(0.6);
    pointer-events: none;
}
.game-bullet {
    position: fixed;
    width: 14px;
    height: 14px;
    background: radial-gradient(circle, #fff 0%, #ffdd65 40%, #ff49c0 80%, transparent 100%);
    border-radius: 50%;
    box-shadow: 0 0 20px #ffdd65, 0 0 40px #ff49c0, 0 0 60px rgba(255,221,101,0.5);
    z-index: 1050;
    pointer-events: none;
    opacity: 0;
    will-change: transform, left, top;
}
.game-bullet-trail {
    position: fixed;
    height: 3px;
    background: linear-gradient(90deg, transparent, #ffdd65, #ff49c0);
    z-index: 1049;
    pointer-events: none;
    opacity: 0;
    transform-origin: left center;
    box-shadow: 0 0 10px rgba(255,73,192,0.5);
}
.game-particle {
    position: fixed;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 1060;
    will-change: transform, opacity;
}
.game-muzzle {
    position: fixed;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,221,101,0.9), rgba(255,73,192,0.5) 40%, transparent 70%);
    pointer-events: none;
    z-index: 1048;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0);
}
.game-muzzle.fire { animation: muzzleFire 0.4s ease-out; }
@keyframes muzzleFire {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(0); }
    30% { opacity: 1; transform: translate(-50%, -50%) scale(1.5); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(3); }
}
.game-shockwave {
    position: fixed;
    border: 3px solid #ffdd65;
    border-radius: 50%;
    pointer-events: none;
    z-index: 1055;
    opacity: 0;
    transform: translate(-50%, -50%);
}
.game-shockwave.fire { animation: shockwaveAnim 0.8s ease-out; }
@keyframes shockwaveAnim {
    0% { opacity: 1; transform: translate(-50%, -50%) scale(0); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(4); }
}
.game-ui {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    display: flex;
    gap: 16px;
    align-items: center;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(20px);
    padding: 14px 24px;
    border-radius: 100px;
    border: 1px solid rgba(255,255,255,0.1);
}
.game-ammo { display: flex; gap: 6px; }
.game-ammo-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    transition: all 0.3s;
}
.game-ammo-dot.used {
    background: linear-gradient(135deg, #ffdd65, #ff49c0);
    box-shadow: 0 0 10px rgba(255,73,192,0.6);
    transform: scale(1.3);
}
.game-crosshair {
    position: fixed;
    width: 40px;
    height: 40px;
    pointer-events: none;
    z-index: 1200;
    transform: translate(-50%, -50%);
    left: 50%;
    top: 50%;
    opacity: 0;
    transition: opacity 0.3s;
}
.game-overlay.open .game-crosshair { opacity: 1; }
.game-crosshair::before,
.game-crosshair::after {
    content: '';
    position: absolute;
    background: rgba(255,221,101,0.9);
    box-shadow: 0 0 8px rgba(255,221,101,0.5);
}
.game-crosshair::before {
    left: 50%; top: 0; width: 1px; height: 100%; transform: translateX(-50%);
}
.game-crosshair::after {
    top: 50%; left: 0; height: 1px; width: 100%; transform: translateY(-50%);
}
.game-crosshair-circle {
    position: absolute;
    inset: 25%;
    border: 1px solid rgba(255,221,101,0.5);
    border-radius: 50%;
    animation: pulseCrosshair 2s infinite;
}
@keyframes pulseCrosshair {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.3); opacity: 1; }
}
.game-mission-toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.5);
    z-index: 1400;
    text-align: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.game-mission-toast.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}
.game-mission-toast.hide {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.3);
    transition: opacity 0.4s ease, transform 0.4s ease;
}
.game-mission-toast h2 {
    font-size: clamp(48px, 9vw, 110px);
    font-weight: 900;
    background: linear-gradient(135deg, #ffdd65, #ff49c0, #b67dff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 10px;
    letter-spacing: 2px;
    filter: drop-shadow(0 0 30px rgba(255,73,192,0.6));
    animation: toastPulse 1.2s infinite;
}
@keyframes toastPulse {
    0%, 100% { filter: drop-shadow(0 0 30px rgba(255,73,192,0.6)); }
    50% { filter: drop-shadow(0 0 50px rgba(255,221,101,0.9)); }
}
.game-mission-toast p {
    color: rgba(255,255,255,0.85);
    font-size: clamp(14px, 2vw, 18px);
    letter-spacing: 3px;
    text-transform: uppercase;
}
.game-mission-toast .target-emoji {
    font-size: clamp(40px, 6vw, 60px);
    margin-bottom: 10px;
    display: inline-block;
    animation: targetSpin 1s ease-out;
}
@keyframes targetSpin {
    0% { transform: rotate(-360deg) scale(0); opacity: 0; }
    100% { transform: rotate(0) scale(1); opacity: 1; }
}
.game-stage.shake { animation: screenShake 0.4s; }
@keyframes screenShake {
    0%, 100% { transform: translate(0,0); }
    10% { transform: translate(-8px, 4px); }
    20% { transform: translate(6px, -6px); }
    30% { transform: translate(-4px, -4px); }
    40% { transform: translate(5px, 3px); }
    50% { transform: translate(-3px, 5px); }
    60% { transform: translate(4px, -2px); }
    70% { transform: translate(-2px, 3px); }
    80% { transform: translate(2px, -1px); }
    90% { transform: translate(-1px, 1px); }
}
@media (hover: hover) and (pointer: fine) {
    .game-overlay.open { cursor: none; }
}
@media (max-width: 768px) {
    .game-hud { top: 20px; }
    .game-card-box { padding: 24px; }
    .game-card-number { font-size: 80px; top: 10px; right: 20px; }
    .game-ui { padding: 10px 18px; bottom: 20px; }
    .game-crosshair { display: none !important; }
    .game-close-btn { top: 15px; right: 15px; width: 44px; height: 44px; font-size: 20px; }
    .game-landing-title { padding: 15px 25px; }
}
.game-touch-ripple {
    position: fixed;
    width: 60px;
    height: 60px;
    border: 2px solid rgba(255,221,101,0.8);
    border-radius: 50%;
    pointer-events: none;
    z-index: 1045;
    transform: translate(-50%, -50%) scale(0);
    opacity: 1;
}
.game-touch-ripple.fire { animation: rippleAnim 0.6s ease-out forwards; }
@keyframes rippleAnim {
    0% { transform: translate(-50%, -50%) scale(0); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(2); opacity: 0; }
}
/* ---------- FIX: FEATURES GAME CLOSE BUTTON HIDDEN BEHIND STICKY HEADER ---------- */
@media (max-width: 768px) {
    .game-close-btn {
        top: 60px !important;       /* Push it below the sticky header */
        right: 15px !important;
        z-index: 10002 !important;  /* Ensure it sits above the sticky header (z-index: 9999) */
    }
}