﻿/* ————— Modern Base Styles ————— */
    * { box-sizing: border-box; }
    
    body { 
      margin: 0;
      padding: 0;
      font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Seguro UI', system-ui, sans-serif;
      line-height: 1.6;
      letter-spacing: 0.02em;
      transition: all 0.3s ease;
      overflow-x: hidden;
    }
    
    /* ————— Modern Theme System ————— */
    body.light-mode { 
      background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
      color: #2d3748;
    }
    body.light-mode .card { 
      background: rgba(255, 255, 255, 0.95);
      color: #2d3748;
      border: 1px solid rgba(0, 0, 0, 0.08);
      backdrop-filter: blur(20px);
    }
    
    body.neon-mode { 
      background: radial-gradient(ellipse at top, #000428 0%, #004e92 100%);
      color: #39ff14;
    }
    
    body.retro-mode { 
      background: linear-gradient(45deg, #2b1d0e 0%, #8b4513 100%);
      color: #f4e2d2;
      font-family: 'Press Start 2P', monospace;
    }
    
    body.cyber-mode { 
      background: linear-gradient(135deg, #0c0c0c 0%, #1a1a2e 25%, #16213e 50%, #0f0f1a 100%);
      color: #00d4ff;
    }
    
    body.matrix-mode { 
      background: radial-gradient(ellipse at center, #001100 0%, #000000 100%);
      color: #00ff41;
      font-family: 'Courier New', monospace;
    }
    
    body.vaporwave-mode { 
      background: linear-gradient(45deg, #ff006e 0%, #8338ec 25%, #3a86ff 50%, #06ffa5 100%);
      color: #ffffff;
    }
    
    body.terminal-mode { 
      background: #0d1117;
      color: #58a6ff;
      font-family: 'JetBrains Mono', 'Fira Code', monospace;
    }
    
    body.alien-mode { 
      background: radial-gradient(ellipse at top, #0b0c10 0%, #1f2833 50%, #0b0c10 100%);
      color: #66fcf1;
    }
    
    body.sunset-mode { 
      background: linear-gradient(45deg, #ff9a9e 0%, #fecfef 25%, #fecfef 75%, #ff9a9e 100%);
      color: #2d3748;
    }

    /* ————— High-Contrast & Accessibility ————— */
    body.high-contrast { 
      background: #000000 !important; 
      color: #ffffff !important; 
    }
    body.high-contrast .card { 
      background: #000000 !important; 
      color: #ffffff !important; 
      border: 2px solid #ffffff !important; 
    }
    body.high-contrast .card .info { color: #ffffff !important; }

    /* ————— Modern Container System with Grid Layout ————— */
    .container {
      width: 100%;
      max-width: 1600px;
      margin: 0 auto;
      padding: 0 20px;
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
      gap: 20px;
      align-items: start;
    }

    /* ————— UPDATED: Compact Modern Card Design ————— */
    .card {
      background: rgba(255, 255, 255, 0.05);
      backdrop-filter: blur(20px);
      border: 1px solid rgba(255, 255, 255, 0.1);
      border-radius: 12px;
      padding: 16px;
      position: relative;
      transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
      box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.1),
        0 4px 16px rgba(0, 0, 0, 0.05);
      overflow: visible; /* CHANGED: Allow tooltips to show outside card */
      height: fit-content;
    }

    .card::before {
      content: '';

      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      height: 1px;
      background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.5), transparent);
      opacity: 0;
      transition: opacity 0.3s ease;
    }

    .card:hover {
      transform: translateY(-4px);
      box-shadow: 
        0 8px 24px rgba(0, 212, 255, 0.15),
        0 16px 48px rgba(0, 0, 0, 0.1);
      border-color: rgba(0, 212, 255, 0.3);
    }

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

    .card.highlight { 
      border-color: #00d4ff;
      box-shadow: 
        0 0 24px rgba(0, 212, 255, 0.4),
        0 4px 24px rgba(0, 212, 255, 0.2);
      background: rgba(0, 212, 255, 0.08);
    }

    .card.hidden {
      opacity: 0;
      transform: scale(0.95) translateY(20px);
      pointer-events: none;
      height: 0;
      margin: 0;
      padding: 0;
      border: 0;
      overflow: hidden;
      transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    }

    /* ————— UPDATED: Compact Card Header ————— */
    .card-header {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      margin-bottom: 12px;
      padding-bottom: 8px;
      border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .server-name {
      font-size: 1.1rem;
      font-weight: 700;
      margin: 0;
      background: linear-gradient(135deg, #00d4ff, #00ff88);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
      line-height: 1.2;
      flex: 1;
      margin-right: 8px;
    }

    /* ————— UPDATED: Compact Info Layout ————— */
    .info-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 8px 12px;
      margin-bottom: 12px;
    }

    .info {
      display: flex;
      flex-direction: column;
      font-size: 0.85rem;
      gap: 2px;
    }

    .info-label {
      color: rgba(255, 255, 255, 0.6);
      font-size: 0.75rem;
      font-weight: 500;
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }

    .info-value {
      color: #ffffff;
      font-weight: 600;
      font-size: 0.9rem;
    }

    /* ————— UPDATED: Compact IP Section with Enhanced Connection Status ————— */
    .ip-section {
      background: rgba(0, 0, 0, 0.2);
      border-radius: 8px;
      padding: 10px 12px;
      border: 1px solid rgba(255, 255, 255, 0.1);
      margin: 12px 0;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
    }

    .ip-info {
      display: flex;
      flex-direction: column;
      flex: 1;
      min-width: 0;
    }

    .ip-label {
      font-size: 0.75rem;
      color: rgba(255, 255, 255, 0.6);
      margin-bottom: 2px;
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }

    .ip-address {
      font-family: 'JetBrains Mono', monospace;
      font-size: 0.85rem;
      color: #00d4ff;
      font-weight: 600;
      word-break: break-all;
    }

    .copy-ip-btn {
      background: rgba(0, 212, 255, 0.1);
      border: 1px solid rgba(0, 212, 255, 0.3);
      border-radius: 6px;
      padding: 4px 8px;
      font-size: 1rem;
      cursor: pointer;
      transition: all 0.2s ease;
      color: #00d4ff;
      display: flex;
      align-items: center;
      justify-content: center;
      min-width: 32px;
      height: 28px;
    }

    .copy-ip-btn:hover {
      background: rgba(0, 212, 255, 0.2);
      border-color: #00d4ff;
      transform: scale(1.05);
    }

    .copy-ip-btn:active {
      transform: scale(0.95);
    }

    /* Favorite Star Button */
    .favorite-star {
      background: transparent;
      border: none;
      font-size: 1.3rem;
      cursor: pointer;
      padding: 0;
      margin-right: 8px;
      transition: all 0.2s ease;
      line-height: 1;
      filter: drop-shadow(0 0 4px rgba(255, 215, 0, 0.3));
    }

    .favorite-star:hover {
      transform: scale(1.2);
      filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.6));
    }

    .card.favorite {
      border: 2px solid rgba(255, 215, 0, 0.5);
      box-shadow: 0 0 20px rgba(255, 215, 0, 0.2);
    }

    /* Smart Badges */
    .smart-badges {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      padding: 8px 12px;
      margin-bottom: 8px;
    }

    .badge-pill {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      padding: 4px 10px;
      border-radius: 12px;
      font-size: 0.7rem;
      font-weight: 600;
      color: #fff;
      text-transform: uppercase;
      letter-spacing: 0.5px;
      box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
      animation: badgeFadeIn 0.3s ease;
    }

    @keyframes badgeFadeIn {
      from {
        opacity: 0;
        transform: scale(0.8);
      }
      to {
        opacity: 1;
        transform: scale(1);
      }
    }

    .connection-status {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 4px;
      flex-shrink: 0;
      position: relative;
    }

    .connection-dot {
      width: 10px;
      height: 10px;
      border-radius: 50%;
      transition: all 0.3s ease;
    }

    .connection-dot.excellent {
      background: #00ff88;
      box-shadow: 0 0 8px rgba(0, 255, 136, 0.6);
    }

    .connection-dot.good {
      background: #ffae42;
      box-shadow: 0 0 8px rgba(255, 174, 66, 0.6);
    }

    .connection-dot.poor {
      background: #ff6b6b;
      box-shadow: 0 0 8px rgba(255, 107, 107, 0.6);
    }

    .connection-text {
      font-size: 0.7rem;
      color: rgba(255, 255, 255, 0.8);
      font-weight: 500;
      text-align: center;
      cursor: help;
    }

    /* FIXED: Ping tooltip positioned above card with full visibility */
    .connection-status:hover::after {
      content: attr(data-tooltip);
      position: absolute;
      bottom: calc(100% + 15px);
      left: 50%;
      transform: translateX(-50%);
      background: rgba(0, 0, 0, 0.95);
      color: white;
      padding: 12px 16px;
      border-radius: 8px;
      font-size: 0.85rem;
      white-space: nowrap;
      z-index: 10000;
      border: 1px solid rgba(0, 212, 255, 0.5);
      box-shadow: 0 8px 24px rgba(0, 0, 0, 0.8);
      opacity: 0;
      animation: tooltipFadeIn 0.2s ease forwards;
      pointer-events: none;
      max-width: 300px;
      white-space: normal;
      text-align: center;
      backdrop-filter: blur(10px);
      line-height: 1.4;
    }

    /* Add arrow pointing down to connection status */
    .connection-status:hover::before {
      content: '';
      position: absolute;
      bottom: calc(100% + 9px);
      left: 50%;
      transform: translateX(-50%);
      width: 0;
      height: 0;
      border-left: 6px solid transparent;
      border-right: 6px solid transparent;
      border-top: 6px solid rgba(0, 0, 0, 0.95);
      z-index: 10001;
      opacity: 0;
      animation: tooltipFadeIn 0.2s ease forwards;
    }

    @keyframes tooltipFadeIn {
      to { opacity: 1; }
    }

    /* ————— UPDATED: Compact Team Scores ————— */
    .team-scores {
      display: flex;
      gap: 8px;
      margin: 12px 0;
    }

    .team-score {
      flex: 1;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      padding: 8px 6px;
      background: rgba(0, 0, 0, 0.2);
      border-radius: 8px;
      border: 1px solid rgba(255, 255, 255, 0.1);
      transition: all 0.2s ease;
      min-height: 40px;
    }

    .team-score:hover {
      background: rgba(0, 0, 0, 0.3);
      border-color: rgba(0, 212, 255, 0.3);
      transform: translateY(-1px);
    }

    .team-score img {
      width: 16px;
      height: 16px;
      border-radius: 50%;
      flex-shrink: 0;
    }

    .team-score .badge {
      font-size: 0.8rem;
      font-weight: 600;
      margin: 0;
      padding: 0;
      background: none;
      flex: 1;
      text-align: center;
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .badge.gdi { color: #ffd700; }
    .badge.nod { color: #dc2626; }
    .badge.allies { color: #2563eb; }
    .badge.soviets { color: #dc2626; }

    /* ————— UPDATED: Professional Join Button ————— */
    .join-btn {
      width: 100%;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      padding: 10px 16px;
      background: linear-gradient(135deg, #2563eb, #1d4ed8); /* Professional blue gradient */
      border: none;
      border-radius: 8px;
      color: #ffffff;
      font-size: 0.9rem;
      font-weight: 700;
      text-decoration: none;
      transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
      box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
      margin: 12px 0;
    }

    .join-btn:hover {
      transform: translateY(-2px);
      background: linear-gradient(135deg, #1d4ed8, #1e40af);
      box-shadow: 0 4px 16px rgba(37, 99, 235, 0.4);
    }

    /* ————— UPDATED: Compact Action Buttons ————— */
    .action-buttons {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 6px;
      margin: 12px 0;
    }

    .action-btn {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 4px;
      padding: 6px 8px;
      background: rgba(0, 212, 255, 0.1);
      border: 1px solid rgba(0, 212, 255, 0.3);
      border-radius: 6px;
      color: #00d4ff;
      font-size: 0.75rem;
      font-weight: 600;
      text-decoration: none;
      cursor: pointer;
      transition: all 0.3s ease;
      backdrop-filter: blur(10px);
      text-align: center;
      min-height: 32px;
    }

    .action-btn:hover {
      background: rgba(0, 212, 255, 0.2);
      border-color: rgba(0, 212, 255, 0.6);
      transform: translateY(-1px);
    }

    /* ————— UPDATED: Compact Drag Handle ————— */
    .drag-handle {
      width: 32px;
      height: 32px;
      display: flex;
      align-items: center;
      justify-content: center;
      background: rgba(0, 212, 255, 0.1);
      border: 1px solid rgba(0, 212, 255, 0.2);
      border-radius: 8px;
      cursor: grab;
      font-size: 1rem;
      user-select: none;
      transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
      backdrop-filter: blur(10px);
      flex-shrink: 0;
    }

    .drag-handle:hover,
    .drag-handle:focus {
      background: rgba(0, 212, 255, 0.2);
      border-color: rgba(0, 212, 255, 0.4);
      transform: scale(1.05);
    }

    .drag-handle:active {
      cursor: grabbing;
      transform: scale(0.95);
    }

    /* ————— Navigation Buttons ————— */
    .navigation-buttons {
      position: fixed;
      right: 20px;
      bottom: 20px;
      display: flex;
      flex-direction: column;
      gap: 12px;
      z-index: 1000;
    }

    .nav-btn {
      width: 60px;
      height: 60px;
      border-radius: 50%;
      background: rgba(0, 212, 255, 0.9);
      border: 2px solid rgba(0, 212, 255, 0.3);
      color: #000;
      font-size: 1.5rem;
      font-weight: bold;
      cursor: pointer;
      transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
      backdrop-filter: blur(20px);
      box-shadow: 0 8px 32px rgba(0, 212, 255, 0.3);
      display: flex;
      align-items: center;
      justify-content: center;
      text-decoration: none;
    }

    .nav-btn:hover {
      transform: scale(1.1);
      background: rgba(0, 255, 136, 0.9);
      box-shadow: 0 12px 48px rgba(0, 255, 136, 0.4);
      border-color: rgba(0, 255, 136, 0.5);
    }

    .nav-btn:active {
      transform: scale(0.95);
    }

    /* ————— Modern Player Table ————— */
    .player-table-container {
      background: rgba(0, 0, 0, 0.2);
      border-radius: 8px;
      overflow: hidden;
      border: 1px solid rgba(255, 255, 255, 0.1);
      margin-top: 12px;
    }

    .player-table {
      width: 100%;
      border-collapse: separate;
      border-spacing: 0;
      background: transparent;
    }

    .player-table th {
      background: rgba(0, 212, 255, 0.1);
      color: #00d4ff;
      padding: 8px 6px;
      text-align: left;
      font-weight: 600;
      font-size: 0.75rem;
      text-transform: uppercase;
      letter-spacing: 0.5px;
      border-bottom: 1px solid rgba(0, 212, 255, 0.2);
      cursor: pointer;
      transition: all 0.2s ease;
      position: relative;
    }

    .player-table th:hover {
      background: rgba(0, 212, 255, 0.15);
    }

    .player-table th::after {
      content: '↕';
      position: absolute;
      right: 6px;
      opacity: 0.5;
      font-size: 0.7rem;
    }

    .player-table th.sorted-asc::after {
      content: '↑';
      opacity: 1;
      color: #00ff88;
    }

    .player-table th.sorted-desc::after {
      content: '↓';
      opacity: 1;
      color: #ff6b6b;
    }

    .player-table td {
      padding: 6px;
      border-bottom: 1px solid rgba(255, 255, 255, 0.05);
      font-size: 0.8rem;
      transition: background 0.2s ease;
    }

    .player-table tr:hover td {
      background: rgba(0, 212, 255, 0.05);
    }

    .player-table tr:last-child td {
      border-bottom: none;
    }

    /* ————— Modern Progress Bars ————— */
    .player-bar-wrap {
      display: flex;
      align-items: center;
      gap: 8px;
      margin: 8px 0;
    }

    .player-bar-bg {
      flex: 1;
      height: 6px;
      background: rgba(255, 255, 255, 0.1);
      border-radius: 20px;
      overflow: hidden;
      position: relative;
    }

    .player-bar-fill {
      height: 100%;
      border-radius: 20px;
      position: relative;
      transition: all 0.8s cubic-bezier(0.23, 1, 0.32, 1);
      background: linear-gradient(90deg, #00d4ff, #00ff88);
    }

    .player-bar-text {
      font-size: 0.75rem;
      color: rgba(255, 255, 255, 0.8);
      font-weight: 600;
      min-width: 40px;
      text-align: right;
    }

    /* ————— Modern Player/Building Panels ————— */
    .players, .buildings {
      display: none;
      margin-top: 12px;
      background: rgba(0, 0, 0, 0.3);
      backdrop-filter: blur(20px);
      border: 1px solid rgba(0, 212, 255, 0.2);
      border-radius: 8px;
      padding: 12px;
      max-height: 300px;
      overflow-y: auto;
      transition: all 0.3s ease;
      scrollbar-width: thin;
      scrollbar-color: #00d4ff rgba(0, 0, 0, 0.2);
    }

    .players::-webkit-scrollbar,
    .buildings::-webkit-scrollbar {
      width: 6px;
    }

    .players::-webkit-scrollbar-track,
    .buildings::-webkit-scrollbar-track {
      background: rgba(0, 0, 0, 0.2);
      border-radius: 20px;
    }

    .players::-webkit-scrollbar-thumb,
    .buildings::-webkit-scrollbar-thumb {
      background: linear-gradient(180deg, #00d4ff, #00ff88);
      border-radius: 20px;
    }

    /* ————— Colorful Scrollbar for Player Stats Table (horizontal) ————— */
    .player-stats-scroll {
      scrollbar-width: thin;
      scrollbar-color: #00d4ff rgba(0, 212, 255, 0.1);
    }

    .player-stats-scroll::-webkit-scrollbar {
      height: 8px;
    }

    .player-stats-scroll::-webkit-scrollbar-track {
      background: rgba(0, 212, 255, 0.1);
      border-radius: 4px;
    }

    .player-stats-scroll::-webkit-scrollbar-thumb {
      background: linear-gradient(90deg, #00d4ff, #00ff88);
      border-radius: 4px;
    }

    .player-stats-scroll::-webkit-scrollbar-thumb:hover {
      background: linear-gradient(90deg, #00ff88, #00d4ff);
    }

    /* ————— Modern Building Bars ————— */
    .building-bar-wrap {
      display: flex;
      align-items: center;
      gap: 8px;
      margin: 6px 0;
    }

    .building-bar-bg {
      flex: 1;
      height: 8px;
      background: rgba(255, 255, 255, 0.1);
      border-radius: 20px;
      overflow: hidden;
      position: relative;
    }

    .building-bar-fill {
      height: 100%;
      border-radius: 20px;
      transition: all 1s cubic-bezier(0.23, 1, 0.32, 1);
      position: relative;
    }

    /* ————— Modern Top Menu ————— */
    .top-menu {
      background: rgba(0, 0, 0, 0.3);
      backdrop-filter: blur(20px);
      border-bottom: 1px solid rgba(0, 212, 255, 0.2);
      padding: 16px 0;
      margin-bottom: 32px;
      position: relative;
      box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
      z-index: 9999;
    }

    .top-menu ul {
      list-style: none;
      display: flex;
      justify-content: center;
      align-items: center;
      gap: 8px;
      padding: 0;
      margin: 0;
      flex-wrap: wrap;
    }

    .top-menu a {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 12px 20px;
      background: rgba(0, 212, 255, 0.05);
      border: 1px solid rgba(0, 212, 255, 0.2);
      border-radius: 12px;
      color: #00d4ff;
      text-decoration: none;
      font-weight: 600;
      font-size: 0.9rem;
      transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
      backdrop-filter: blur(10px);
    }

    .top-menu a:hover {
      background: rgba(0, 212, 255, 0.15);
      border-color: rgba(0, 212, 255, 0.4);
      transform: translateY(-2px);
      box-shadow: 0 8px 24px rgba(0, 212, 255, 0.2);
    }

    .top-menu .dropdown {
      position: relative;
      z-index: 10000;
    }

    .top-menu .dropdown-content {
      display: none;
      position: absolute;
      top: calc(100% + 4px);
      right: 0;
      background: rgba(0, 0, 0, 0.95);
      backdrop-filter: blur(20px);
      border: 1px solid rgba(0, 212, 255, 0.5);
      border-radius: 16px;
      padding: 12px 16px;
      min-width: 280px;
      box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(0, 212, 255, 0.3);
      z-index: 10001;
    }

    /* Add a bridge between button and dropdown to prevent closing */
    .top-menu .dropdown-content::before {
      content: '';
      position: absolute;
      top: -8px;
      left: 0;
      right: 0;
      height: 12px;
      background: transparent;
    }

    .top-menu .dropdown:hover .dropdown-content {
      display: block;
      animation: dropdownFadeIn 0.3s ease;
    }

    /* Keep dropdown open when hovering over the content itself */
    .top-menu .dropdown-content:hover {
      display: block;
    }

    @keyframes dropdownFadeIn {
      from {
        opacity: 0;
        transform: translateY(-8px);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    .top-menu .dropdown-content a {
      display: block;
      margin: 6px 0;
      border-radius: 10px;
      padding: 12px 20px;
      min-height: 40px;
      cursor: pointer;
      transition: all 0.2s ease;
    }

    .top-menu .dropdown-content a:hover {
      background: rgba(0, 212, 255, 0.15);
      transform: translateX(4px);
    }

    /* ————— Modern Controls Toolbar ————— */
    .controls-toolbar {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
      gap: 20px;
      background: rgba(0, 0, 0, 0.3);
      backdrop-filter: blur(20px);
      border: 1px solid rgba(0, 212, 255, 0.2);
      border-radius: 20px;
      padding: 24px;
      margin-bottom: 32px;
      box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    }

    .controls-toolbar label {
      display: flex;
      flex-direction: column;
      gap: 8px;
      color: #00d4ff;
      font-weight: 600;
      font-size: 0.9rem;
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }

    .controls-toolbar select,
    .controls-toolbar input[type="text"] {
      padding: 12px 16px;
      background: rgba(0, 0, 0, 0.4);
      border: 1px solid rgba(0, 212, 255, 0.3);
      border-radius: 12px;
      color: inherit;
      font-size: 0.9rem;
      transition: all 0.3s ease;
      backdrop-filter: blur(10px);
    }

    .controls-toolbar select:focus,
    .controls-toolbar input[type="text"]:focus {
      outline: none;
      border-color: #00d4ff;
      box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.2);
      background: rgba(0, 0, 0, 0.6);
    }

    .controls-toolbar input[type="checkbox"] {
      width: 20px;
      height: 20px;
      accent-color: #00d4ff;
      border-radius: 4px;
    }

    .mag-btn {
      padding: 8px 12px;
      background: rgba(0, 212, 255, 0.1);
      border: 1px solid rgba(0, 212, 255, 0.3);
      border-radius: 8px;
      color: #00d4ff;
      font-size: 0.9rem;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.2s ease;
      margin: 0 2px;
    }

    .mag-btn:hover {
      background: rgba(0, 212, 255, 0.2);
      transform: scale(1.05);
    }

    /* ————— Modern Modals ————— */
    #statsModal, #fullInfoModal, #serverInfoModal {
      position: fixed;
      top: 0;
      left: 0;
      width: 100vw;
      height: 100vh;
      background: rgba(0, 0, 0, 0.8);
      backdrop-filter: blur(20px);
      z-index: 10000;
      display: flex;
      align-items: center;
      justify-content: center;
      opacity: 0;
      animation: modalFadeIn 0.3s ease forwards;
    }

    @keyframes modalFadeIn {
      to { opacity: 1; }
    }

    .stats-content, .fullinfo-content, .serverinfo-content {
      background: rgba(0, 0, 0, 0.9);
      backdrop-filter: blur(40px);
      border: 1px solid rgba(0, 212, 255, 0.3);
      border-radius: 24px;
      box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
      overflow: hidden;
      position: relative;
      animation: modalSlideIn 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    }

    @keyframes modalSlideIn {
      from {
        transform: scale(0.9) translateY(20px);
        opacity: 0;
      }
      to {
        transform: scale(1) translateY(0);
        opacity: 1;
      }
    }

    .stats-content {
      width: min(95vw, 1000px);
      height: min(90vh, 600px);
    }

    .fullinfo-content, .serverinfo-content {
      width: min(95vw, 1400px);
      height: min(90vh, 800px);
      resize: both;
      min-width: 300px;
      min-height: 400px;
    }

    .fullinfo-header, .serverinfo-header {
      background: linear-gradient(135deg, #00d4ff, #00ff88);
      color: #000;
      padding: 20px 24px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      font-weight: 700;
      cursor: move;
    }

    .fullinfo-controls, .serverinfo-controls {
      display: flex;
      gap: 12px;
      align-items: center;
    }

    .fullinfo-btn, .serverinfo-btn {
      background: rgba(0, 0, 0, 0.8);
      color: #00d4ff;
      border: 1px solid rgba(0, 212, 255, 0.3);
      border-radius: 10px;
      padding: 8px 16px;
      cursor: pointer;
      font-size: 0.85rem;
      font-weight: 600;
      transition: all 0.3s ease;
    }

    .fullinfo-btn:hover, .serverinfo-btn:hover {
      background: rgba(0, 212, 255, 0.1);
      border-color: #00d4ff;
      transform: translateY(-2px);
    }

    .fullinfo-body, .serverinfo-body {
      padding: 24px;
      height: calc(100% - 80px);
      overflow-y: auto;
      background: rgba(0, 0, 0, 0.4);
    }

    .fullinfo-section, .serverinfo-section {
      margin-bottom: 32px;
      background: rgba(0, 212, 255, 0.05);
      border: 1px solid rgba(0, 212, 255, 0.2);
      border-radius: 16px;
      padding: 20px;
      backdrop-filter: blur(10px);
    }

    .fullinfo-section h3, .serverinfo-section h3 {
      color: #00d4ff;
      margin: 0 0 20px 0;
      font-size: 1.3rem;
      font-weight: 700;
      padding-bottom: 12px;
      border-bottom: 2px solid rgba(0, 212, 255, 0.3);
    }

    .fullinfo-grid, .serverinfo-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
      gap: 16px;
      margin-bottom: 20px;
    }

    .fullinfo-item, .serverinfo-item {
      background: rgba(0, 0, 0, 0.3);
      padding: 16px;
      border-radius: 12px;
      border: 1px solid rgba(255, 255, 255, 0.1);
      transition: all 0.2s ease;
    }

    .fullinfo-item:hover, .serverinfo-item:hover {
      background: rgba(0, 0, 0, 0.4);
      border-color: rgba(0, 212, 255, 0.3);
    }

    .fullinfo-item strong, .serverinfo-item strong {
      display: block;
      color: #00d4ff;
      font-size: 0.85rem;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.5px;
      margin-bottom: 8px;
      opacity: 0.9;
    }

    .fullinfo-value, .serverinfo-value {
      color: #ffffff;
      font-size: 1.1rem;
      font-weight: 500;
    }

    .fullinfo-player-table, .serverinfo-player-table {
      width: 100%;
      border-collapse: separate;
      border-spacing: 0;
      background: rgba(0, 0, 0, 0.3);
      border-radius: 12px;
      overflow: hidden;
      border: 1px solid rgba(255, 255, 255, 0.1);
    }

    .fullinfo-player-table th, .serverinfo-player-table th {
      background: rgba(0, 212, 255, 0.1);
      color: #00d4ff;
      padding: 16px 12px;
      text-align: left;
      font-weight: 600;
      font-size: 0.85rem;
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }

    .fullinfo-player-table td, .serverinfo-player-table td {
      padding: 12px;
      border-bottom: 1px solid rgba(255, 255, 255, 0.05);
      color: #ffffff;
      font-size: 0.9rem;
    }

    .fullinfo-player-table tr:hover td, .serverinfo-player-table tr:hover td {
      background: rgba(0, 212, 255, 0.05);
    }

    .fullinfo-team-icon, .serverinfo-team-icon {
      width: 24px;
      height: 24px;
      border-radius: 50%;
    }

    /* ————— Map Rotation Calendar - DISABLED 31/07-25 by Ali / P4L-DK ————— */
    .map-rotation-btn {
      display: none !important; /* DISABLED: Map rotation button removed 31/07-25 by Ali / P4L-DK */
    }

    .map-rotation-modal {
      display: none !important; /* DISABLED: Map rotation modal removed 31/07-25 by Ali / P4L-DK */
    }

    /* ————— Modern Typography & Layout ————— */
    h1 {
      font-size: clamp(1.8rem, 4vw, 3rem);
      font-weight: 800;
      text-align: center;
      margin: 2rem 0 1rem;
      background: linear-gradient(135deg, #00d4ff, #00ff88, #ff6b6b);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
      line-height: 1.2;
    }

    /* ————— Modern Loading States ————— */
    .flashing-wait {
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 40px;
      font-size: 1.1rem;
      font-weight: 600;
      color: #00d4ff;
      animation: pulse 2s infinite;
    }

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

    .flashing-wait::before {
      content: '';
      width: 20px;
      height: 20px;
      border: 2px solid transparent;
      border-top: 2px solid #00d4ff;
      border-radius: 50%;
      margin-right: 12px;
      animation: spin 1s linear infinite;
    }

    @keyframes spin {
      0% { transform: rotate(0deg); }
      100% { transform: rotate(360deg); }
    }

    /* ————— Apply Cyber Theme by Default ————— */
    body {
      background: linear-gradient(135deg, #0c0c0c 0%, #1a1a2e 25%, #16213e 50%, #0f0f1a 100%);
      color: #00d4ff;
      min-height: 100vh;
    }

    .controls-toolbar label,
    .controls-toolbar > div {
      font-size: 0.9rem;
      font-weight: 600;
      color: #00d4ff;
      text-shadow: 0 0 8px rgba(0, 212, 255, 0.3);
    }

    .controls-toolbar select,
    .controls-toolbar input {
      font-size: 0.9rem;
      padding: 10px 12px;
      border-radius: 10px;
      border: 1px solid rgba(0, 212, 255, 0.3);
      background: rgba(0, 0, 0, 0.4);
      color: inherit;
      margin-left: 0;
      min-width: auto;
      backdrop-filter: blur(10px);
    }

    .controls-toolbar input[type="checkbox"] {
      accent-color: #00d4ff;
      width: 18px;
      height: 18px;
    }

    /* Now Playing Enhanced */
    #nowPlaying {
      background: rgba(0, 0, 0, 0.3);
      backdrop-filter: blur(20px);
      border: 1px solid rgba(0, 212, 255, 0.2);
      border-radius: 16px;
      padding: 16px 24px;
      margin-bottom: 24px;
      text-align: center;
      font-size: 1rem;
      font-weight: 600;
      color: #00d4ff;
      box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    }

    /* ————— Responsive Design ————— */
    @media (max-width: 1200px) {
      .container {
        padding: 0 16px;
        grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
      }
      
      .controls-toolbar {
        grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr));
        gap: 16px;
        padding: 20px;
      }
      
      .fullinfo-content, .serverinfo-content {
        width: 95vw;
        height: 90vh;
      }
    }

    @media (max-width: 768px) {
      .container {
        grid-template-columns: 1fr;
        padding: 0 12px;
        gap: 16px;
        max-width: 100%;
        width: 100%;
      }

      .card {
        padding: 12px;
        width: 100%;
        max-width: 100%;
        margin: 0 auto;
        overflow-x: hidden;
        box-sizing: border-box;
      }

      .card-header {
        margin-bottom: 8px;
      }

      .server-name {
        font-size: 1rem;
      }

      .info-grid {
        gap: 6px 8px;
        margin-bottom: 8px;
      }

      .info {
        font-size: 0.8rem;
      }

      .info-label {
        font-size: 0.7rem;
      }

      .info-value {
        font-size: 0.85rem;
      }

      .ip-section {
        padding: 8px 10px;
        margin: 8px 0;
      }

      .ip-address {
        font-size: 0.8rem;
      }

      .connection-text {
        font-size: 0.7rem;
      }

      .team-scores {
        gap: 6px;
        margin: 8px 0;
        flex-wrap: wrap;
      }

      .team-score {
        padding: 6px 4px;
        min-height: 36px;
        min-width: 0;
        flex: 1 1 45%;
      }

      .team-score .badge {
        font-size: 0.75rem;
      }

      .join-btn {
        padding: 8px 12px;
        font-size: 0.85rem;
        margin: 8px 0;
        width: 100%;
        box-sizing: border-box;
      }

      .ip-section {
        flex-wrap: wrap;
        width: 100%;
        box-sizing: border-box;
      }

      .server-name {
        word-break: break-word;
        overflow-wrap: break-word;
      }

      .info-value {
        word-break: break-word;
        overflow-wrap: break-word;
      }

      .action-buttons {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        gap: 6px;
        margin: 8px 0;
        padding-bottom: 8px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        scrollbar-color: #00d4ff rgba(0, 212, 255, 0.1);
      }
      
      .action-buttons::-webkit-scrollbar {
        height: 6px;
      }
      
      .action-buttons::-webkit-scrollbar-track {
        background: rgba(0, 212, 255, 0.1);
        border-radius: 3px;
      }
      
      .action-buttons::-webkit-scrollbar-thumb {
        background: linear-gradient(90deg, #00d4ff, #00ff88);
        border-radius: 3px;
      }

      .action-btn {
        flex-shrink: 0;
        white-space: nowrap;
        padding: 6px 10px;
        font-size: 0.75rem;
        min-height: 32px;
        min-width: auto;
      }

      .players, .buildings {
        max-height: 250px;
        margin-top: 8px;
        padding: 8px;
      }

      .player-stats-scroll {
        margin-bottom: 4px;
      }

      .drag-handle {
        width: 28px;
        height: 28px;
        font-size: 0.9rem;
      }

      .top-menu {
        padding: 12px 0;
      }

      .top-menu ul {
        flex-direction: column;
        gap: 8px;
      }

      .top-menu a {
        padding: 10px 16px;
        font-size: 0.85rem;
      }

      .controls-toolbar {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 16px;
      }

      .player-table th,
      .player-table td {
        padding: 4px 3px;
        font-size: 0.75rem;
      }

      .fullinfo-content, .serverinfo-content {
        width: 98vw;
        height: 95vh;
        min-width: 300px;
      }

      .fullinfo-header, .serverinfo-header {
        padding: 16px;
        flex-direction: column;
        gap: 12px;
        text-align: center;
      }

      .fullinfo-controls, .serverinfo-controls {
        flex-wrap: wrap;
        justify-content: center;
      }

      .fullinfo-grid, .serverinfo-grid {
        grid-template-columns: 1fr;
      }

      .navigation-buttons {
        right: 10px;
        bottom: 10px;
      }

      .nav-btn {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
      }
    }

    @media (max-width: 480px) {
      .container {
        padding: 0 8px;
        gap: 12px;
        max-width: 100%;
        width: 100%;
      }

      .card {
        padding: 10px;
        border-radius: 8px;
        width: 100%;
        max-width: 100%;
      }

      .server-name {
        font-size: 0.95rem;
      }

      .info-grid {
        grid-template-columns: 1fr;
        gap: 4px;
      }

      .action-buttons {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        gap: 6px;
        padding-bottom: 8px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        scrollbar-color: #00d4ff rgba(0, 212, 255, 0.1);
      }

      .action-buttons::-webkit-scrollbar {
        height: 6px;
      }

      .action-buttons::-webkit-scrollbar-track {
        background: rgba(0, 212, 255, 0.1);
        border-radius: 3px;
      }

      .action-buttons::-webkit-scrollbar-thumb {
        background: linear-gradient(90deg, #00d4ff, #00ff88);
        border-radius: 3px;
      }

      .controls-toolbar {
        padding: 12px;
        border-radius: 16px;
      }

      .stats-content {
        width: 98vw;
        height: 95vh;
      }

      .nav-btn {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
      }

      .navigation-buttons {
        right: 8px;
        bottom: 8px;
        gap: 8px;
      }
    }

    /* ————— Enhanced Focus States ————— */
    *:focus-visible {
      outline: 2px solid #00d4ff;
      outline-offset: 2px;
      border-radius: 4px;
    }

    /* ————— Modern Footer ————— */
    .footer {
      text-align: center;
      margin-top: 40px;
      padding: 24px;
      background: rgba(0, 0, 0, 0.3);
      backdrop-filter: blur(20px);
      border-top: 1px solid rgba(0, 212, 255, 0.2);
      border-radius: 20px 20px 0 0;
      font-size: 0.9rem;
      color: rgba(255, 255, 255, 0.8);
    }

    .footer a {
      color: #00ff88;
      text-decoration: none;
      font-weight: 600;
      transition: all 0.2s ease;
    }

    .footer a:hover {
      color: #00d4ff;
      text-shadow: 0 0 8px rgba(0, 212, 255, 0.5);
    }

    /* ————— Modern Cookie Consent ————— */
    #cookie-consent-bar {
      background: rgba(0, 0, 0, 0.95);
      backdrop-filter: blur(20px);
      border-top: 1px solid rgba(0, 212, 255, 0.3);
      box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.3);
      padding: 20px;
      border-radius: 20px 20px 0 0;
    }

    #cookie-consent-bar button {
      background: linear-gradient(135deg, #00d4ff, #00ff88);
      color: #000;
      border: none;
      padding: 10px 20px;
      border-radius: 12px;
      font-weight: 700;
      cursor: pointer;
      transition: all 0.3s ease;
      margin-left: 16px;
    }

    #cookie-consent-bar button:hover {
      transform: translateY(-2px);
      box-shadow: 0 8px 24px rgba(0, 255, 136, 0.4);
    }

    /* ————— Animated Player Count ————— */
    .player-count-animated {
      display: inline-block;
      transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
      position: relative;
    }

    .player-count-change {
      position: absolute;
      right: -20px;
      top: 50%;
      transform: translateY(-50%);
      font-size: 0.7rem;
      font-weight: bold;
      opacity: 0;
      animation: countChange 2s ease-out forwards;
      pointer-events: none;
    }

    .player-count-change.increase {
      color: #00ff88;
    }

    .player-count-change.decrease {
      color: #ff6b6b;
    }

    @keyframes countChange {
      0% {
        opacity: 1;
        transform: translateY(-50%) translateX(0);
      }
      50% {
        opacity: 1;
        transform: translateY(-50%) translateX(5px);
      }
      100% {
        opacity: 0;
        transform: translateY(-50%) translateX(10px);
      }
    }

    @keyframes numberPulse {
      0%, 100% {
        transform: scale(1);
      }
      50% {
        transform: scale(1.1);
        color: #00ff88;
      }
    }

    .player-count-pulse {
      animation: numberPulse 0.5s ease-in-out;
    }


/* ===== Banner Logo Styling ===== */
.nav-logo {
  display: flex;
  align-items: center;
  justify-content: center;
}

.banner-logo {
  display: block;
  height: auto;
  max-height: 80px;
  width: auto;
  max-width: 100%;
  filter: drop-shadow(0 0 10px rgba(0, 212, 255, 0.3));
  transition: all 0.3s ease;
}

.banner-logo:hover {
  filter: drop-shadow(0 0 15px rgba(0, 212, 255, 0.5)) drop-shadow(0 0 20px rgba(255, 215, 0, 0.3));
  transform: scale(1.02);
}

@media (max-width: 768px) {
  .banner-logo {
    max-height: 60px;
  }
}

@media (max-width: 480px) {
  .banner-logo {
    max-height: 50px;
  }
}


/* ===== PNG Logo Hover Effects ===== */
.nav-logo img {
  transition: all 0.3s ease;
}

.nav-logo img:hover {
  transform: scale(1.15) rotate(5deg);
}

.nav-logo img[alt="GDI"]:hover {
  filter: drop-shadow(0 0 15px rgba(255, 215, 0, 0.9)) !important;
}

.nav-logo img[alt="NOD"]:hover {
  filter: drop-shadow(0 0 15px rgba(204, 0, 0, 0.9)) !important;
}

@media (max-width: 768px) {
  .nav-logo img {
    width: 40px !important;
    height: 40px !important;
  }
  .nav-logo span {
    font-size: 1rem !important;
  }
}

@media (max-width: 480px) {
  .nav-logo img {
    width: 30px !important;
    height: 30px !important;
  }
  .nav-logo span {
    font-size: 0.8rem !important;
  }
}


/* ===== C&C RENEGADE STYLE TEXT ===== */
.renegade-text {
  font-family: 'Arial Black', 'Impact', sans-serif;
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-style: normal;
  
  /* Metallic gradient (silver/gray with gold/orange highlights) */
  background: linear-gradient(
    180deg,
    #E8E8E8 0%,
    #BEBEBE 15%,
    #808080 30%,
    #606060 50%,
    #707070 60%,
    #909090 75%,
    #C0C0C0 85%,
    #D4AF37 95%,
    #FF8C00 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  
  /* 3D beveled effect with multiple shadows */
  filter: 
    drop-shadow(2px 2px 0px rgba(0, 0, 0, 0.8))
    drop-shadow(-1px -1px 0px rgba(255, 255, 255, 0.3))
    drop-shadow(3px 3px 2px rgba(0, 0, 0, 0.6))
    drop-shadow(0 0 8px rgba(255, 140, 0, 0.4));
  
  /* Text outline for extra depth */
  -webkit-text-stroke: 0.5px rgba(0, 0, 0, 0.5);
  
  position: relative;
  display: inline-block;
}

.renegade-text.renegade-subtitle {
  font-size: 1.2rem;
  letter-spacing: 3px;
  
  /* Slightly different gradient for variety */
  background: linear-gradient(
    180deg,
    #F0F0F0 0%,
    #C8C8C8 15%,
    #888888 30%,
    #686868 50%,
    #787878 60%,
    #989898 75%,
    #B8B8B8 85%,
    #DAA520 95%,
    #FFA500 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Hover effect - add orange glow */
.renegade-text:hover {
  filter: 
    drop-shadow(2px 2px 0px rgba(0, 0, 0, 0.8))
    drop-shadow(-1px -1px 0px rgba(255, 255, 255, 0.4))
    drop-shadow(3px 3px 2px rgba(0, 0, 0, 0.6))
    drop-shadow(0 0 12px rgba(255, 140, 0, 0.8))
    drop-shadow(0 0 20px rgba(255, 140, 0, 0.5));
  
  transform: translateY(-1px);
  transition: all 0.3s ease;
}

/* Responsive sizing */
@media (max-width: 768px) {
  .renegade-text {
    font-size: 1.2rem;
    letter-spacing: 1px;
  }
  .renegade-text.renegade-subtitle {
    font-size: 1rem;
    letter-spacing: 2px;
  }
}

@media (max-width: 480px) {
  .renegade-text {
    font-size: 1rem;
    letter-spacing: 0.5px;
  }
  .renegade-text.renegade-subtitle {
    font-size: 0.85rem;
    letter-spacing: 1px;
  }
}


/* ===== LOGO ANIMATIONS & CLICKABLE EFFECTS ===== */

/* Subtle pulse animation for GDI logo */
@keyframes gdiPulse {
  0%, 100% {
    filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.5));
    transform: scale(1);
  }
  50% {
    filter: drop-shadow(0 0 15px rgba(255, 215, 0, 0.8));
    transform: scale(1.05);
  }
}

/* Subtle pulse animation for NOD logo */
@keyframes nodPulse {
  0%, 100% {
    filter: drop-shadow(0 0 8px rgba(204, 0, 0, 0.5));
    transform: scale(1);
  }
  50% {
    filter: drop-shadow(0 0 15px rgba(204, 0, 0, 0.8));
    transform: scale(1.05);
  }
}

/* Logo spinning animation on hover */
@keyframes logoSpin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Apply animations */
.logo-gdi {
  animation: gdiPulse 3s ease-in-out infinite;
  transition: all 0.3s ease;
}

.logo-nod {
  animation: nodPulse 3s ease-in-out infinite 1.5s;
  transition: all 0.3s ease;
}

/* Hover effects for individual logos */
.nav-logo-link:hover .logo-gdi {
  animation: logoSpin 0.8s ease-in-out;
  filter: drop-shadow(0 0 20px rgba(255, 215, 0, 1)) !important;
}

.nav-logo-link:hover .logo-nod {
  animation: logoSpin 0.8s ease-in-out reverse;
  filter: drop-shadow(0 0 20px rgba(204, 0, 0, 1)) !important;
}

/* Entire logo link hover effect */
.nav-logo-link {
  transition: all 0.3s ease;
}

.nav-logo-link:hover {
  transform: translateY(-2px);
}

.nav-logo-link:active {
  transform: translateY(0px) scale(0.98);
}

/* Text glow on logo hover */
.nav-logo-link:hover .renegade-text {
  filter: 
    drop-shadow(2px 2px 0px rgba(0, 0, 0, 0.8))
    drop-shadow(-1px -1px 0px rgba(255, 255, 255, 0.4))
    drop-shadow(3px 3px 2px rgba(0, 0, 0, 0.6))
    drop-shadow(0 0 15px rgba(255, 215, 0, 1))
    drop-shadow(0 0 25px rgba(204, 0, 0, 0.8));
}

/* ========================================
   HEATMAP STYLES
   ======================================== */

.heatmap-container {
  background: rgba(26, 26, 46, 0.8);
  border: 1px solid rgba(0, 212, 255, 0.3);
  border-radius: 8px;
  padding: 20px;
  backdrop-filter: blur(10px);
}

.heatmap-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.heatmap-header h3 {
  font-family: 'Orbitron', monospace;
  font-size: 1.4rem;
  color: #00d4ff;
  margin: 0;
  text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

.heatmap-controls select {
  background: rgba(13, 79, 79, 0.6);
  color: #00d4ff;
  border: 1px solid rgba(0, 212, 255, 0.3);
  border-radius: 4px;
  padding: 8px 12px;
  font-family: 'Orbitron', monospace;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.heatmap-controls select:hover {
  background: rgba(13, 79, 79, 0.9);
  border-color: #00d4ff;
}

.heatmap-grid {
  display: grid;
  grid-template-columns: 80px repeat(24, 1fr);
  gap: 2px;
  margin-bottom: 20px;
  font-size: 0.75rem;
}

.heatmap-hour-label,
.heatmap-day-label {
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.7rem;
  font-weight: 500;
  padding: 4px 2px;
  text-align: center;
}

.heatmap-day-label {
  font-size: 0.75rem;
  justify-content: flex-end;
  padding-right: 8px;
  color: #00d4ff;
}

.heatmap-cell {
  aspect-ratio: 1;
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.heatmap-cell:hover {
  transform: scale(1.2);
  z-index: 10;
  box-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

.heatmap-cell.level-0 {
  background: #1a1a2e;
}

.heatmap-cell.level-1 {
  background: #0d4f4f;
}

.heatmap-cell.level-2 {
  background: #00d4ff;
}

.heatmap-cell.level-3 {
  background: #00ff88;
}

.heatmap-cell.level-4 {
  background: #ff00ff;
}

.heatmap-cell[data-tooltip]:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.95);
  color: #fff;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 0.75rem;
  white-space: nowrap;
  z-index: 1000;
  pointer-events: none;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(0, 212, 255, 0.5);
}

.heatmap-legend {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 20px 0;
}

.legend-label {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
}

.legend-scale {
  display: flex;
  gap: 4px;
}

.legend-cell {
  width: 24px;
  height: 24px;
  border-radius: 3px;
  cursor: help;
  transition: transform 0.2s ease;
}

.legend-cell:hover {
  transform: scale(1.2);
}

.heatmap-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.heatmap-stat-card {
  background: rgba(13, 79, 79, 0.4);
  border: 1px solid rgba(0, 212, 255, 0.3);
  border-radius: 8px;
  padding: 16px;
  text-align: center;
  transition: all 0.3s ease;
}

.heatmap-stat-card:hover {
  background: rgba(13, 79, 79, 0.6);
  border-color: #00d4ff;
  transform: translateY(-2px);
}

.stat-icon {
  font-size: 2rem;
  margin-bottom: 8px;
}

.stat-value {
  font-size: 1.8rem;
  font-weight: bold;
  color: #00ff88;
  font-family: 'Orbitron', monospace;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.heatmap-loading {
  text-align: center;
  padding: 40px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 1rem;
}


/* ===== COMPREHENSIVE MOBILE RESPONSIVE DESIGN ===== */

/* Top navigation mobile fixes */
@media (max-width: 1024px) {
  .top-menu {
    padding: 12px 0;
  }
  
  .top-menu ul {
    gap: 6px;
  }
  
  .top-menu a {
    padding: 8px 12px;
    font-size: 0.85rem;
  }
}

@media (max-width: 768px) {
  /* Logo adjustments */
  .nav-logo-link {
    gap: 10px !important;
  }
  
  .logo-gdi,
  .logo-nod {
    width: 40px !important;
    height: 40px !important;
  }
  
  /* Hide reload tooltip on mobile */
  .nav-logo-link::after {
    display: none;
  }
  
  /* Stack navigation vertically on small screens */
  .top-menu > div {
    flex-direction: column;
    gap: 12px;
    padding: 12px 15px !important;
  }
  
  .top-menu ul {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }
  
  .top-menu a {
    font-size: 0.8rem;
    padding: 8px 10px;
  }
  
  /* Dropdown adjustments */
  .top-menu .dropdown-content {
    min-width: 240px;
    padding: 10px 12px;
  }
  
  .top-menu .dropdown-content a {
    padding: 8px 12px;
    font-size: 0.85rem;
  }
  
  /* Compact info bar */
  .compact-info-bar {
    font-size: 0.6rem !important;
    flex-wrap: wrap;
  }
  
  /* Toolbar buttons */
  #toggleToolbar,
  #toggleHeatmap {
    font-size: 0.65rem !important;
    padding: 3px 8px !important;
  }
  
  /* Controls toolbar */
  .controls-toolbar {
    padding: 16px;
    gap: 12px;
  }
  
  .controls-toolbar label {
    font-size: 0.8rem;
  }
  
  .controls-toolbar select,
  .controls-toolbar input {
    font-size: 0.8rem;
    padding: 8px 10px;
  }
  
  /* Now Playing section */
  #nowPlaying {
    font-size: 0.85rem;
    padding: 12px 16px;
  }
  
  /* Server cards */
  .card {
    padding: 14px;
  }
  
  .card-header {
    margin-bottom: 10px;
  }
  
  .server-name {
    font-size: 1rem;
  }
  
  .info-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  
  .action-buttons {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  
  .join-btn {
    font-size: 0.85rem;
    padding: 10px;
  }
  
  /* Heatmap */
  .heatmap-container {
    padding: 16px;
    margin: 0 -12px;
    border-radius: 0;
  }
  
  .heatmap-header {
    flex-direction: column;
    gap: 12px;
  }
  
  .heatmap-header h3 {
    font-size: 1.1rem;
  }
  
  .heatmap-controls {
    width: 100%;
    display: flex;
    gap: 8px;
  }
  
  .heatmap-controls select {
    flex: 1;
    font-size: 0.85rem;
  }
  
  .heatmap-grid {
    grid-template-columns: 50px repeat(12, 1fr);
    font-size: 0.6rem;
    gap: 1px;
  }
  
  .heatmap-hour-label,
  .heatmap-day-label {
    font-size: 0.65rem;
    padding: 2px;
  }
  
  .heatmap-cell {
    min-width: 20px;
  }
  
  .heatmap-legend {
    flex-wrap: wrap;
    font-size: 0.8rem;
  }
  
  .legend-cell {
    width: 18px;
    height: 18px;
  }
  
  .heatmap-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  
  .stat-value {
    font-size: 1.4rem;
  }
  
  .stat-icon {
    font-size: 1.5rem;
  }
  
  .stat-label {
    font-size: 0.8rem;
  }
  
  /* Navigation buttons */
  .nav-btn {
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
  }
  
  .navigation-buttons {
    right: 10px;
    bottom: 10px;
  }
}

@media (max-width: 480px) {
  /* Extra small screens */
  .logo-gdi,
  .logo-nod {
    width: 30px !important;
    height: 30px !important;
  }
  
  .renegade-text {
    font-size: 0.9rem !important;
    letter-spacing: 0.5px !important;
  }
  
  .renegade-text.renegade-subtitle {
    font-size: 0.75rem !important;
    letter-spacing: 1px !important;
  }
  
  .top-menu a {
    font-size: 0.75rem;
    padding: 6px 8px;
  }
  
  .top-menu ul {
    gap: 4px;
  }
  
  #nowPlaying {
    font-size: 0.75rem;
    padding: 10px 12px;
  }
  
  .server-name {
    font-size: 0.9rem;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  .info {
    font-size: 0.75rem;
  }
  
  .action-btn {
    font-size: 0.7rem;
    padding: 8px 10px;
  }
  
  .nav-btn {
    width: 45px;
    height: 45px;
    font-size: 1.1rem;
  }
  
  /* Expandable player sections on mobile */
  .players[id^="pl"] {
    max-height: calc(100vh - 200px);
    overflow-y: auto;
    overflow-x: hidden;
    padding: 10px;
    margin: 10px 0;
    font-size: 0.85rem;
  }
  
  .player-table {
    width: 100%;
    font-size: 0.75rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .player-table th,
  .player-table td {
    padding: 3px 2px;
  }
  
  /* Heatmap improvements for very small screens */
  .heatmap-container {
    padding: 12px;
    margin: 0 -8px;
    border-radius: 0;
  }
  
  .heatmap-header {
    flex-direction: column;
    gap: 10px;
  }
  
  .heatmap-header h3 {
    font-size: 1rem;
    margin-bottom: 0;
  }
  
  .heatmap-controls {
    width: 100%;
  }
  
  .heatmap-controls select {
    width: 100%;
    font-size: 0.8rem;
    padding: 6px;
  }
  
  .heatmap-grid {
    grid-template-columns: 45px repeat(8, 1fr);
    font-size: 0.55rem;
    gap: 0.5px;
  }
  
  .heatmap-hour-label,
  .heatmap-day-label {
    font-size: 0.6rem;
    padding: 1px;
  }
  
  .heatmap-cell {
    min-width: 16px;
    aspect-ratio: 1;
  }
  
  .heatmap-cell[data-tooltip]:hover::after {
    font-size: 0.65rem;
    padding: 5px 8px;
    bottom: 120%;
  }
  
  .heatmap-legend {
    flex-wrap: wrap;
    font-size: 0.75rem;
    justify-content: center;
    gap: 8px;
  }
  
  .legend-cell {
    width: 16px;
    height: 16px;
  }
  
  .heatmap-stats {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  
  .stat-value {
    font-size: 1.2rem;
  }
  
  .stat-icon {
    font-size: 1.3rem;
  }
  
  .stat-label {
    font-size: 0.75rem;
  }
  
  /* Hide less important UI elements on very small screens */
  .smart-badges {
    flex-wrap: wrap;
  }
  
  .badge-pill {
    font-size: 0.65rem;
    padding: 4px 8px;
  }
}

/* Landscape mode on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .top-menu > div {
    flex-direction: row;
  }
  
  .logo-gdi,
  .logo-nod {
    width: 35px !important;
    height: 35px !important;
  }
  
  .renegade-text {
    font-size: 1rem !important;
  }
  
  .renegade-text.renegade-subtitle {
    font-size: 0.85rem !important;
  }
}

/* Tablet portrait */
@media (min-width: 481px) and (max-width: 768px) {
  .container {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  }
  
  /* Better card display on tablets */
  .card {
    padding: 14px;
  }
  
  /* Improved accordion/expandable section visibility */
  #players- {
    max-height: 60vh;
    overflow-y: auto;
    padding: 12px;
    margin: 8px 0;
  }
  
  .player-table {
    width: 100%;
    overflow-x: auto;
  }
}

/* Small desktop / large tablet */
@media (min-width: 769px) and (max-width: 1024px) {
  .container {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  }
  
  .logo-gdi,
  .logo-nod {
    width: 45px !important;
    height: 45px !important;
  }
  
  .renegade-text {
    font-size: 1.3rem;
  }
  
  .renegade-text.renegade-subtitle {
    font-size: 1.05rem;
  }
}


/* ===== TOUCH-FRIENDLY IMPROVEMENTS ===== */

/* Larger tap targets for mobile */
@media (max-width: 768px) {
  button,
  .action-btn,
  .join-btn,
  .top-menu a,
  .nav-logo-link {
    min-height: 44px;
    min-width: 44px;
  }
  
  /* Disable hover animations on touch devices */
  @media (hover: none) {
    .logo-gdi {
      animation: none !important;
    }
    
    .logo-nod {
      animation: none !important;
    }
    
    .nav-logo-link:hover {
      transform: none;
    }
  }
  
  /* Better touch feedback */
  button:active,
  .action-btn:active,
  a:active {
    opacity: 0.7;
    transform: scale(0.95);
  }
  
  /* Prevent text selection on buttons */
  button,
  .action-btn,
  .nav-logo-link {
    -webkit-tap-highlight-color: rgba(0, 212, 255, 0.2);
    user-select: none;
    -webkit-user-select: none;
  }
  
  /* Scrollable tables on mobile */
  .player-table-container,
  .player-stats-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Better input fields for mobile */
  input,
  select {
    font-size: 16px !important; /* Prevents zoom on iOS */
  }
  
  /* Sticky header option */
  .top-menu {
    position: sticky;
    top: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
  }
}

/* Prevent horizontal scroll */
body {
  overflow-x: hidden;
}

html {
  overflow-x: hidden;
}

/* Safe area padding for notched devices (iPhone X, etc.) */
@supports (padding: env(safe-area-inset-left)) {
  .top-menu > div {
    padding-left: max(20px, env(safe-area-inset-left));
    padding-right: max(20px, env(safe-area-inset-right));
  }
  
  .container {
    padding-left: max(20px, env(safe-area-inset-left));
    padding-right: max(20px, env(safe-area-inset-right));
  }
}

/* ========================================
   GDI MAMMOTH TANK ANIMATION - ATTACKS NOD!
   One-time animation on page load only
   ======================================== */

/* Tank container - positioned behind menu, comes from left */
.tank-container {
  position: absolute;
  bottom: -95px;
  left: -200px;
  width: 150px;
  height: 100px;
  pointer-events: none;
  z-index: -1;
  opacity: 1;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.7));
  animation: tankEnterAndShoot 6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.tank-container img {
  width: 100%;
  height: auto;
  transform: none; /* No rotation needed - image is pre-rotated */
  transform-origin: center;
}

/* Tank enters from left, shoots once, then reverses back */
@keyframes tankEnterAndShoot {
  0% {
    left: -200px;
    bottom: -95px;
    opacity: 0;
  }
  /* Smooth entrance */
  25% {
    left: 100px;
    bottom: -95px;
    opacity: 1;
  }
  /* Arrive at shooting position */
  35% {
    left: 200px;
    bottom: -95px;
    opacity: 1;
  }
  /* Hold position */
  50% {
    left: 200px;
    bottom: -95px;
  }
  /* Recoil from shot */
  55% {
    left: 195px;
    bottom: -92px;
  }
  60% {
    left: 200px;
    bottom: -95px;
  }
  /* Wait after shot */
  70% {
    left: 200px;
    bottom: -95px;
    opacity: 1;
  }
  /* Smooth reverse back to left */
  90% {
    left: 0px;
    bottom: -95px;
    opacity: 0.7;
  }
  100% {
    left: -200px;
    bottom: -95px;
    opacity: 0;
  }
}

/* Muzzle flash effect - one-time on shot from tank barrel */
.muzzle-flash {
  position: absolute;
  top: 25px;
  left: 10px;
  width: 50px;
  height: 50px;
  background: radial-gradient(ellipse, #FFD700 0%, #FF4500 20%, #FF8C00 40%, transparent 70%);
  border-radius: 50%;
  opacity: 0;
  animation: flash 6s forwards;
  pointer-events: none;
  z-index: 10001;
}

@keyframes flash {
  0%, 49%, 58%, 100% {
    opacity: 0;
    transform: scale(1) rotate(0deg);
  }
  52% {
    opacity: 1;
    transform: scale(2.5) rotate(45deg);
  }
  54% {
    opacity: 0.7;
    transform: scale(3) rotate(90deg);
  }
  56% {
    opacity: 0.3;
    transform: scale(3.5) rotate(135deg);
  }
}

/* Shell casing ejection - one-time */
.shell-casing {
  position: absolute;
  top: 30px;
  left: 30px;
  width: 8px;
  height: 12px;
  background: linear-gradient(135deg, #FFD700 0%, #B8860B 50%, #8B7355 100%);
  border-radius: 2px;
  opacity: 0;
  animation: shellEject 6s forwards;
  pointer-events: none;
  z-index: 10000;
}

@keyframes shellEject {
  0%, 51%, 100% {
    opacity: 0;
    top: 30px;
    left: 30px;
    transform: rotate(0deg);
  }
  52% {
    opacity: 1;
    top: 10px;
    left: 40px;
    transform: rotate(180deg);
  }
  55% {
    opacity: 0.5;
    top: 0px;
    left: 50px;
    transform: rotate(360deg);
  }
  58% {
    opacity: 0;
    top: -10px;
    left: 60px;
    transform: rotate(540deg);
  }
}

/* Bullet tracer - shoots from tank barrel toward NOD logo */
.bullet-tracer {
  position: absolute;
  top: 32px;
  left: 210px;
  width: 0;
  height: 4px;
  background: linear-gradient(90deg, transparent, #FFD700 30%, #FFA500, #FFD700 70%, transparent);
  opacity: 0;
  animation: bulletFly 6s forwards;
  pointer-events: none;
  z-index: 9998;
  box-shadow: 0 0 15px rgba(255, 215, 0, 1), 0 0 25px rgba(255, 165, 0, 0.6);
  border-radius: 2px;
  transform-origin: left center;
}

@keyframes bulletFly {
  0%, 51%, 100% {
    opacity: 0;
    width: 0;
    left: 210px;
    top: 32px;
  }
  52% {
    opacity: 1;
    width: 0;
    left: 210px;
    top: 32px;
  }
  54% {
    opacity: 1;
    width: 250px;
    left: 210px;
    top: 32px;
  }
  56% {
    opacity: 0.5;
    width: 250px;
    left: 210px;
    top: 32px;
  }
  58% {
    opacity: 0;
    width: 250px;
    left: 210px;
    top: 32px;
  }
}

/* Bullet impact on NOD logo - stays visible permanently */
.logo-nod {
  position: relative;
}

.bullet-impact {
  position: absolute;
  top: 45%;
  left: 60%;
  transform: translate(-50%, -50%);
  width: 25px;
  height: 25px;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.9) 30%, rgba(50, 50, 50, 0.6) 50%, transparent 70%);
  border-radius: 50%;
  opacity: 0;
  animation: impact 6s forwards;
  pointer-events: none;
  z-index: 2;
}

.bullet-impact::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 120%;
  height: 120%;
  background: radial-gradient(circle, rgba(255, 69, 0, 0.8) 0%, rgba(255, 140, 0, 0.5) 30%, transparent 60%);
  border-radius: 50%;
  animation: explosionFlash 6s forwards;
}

@keyframes explosionFlash {
  0%, 53%, 100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.5);
  }
  55% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(2.5);
  }
  57% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(3.5);
  }
}

.bullet-impact::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  background: rgba(0, 0, 0, 1);
  border-radius: 50%;
  box-shadow: 
    inset 2px 2px 3px rgba(0, 0, 0, 0.8),
    0 0 4px rgba(0, 0, 0, 0.9);
}

@keyframes impact {
  0%, 54%, 100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0);
  }
  55% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(0.8);
  }
  57% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

/* Smoke trail from impact - dissipates after rising */
.impact-smoke {
  position: absolute;
  top: 45%;
  left: 60%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  background: radial-gradient(circle, rgba(80, 80, 80, 0.8), rgba(120, 120, 120, 0.4), transparent);
  border-radius: 50%;
  opacity: 0;
  animation: smoke 6s forwards;
  pointer-events: none;
  z-index: 1;
}

@keyframes smoke {
  0%, 56%, 100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1);
  }
  58% {
    opacity: 0.9;
    transform: translate(-50%, -50%) scale(1);
  }
  70% {
    opacity: 0.7;
    transform: translate(-50%, -80%) scale(2.5);
  }
  85% {
    opacity: 0.3;
    transform: translate(-50%, -120%) scale(4);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -150%) scale(5);
  }
}

/* Debris particles - scatter once */
.debris {
  position: absolute;
  top: 45%;
  left: 60%;
  width: 3px;
  height: 3px;
  background: rgba(200, 50, 0, 0.8);
  border-radius: 50%;
  opacity: 0;
  animation: debris1 6s forwards;
  pointer-events: none;
  z-index: 1;
}

@keyframes debris1 {
  0%, 54%, 100% {
    opacity: 0;
    transform: translate(0, 0);
  }
  55% {
    opacity: 1;
    transform: translate(0, 0);
  }
  60% {
    opacity: 0.7;
    transform: translate(-15px, -20px) rotate(180deg);
  }
  70% {
    opacity: 0.3;
    transform: translate(-25px, -10px) rotate(360deg);
  }
  80% {
    opacity: 0;
    transform: translate(-30px, 5px) rotate(540deg);
  }
}

/* Exhaust smoke from tank while moving */
.exhaust-smoke {
  position: absolute;
  bottom: 10px;
  left: 80px;
  width: 15px;
  height: 15px;
  background: radial-gradient(circle, rgba(60, 60, 60, 0.7), rgba(100, 100, 100, 0.4), transparent);
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
  z-index: -2;
}

.exhaust-smoke-1 {
  animation: exhaustPuff1 6s infinite;
}

.exhaust-smoke-2 {
  animation: exhaustPuff2 6s infinite;
  animation-delay: 0.3s;
}

.exhaust-smoke-3 {
  animation: exhaustPuff3 6s infinite;
  animation-delay: 0.6s;
}

@keyframes exhaustPuff1 {
  0%, 35%, 70%, 100% {
    opacity: 0;
    transform: translate(0, 0) scale(1);
  }
  1%, 25% {
    opacity: 0.6;
    transform: translate(-80px, -10px) scale(1.2);
  }
  30% {
    opacity: 0;
    transform: translate(-140px, -20px) scale(2);
  }
  71%, 90% {
    opacity: 0.6;
    transform: translate(50px, -10px) scale(1.2);
  }
  95% {
    opacity: 0;
    transform: translate(100px, -20px) scale(2);
  }
}

@keyframes exhaustPuff2 {
  0%, 35%, 70%, 100% {
    opacity: 0;
    transform: translate(0, 0) scale(1);
  }
  1%, 25% {
    opacity: 0.5;
    transform: translate(-60px, -15px) scale(1.3);
  }
  30% {
    opacity: 0;
    transform: translate(-120px, -25px) scale(2.2);
  }
  71%, 90% {
    opacity: 0.5;
    transform: translate(40px, -15px) scale(1.3);
  }
  95% {
    opacity: 0;
    transform: translate(80px, -25px) scale(2.2);
  }
}

@keyframes exhaustPuff3 {
  0%, 35%, 70%, 100% {
    opacity: 0;
    transform: translate(0, 0) scale(1);
  }
  1%, 25% {
    opacity: 0.7;
    transform: translate(-70px, -8px) scale(1.1);
  }
  30% {
    opacity: 0;
    transform: translate(-130px, -18px) scale(1.9);
  }
  71%, 90% {
    opacity: 0.7;
    transform: translate(45px, -8px) scale(1.1);
  }
  95% {
    opacity: 0;
    transform: translate(90px, -18px) scale(1.9);
  }
}

/* Disable tank animation on mobile to save performance */
@media (max-width: 768px) {
  .tank-container,
  .muzzle-flash,
  .bullet-tracer,
  .bullet-impact,
  .impact-smoke,
  .exhaust-smoke {
    display: none !important;
  }
}

/* Disable on touch devices */
@media (hover: none) {
  .tank-container,
  .muzzle-flash,
  .bullet-tracer,
  .bullet-impact,
  .impact-smoke,
  .exhaust-smoke {
    display: none !important;
  }
}

/* ==== YouTube Live Badge Styling ==== */
.yt-channel-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.live-badge {
  display: inline-block;
  padding: 2px 6px;
  background: linear-gradient(135deg, #ff0000 0%, #ff4444 100%);
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 700;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-left: 6px;
  box-shadow: 
    0 0 8px rgba(255, 0, 0, 0.6),
    0 0 16px rgba(255, 0, 0, 0.3);
  animation: livePulse 2s ease-in-out infinite;
  pointer-events: none; /* Don't block clicks */
  flex-shrink: 0;
}

@keyframes livePulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
    box-shadow: 
      0 0 8px rgba(255, 0, 0, 0.6),
      0 0 16px rgba(255, 0, 0, 0.3);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.05);
    box-shadow: 
      0 0 12px rgba(255, 0, 0, 0.8),
      0 0 24px rgba(255, 0, 0, 0.5);
  }
}

/* TV Icon Glow Effect When Live */
.yt-channel-link.is-live {
  color: #ff4444 !important;
  text-shadow: 0 0 8px rgba(255, 68, 68, 0.5);
}

/* Optional: Pulsing TV Icon */
.yt-channel-link.is-live::before {
  content: '';
  position: absolute;
  left: -4px;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  background: #ff0000;
  border-radius: 50%;
  animation: liveDot 1.5s ease-in-out infinite;
  pointer-events: none; /* Don't block clicks */
}

@keyframes liveDot {
  0%, 100% {
    opacity: 1;
    transform: translateY(-50%) scale(1);
  }
  50% {
    opacity: 0.5;
    transform: translateY(-50%) scale(1.2);
  }
}

/* Dropdown button live indicator */
.dropbtn.has-live {
  background: rgba(255, 68, 68, 0.15) !important;
  border-color: rgba(255, 68, 68, 0.4) !important;
}

.dropbtn .live-indicator {
  animation: livePulse 2s ease-in-out infinite;
}

/* ————— Mobile & iOS/Android Fixes ————— */
@media (max-width: 768px) {
  html, body {
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100vw !important;
    position: relative;
  }
  
  .container {
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .card {
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .card * {
    max-width: 100%;
    box-sizing: border-box;
  }

  .card-header,
  .info-grid,
  .team-scores,
  .ip-section,
  .smart-badges,
  .server-stats {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .players,
  .buildings {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
  }

  .player-stats-scroll {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    overflow-y: hidden;
    box-sizing: border-box !important;
  }

  .player-stats-scroll table {
    min-width: 0 !important;
    width: max-content;
  }

  .player-table-container {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
  }

  .player-table {
    min-width: 0 !important;
    width: max-content;
  }
}

/* iOS Safari specific fixes */
@supports (-webkit-touch-callout: none) {
  .container {
    -webkit-overflow-scrolling: touch;
  }
  
  .card {
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
  }
  
  .action-buttons {
    -webkit-overflow-scrolling: touch;
  }
  
  .player-stats-scroll {
    -webkit-overflow-scrolling: touch;
  }
  
  .players, .buildings {
    -webkit-overflow-scrolling: touch;
  }
}
