/* Base background: modern gradient + subtle glow */
body{
    color: var(--text);
    background:
      radial-gradient(ellipse at 30% 20%, rgba(0, 255, 220, 0.12) 0%, transparent 50%),
      radial-gradient(ellipse at 70% 60%, rgba(0, 204, 122, 0.10) 0%, transparent 60%),
      linear-gradient(135deg, #05080d 0%, #0a1320 50%, #04060a 100%);
    position: relative;
    overflow-x: hidden;
  }
  
  /* Subtle tech grid overlay (clean + minimal) */
  body::before{
    content:"";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
  
    /* big, subtle grid (clean look) */
    background-image:
      linear-gradient(to right, var(--grid) 1px, transparent 1px),
      linear-gradient(to bottom, var(--grid) 1px, transparent 1px);
  
    background-size: 96px 96px;
    opacity: .10;
  
    /* fade grid away toward edges/bottom for a modern feel */
    mask-image: radial-gradient(circle at 50% 10%,
      rgba(0,0,0,1) 0%,
      rgba(0,0,0,.55) 58%,
      rgba(0,0,0,0) 82%);
  }
  
  body::after{
    content:"";
    position: fixed;
    inset: 0;
    pointer-events:none;
    z-index: 0;
  
    background:
      radial-gradient(1200px 700px at 50% 20%, transparent 45%, rgba(0,0,0,.35) 100%);
    opacity: .65;
  }

  .fx-particles {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -10;
    overflow: hidden;
  }
  
  .particle {
    position: absolute;
    background: rgba(0, 255, 157, 0.7);
    border-radius: 50%;
    box-shadow: 0 0 12px rgba(0, 255, 157, 0.6);
    animation: floatData linear infinite;
    will-change: transform, opacity;
  }
  
  @keyframes floatData {
    0%   { transform: translateY(100vh) scale(0.4); opacity: 0.1; }
    30%  { opacity: 0.9; }
    70%  { opacity: 0.7; }
    100% { transform: translateY(-120vh) scale(0.7); opacity: 0; }
  }
  

/* ===== NAVBAR ===== */
.navbar-custom {
    background: rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(15px);
    padding: 10px 20px;
}
.navbar-brand {
    font-size: 26px;
    font-weight: 700;
    color: #fff !important;
}
.btn-success1 {
    background-color: #1b1b1b;
    border: 1px solid #00ff99;
    border-radius: 15px;
    font-weight: 500;
    color: #00ff99 !important;
    transition: 0.3s ease;
}
.btn-success1:hover {
    background-color: #00ff99;
    color: #111 !important;
}

/* ===== GAME CONTAINER ===== */
.game-container {
    width: 100%;
    max-width: 950px;
    height: 500px;
    background: #1b1b1b;
    border-radius: 15px;
    margin: 40px auto 20px;
    position: relative;
    overflow: hidden;
    border: 2px solid #333;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}

/* ===== GAME BUTTONS ===== */
.game-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

.game-buttons button {
    width: 160px;
    margin: 10px;
    font-weight: bold;
    border-radius: 10px;
    border: none;
    background: #2a2a2a;
    color: #fff;
    transition: all 0.2s ease;
}
.game-buttons button:hover {
    transform: scale(1.05);
    background: #00ff99;
    color: #111;
}

/* ===== M  USIC BUTTON ===== */
.music-btn {
    position: absolute;
    top: 15px;
    left: 55%;
    transform: translateX(-50%);
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
    border: 3px solid #3d3d3d;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10000;
    pointer-events: auto;
    box-shadow: 
        inset 0 2px 4px rgba(0, 0, 0, 0.5),
        0 4px 8px rgba(0, 0, 0, 0.6);
    transition: all 0.2s ease;
}

.music-btn:hover {
    background: linear-gradient(135deg, #3a3a3a 0%, #2a2a2a 100%);
    transform: translateX(-50%) scale(1.1);
}

.music-btn i {
    color: #00ff99;
    font-size: 20px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.8));
}


/* ===== PAUSE BUTTON ===== */
.pause-btn {
    position: absolute;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
    border: 3px solid #3d3d3d;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10000;
    pointer-events: auto;
    box-shadow: 
        inset 0 2px 4px rgba(0, 0, 0, 0.5),
        0 4px 8px rgba(0, 0, 0, 0.6);
    transition: all 0.2s ease;
}

.pause-btn:hover {
    background: linear-gradient(135deg, #3a3a3a 0%, #2a2a2a 100%);
    transform: translateX(-50%) scale(1.1);
}

.pause-btn i {
    color: #00ff99;
    font-size: 20px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.8));
}

/* ===== HUD ===== */
.game-hud {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    font-family: 'Sora', sans-serif;
}

/* ===== TOP LEFT SECTION ===== */
.hud-top-left {
    position: absolute;
    top: 15px;
    left: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ===== TOP RIGHT SECTION ===== */
.hud-top-right {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ===== HUD ITEM CONTAINER ===== */
.hud-item-container {
    display: flex;
    align-items: center;
    gap: 0;
    position: relative;
}

/* ===== ICON BOX (Left side with icons) ===== */
.hud-icon-box {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
    border: 3px solid #3d3d3d;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
    box-shadow: 
        inset 0 2px 4px rgba(0, 0, 0, 0.5),
        0 4px 8px rgba(0, 0, 0, 0.6);
}

.hud-icon-box::before {
    content: '';
    position: absolute;
    inset: -6px;
    background: linear-gradient(135deg, #555 0%, #333 100%);
    border-radius: 10px;
    z-index: -1;
}

.hud-icon-box i {
    font-size: 24px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.8));
}

.hud-icon-box img {
    width: 32px;
    height: 32px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.8));
}

/* Icon specific colors */
.health-icon i {
    color: #ff1e5a;
}

.score-icon i {
    color: #ffd700;
}

.coin-icon {
    background: linear-gradient(135deg, #3a2a1a 0%, #2a1a0a 100%);
}

.powerup-icon {
    background: linear-gradient(135deg, #3a1a5a 0%, #2a0a4a 100%);
}

/* ===== BAR CONTAINER (Right side with bars/content) ===== */
.hud-bar-container {
    min-width: 220px;
    height: 50px;
    background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
    border: 3px solid #3d3d3d;
    border-left: none;
    border-radius: 0 8px 8px 0;
    position: relative;
    margin-left: -3px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    box-shadow: 
        inset 0 2px 4px rgba(0, 0, 0, 0.5),
        0 4px 8px rgba(0, 0, 0, 0.6);
}

.hud-bar-container1 {
    min-width: 110px;
    height: 50px;
    background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
    border: 3px solid #3d3d3d;
    border-left: none;
    border-radius: 0 8px 8px 0;
    position: relative;
    margin-left: -3px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    box-shadow: 
        inset 0 2px 4px rgba(0, 0, 0, 0.5),
        0 4px 8px rgba(0, 0, 0, 0.6);
}

/* ===== HAZARD STRIPES (Yellow/Black stripes at bottom) ===== */
.hazard-stripes {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 8px;
    background: repeating-linear-gradient(
        45deg,
        #000 0px,
        #000 8px,
        #ffd700 8px,
        #ffd700 16px
    );
    border-radius: 0 0 5px 0;
}

/* ===== HEALTH BARS ===== */
.health-bars {
    display: flex;
    gap: 8px;
    width: 100%;
}

.health-bar {
    flex: 1;
    height: 18px;
    background: linear-gradient(180deg, #ff1e5a 0%, #d91848 100%);
    border-radius: 4px;
    position: relative;
    box-shadow: 
        inset 0 2px 4px rgba(255, 255, 255, 0.3),
        0 2px 4px rgba(0, 0, 0, 0.5);
    border: 2px solid #5a0a20;
}

.health-bar::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    right: 2px;
    height: 4px;
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 0.6) 0%, 
        rgba(255, 255, 255, 0.2) 50%,
        transparent 100%
    );
    border-radius: 2px;
}

.health-bar.lost {
    background: linear-gradient(180deg, #3a3a3a 0%, #2a2a2a 100%);
    border-color: #1a1a1a;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.8);
}

/* ===== SCORE CONTENT ===== */
.score-content {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-left: 8px;
}

.score-content span {
    font-size: 28px;
    font-weight: 900;
    color: #fff;
    text-shadow: 
        2px 2px 0 #000,
        0 0 8px rgba(255, 215, 0, 0.8);
    letter-spacing: 1px;
}

/* ===== COINS CONTENT ===== */
.coins-content {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-left: 8px;
}

.coins-content span {
    font-size: 24px;
    font-weight: 800;
    color: #fff;
    text-shadow: 
        2px 2px 0 #000,
        0 0 8px rgba(255, 215, 0, 0.8);
    letter-spacing: 1px;
}

/* ===== POWERUP TIMER ===== */
.powerup-timer-display {
    display: none;
}

.powerup-timer-display.active {
    display: flex;
}

.powerup-timer-content {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-left: 8px;
}

#powerupTimer {
    font-size: 22px;
    font-weight: 800;
    color: #fff;
    text-shadow: 
        2px 2px 0 #000,
        0 0 8px rgba(156, 39, 176, 0.8);
    letter-spacing: 1px;
}

.powerup-icon img {
    animation: powerupPulse 1.5s ease-in-out infinite;
}

@keyframes powerupPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* ===== HUD POPUPS ===== */
.hud-popup {
    position: absolute;
    top: 90px;
    left: 50%;
    transform: translateX(-50%) scale(0.8);
    opacity: 0;
    padding: 12px 30px;
    border-radius: 8px;
    color: white;
    font-size: 22px;
    font-weight: bold;
    pointer-events: none;
    transition: 0.3s ease;
    text-shadow: 2px 2px 0 #000;
    background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
    border: 3px solid #ffd700;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.8);
}

.hud-popup::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: repeating-linear-gradient(
        45deg,
        #000 0px,
        #000 6px,
        #ffd700 6px,
        #ffd700 12px
    );
}

.hud-popup.show {
    opacity: 1;
    transform: translateX(-50%) scale(1);
}

.hud-popup.boost {
    border-color: #9c27b0;
}

.hud-popup.boost::after {
    background: repeating-linear-gradient(
        45deg,
        #000 0px,
        #000 6px,
        #9c27b0 6px,
        #9c27b0 12px
    );
}

.hud-popup.slow {
    border-color: #00d4ff;
}

.hud-popup.slow::after {
    background: repeating-linear-gradient(
        45deg,
        #000 0px,
        #000 6px,
        #00d4ff 6px,
        #00d4ff 12px
    );
}

/* Remove old HUD styles */
.hud-box,
#livesHUD,
.life-heart,
#speedHUD {
    display: none !important;
}

/* ===== MOBILE CONTROL BUTTONS ===== */
.mobile-controls {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    display: none;
    justify-content: space-between;
    padding: 0 20px;
    pointer-events: none;
    z-index: 9998;
}

.mobile-control-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: auto;
}

.left-controls {
    align-items: flex-start;
}

.right-controls {
    align-items: flex-end;
}

.mobile-control-btn {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
    border: 3px solid #3d3d3d;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 
        inset 0 2px 4px rgba(0, 0, 0, 0.5),
        0 4px 8px rgba(0, 0, 0, 0.6);
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
}

.mobile-control-btn:active {
    transform: scale(0.95);
    background: linear-gradient(135deg, #3a3a3a 0%, #2a2a2a 100%);
    box-shadow: 
        inset 0 2px 6px rgba(0, 0, 0, 0.7),
        0 2px 4px rgba(0, 0, 0, 0.8);
}

.mobile-control-btn i {
    font-size: 28px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.8));
    pointer-events: none;
}

/* Backward Button (Left - Top) */
.backward-control-btn {
    border-color: #ffaa00;
}

.backward-control-btn i {
    color: #ffaa00;
}

.backward-control-btn:active {
    border-color: #ff9900;
}

/* Slide Button (Left - Bottom) */
.slide-control-btn {
    border-color: #ff6b6b;
}

.slide-control-btn i {
    color: #ff6b6b;
}

.slide-control-btn:active {
    border-color: #ee5a6f;
}

/* Forward Button (Right - Top) */
.forward-control-btn {
    border-color: #00ccff;
}

.forward-control-btn i {
    color: #00ccff;
}

.forward-control-btn:active {
    border-color: #00aadd;
}

/* Jump Button (Right - Bottom) */
.jump-control-btn {
    border-color: #00ff99;
}

.jump-control-btn i {
    color: #00ff99;
}

.jump-control-btn:active {
    border-color: #00cc78;
}

/* Show mobile controls on touch devices */
@media (hover: none) and (pointer: coarse) {
    .mobile-controls {
        display: flex;
    }
}

/* ===== START SCREEN ===== */
.start-screen {
    position: absolute;
    inset: 0;
    background: transparent !important;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #fff;
    text-align: center;
    pointer-events: none;
    z-index: 10000;
}

.start-screen button {
    pointer-events: auto;
}

.start-screen h1 {
    font-size: 60px;
    color: #00ff99;
    font-weight: 700;
}

.start-screen p {
    margin-top: 10px;
    font-size: 16px;
    color: #aaa;
    max-width: 500px;
}

.start-btn {
    margin-top: 25px;
    padding: 18px 50px;
    font-size: 26px;
    background-color: #00ff99;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    color: #111;
    font-weight: 700;
    transition: 0.2s ease;
}
.start-btn:hover {
    background-color: #00cc78;
    transform: scale(1.05);
}

/* ===== END GAME MODAL ===== */
.game-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    padding: 20px;
}

.game-modal.show {
    display: flex;
}

.modal-content {
    background: #1e1e1e;
    padding: 30px;
    border-radius: 16px;
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    text-align: center;
    color: white;
    border: 2px solid #444;
    box-sizing: border-box;
    position: relative;
    z-index: 1000000;
}

.modal-content h2 {
    font-size: 32px;
    margin-bottom: 20px;
    color: #00ff99;
}

.modal-content button,
.restart-btn {
    margin-top: 20px;
    padding: 12px 25px;
    font-size: 18px;
    font-weight: 700;
    border: none;
    border-radius: 10px;
    background: #00ff99;
    color: #111;
    cursor: pointer;
    transition: 0.2s ease;
}
.modal-content button:hover,
.restart-btn:hover {
    background: #00cc78;
}

/* Leaderboard Modal Styles */
.leaderboard-modal {
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
}

.leaderboard-list {
    margin: 20px 0;
    max-height: 500px;
    overflow-y: auto;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    margin: 10px 0;
    background: linear-gradient(135deg, rgba(42, 39, 218, 0.1), rgba(0, 204, 255, 0.1));
    border: 2px solid rgba(0, 204, 255, 0.3);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.leaderboard-item:hover {
    transform: translateX(5px);
    border-color: rgba(0, 204, 255, 0.6);
    box-shadow: 0 5px 15px rgba(0, 204, 255, 0.3);
}

.leaderboard-item .rank {
    font-size: 24px;
    font-weight: bold;
    min-width: 50px;
    text-align: center;
}

.leaderboard-item .player-name {
    flex: 1;
    font-size: 18px;
    margin: 0 15px;
    color: #fff;
    font-weight: 500;
}

.leaderboard-item .player-score,
.leaderboard-item .player-coins {
    font-size: 16px;
    font-weight: bold;
    margin-left: 15px;
    color: #00ccff;
}

.leaderboard-item .player-coins {
    color: gold;
}

.btn-secondary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    margin-left: 10px;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #764ba2, #667eea);
    transform: translateY(-2px);
}

/* ===== MOBILE RESPONSIVE ===== */
@media (max-width: 768px) {
    .navbar-brand {
        font-size: 20px;
    }
    
    .navbar-custom img {
        height: 50px !important;
    }
    
    .btn-success1 {
        padding: 8px 16px !important;
        font-size: 14px;
    }
    
    .game-container {
        width: 95vw;
        height: 60vh;
        max-height: 450px;
        margin: 20px auto;
        border-radius: 10px;
    }
    
    #gameCanvas {
        width: 100% !important;
        height: 100% !important;
    }
    
    /* Smaller HUD elements */
    .hud-icon-box {
        width: 40px;
        height: 40px;
    }
    
    .hud-icon-box img {
        width: 24px;
        height: 24px;
    }
    
    .hud-icon-box i {
        font-size: 20px;
    }
    
    .hud-bar-container {
        min-width: 150px;
        height: 40px;
        padding: 6px 8px;
    }
    
    .hud-bar-container1 {
        min-width: 80px;
        height: 40px;
        padding: 6px 8px;
    }
    
    .health-bar {
        height: 14px;
    }
    
    .score-content span {
        font-size: 20px;
    }
    
    .coins-content span {
        font-size: 18px;
    }
    
    #powerupTimer {
        font-size: 16px;
    }
    
    .hud-top-left,
    .hud-top-right {
        top: 10px;
        gap: 8px;
    }
    
    .hud-top-left {
        left: 10px;
    }
    
    .hud-top-right {
        right: 10px;
    }
    
    .pause-btn {
        width: 40px;
        height: 40px;
        top: 10px;
    }
    
    .pause-btn i {
        font-size: 18px;
    }
    
    .hud-popup {
        font-size: 16px;
        padding: 8px 20px;
        top: 70px;
    }
    
    .mobile-controls {
        bottom: 15px;
        padding: 0 15px;
        display: flex;
    }
    
    .mobile-control-btn {
        width: 65px;
        height: 65px;
    }
    
    .mobile-control-btn i {
        font-size: 24px;
    }
    
    .mobile-control-group {
        gap: 10px;
    }
    
    .start-screen h1 {
        font-size: 36px;
    }
    
    .start-screen p {
        font-size: 14px;
        padding: 0 20px;
    }
    
    .start-btn {
        padding: 14px 35px;
        font-size: 20px;
    }
    
    .game-buttons button {
        width: 130px;
        margin: 5px;
        font-size: 14px;
    }
    
    .modal-content {
        padding: 20px;
        max-width: 90vw;
    }
    
    .modal-content h2 {
        font-size: 24px;
    }
    
    .modal-content h3 {
        font-size: 18px;
    }
    
    .modal-content p,
    .modal-content li {
        font-size: 14px;
    }
    
    .leaderboard-item {
        padding: 10px 15px;
        flex-wrap: wrap;
    }
    
    .leaderboard-item .rank {
        font-size: 18px;
        min-width: 40px;
    }
    
    .leaderboard-item .player-name {
        font-size: 14px;
        margin: 0 10px;
    }
    
    .leaderboard-item .player-score,
    .leaderboard-item .player-coins {
        font-size: 13px;
        margin-left: 8px;
    }
}

@media (max-width: 480px) {
    .navbar-brand {
        font-size: 18px;
    }
    
    .game-container {
        height: 55vh;
        max-height: 400px;
    }
    
    .hud-icon-box {
        width: 35px;
        height: 35px;
    }
    
    .hud-icon-box img {
        width: 20px;
        height: 20px;
    }
    
    .hud-icon-box i {
        font-size: 18px;
    }
    
    .hud-bar-container {
        min-width: 120px;
        height: 35px;
    }
    
    .hud-bar-container1 {
        min-width: 65px;
        height: 35px;
    }
    
    .score-content span {
        font-size: 18px;
    }
    
    .coins-content span {
        font-size: 16px;
    }
    
    .hud-popup {
        font-size: 14px;
        padding: 6px 15px;
    }
    
    .mobile-controls {
        bottom: 12px;
        padding: 0 12px;
    }
    
    .mobile-control-btn {
        width: 60px;
        height: 60px;
    }
    
    .mobile-control-btn i {
        font-size: 22px;
    }
    
    .mobile-control-group {
        gap: 8px;
    }
    
    .start-screen h1 {
        font-size: 28px;
    }
    
    .start-screen p {
        font-size: 12px;
    }
    
    .start-btn {
        padding: 12px 30px;
        font-size: 18px;
    }
    
    .game-buttons button {
        width: 110px;
        font-size: 12px;
        padding: 8px 10px;
    }
}

/* Landscape mode for mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .game-container {
        height: 85vh;
        margin: 10px auto;
    }
    
    .hud-top-left,
    .hud-top-right {
        top: 5px;
        gap: 5px;
    }
    
    .pause-btn {
        top: 5px;
    }
    
    .mobile-controls {
        bottom: 8px;
    }
    
    .mobile-control-btn {
        width: 55px;
        height: 55px;
    }
    
    .mobile-control-btn i {
        font-size: 20px;
    }
    
    .mobile-control-group {
        gap: 6px;
    }
}




/* FX Layers */
.fx-grid,
    .fx-orbs,
    .fx-scan,
    .fx-noise{
      position:fixed;
      inset:0;
      pointer-events:none;
    }

    /* Moving grid */
    .fx-grid{
      z-index:-9;
      background-image:
        linear-gradient(rgba(0,255,157,0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,255,157,0.045) 1px, transparent 1px);
      background-size:70px 70px;
      opacity:.35;
      transform:translateZ(0);
      animation: fxGridMove 40s linear infinite;
      mask-image: radial-gradient(circle at 50% 30%, rgba(0,0,0,1) 0%, rgba(0,0,0,0.35) 65%, transparent 100%);
      -webkit-mask-image: radial-gradient(circle at 50% 30%, rgba(0,0,0,1) 0%, rgba(0,0,0,0.35) 65%, transparent 100%);
    }

    @keyframes fxGridMove{
      from { background-position: 0 0, 0 0; }
      to   { background-position: 70px 70px, 70px 70px; }
    }

    /* Floating glow orbs */
    .fx-orbs{ z-index:-8; overflow:hidden; }

    .orb{
      position:absolute;
      width:520px;
      height:520px;
      border-radius:999px;
      filter: blur(40px);
      opacity:.18;
      background: radial-gradient(circle at 30% 30%, rgba(0,255,157,.9), rgba(0,255,157,0) 60%);
      transform: translateZ(0);
      animation: orbFloat 18s ease-in-out infinite;
    }

    .orb-1{ left:-160px; top:10%; animation-duration:20s; }
    .orb-2{ right:-220px; top:45%; width:620px; height:620px; opacity:.14; animation-duration:26s; }
    .orb-3{ left:30%; bottom:-260px; width:720px; height:720px; opacity:.10; animation-duration:30s; }

    @keyframes orbFloat{
      0%   { transform: translate(0,0) scale(1); }
      50%  { transform: translate(60px,-40px) scale(1.06); }
      100% { transform: translate(0,0) scale(1); }
    }

    /* Scanlines */
    .fx-scan{
      z-index:-7;
      background:
        repeating-linear-gradient(
          to bottom,
          rgba(255,255,255,0.03) 0px,
          rgba(255,255,255,0.03) 1px,
          transparent 3px,
          transparent 6px
        );
      opacity:.08;
      animation: scanDrift 10s linear infinite;
    }

    @keyframes scanDrift{
      from { transform: translateY(0); }
      to   { transform: translateY(24px); }
    }

    /* Noise overlay */
    .fx-noise{
      z-index:-6;
      opacity:.06;
      background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
      animation: noiseShift 2.5s steps(6) infinite;
    }

    @keyframes noiseShift{
      0% { transform: translate3d(0,0,0); }
      20%{ transform: translate3d(-8px,6px,0); }
      40%{ transform: translate3d(10px,-6px,0); }
      60%{ transform: translate3d(-6px,-10px,0); }
      80%{ transform: translate3d(12px,8px,0); }
      100%{ transform: translate3d(0,0,0); }
    }

    /* Reduced motion support */
    @media (prefers-reduced-motion: reduce){
      .fx-grid, .orb, .fx-scan, .fx-noise{ animation:none !important; }
      .card-tech::before{ animation:none !important; }
      .btn-neon{ animation:none !important; }
    }