:root {
      --bg-dark: #07090e;
      --panel-bg: rgba(18, 22, 33, 0.94);
      --panel-border: rgba(255, 255, 255, 0.16);
      --accent: #7c4dff;
      --accent-glow: rgba(124, 77, 255, 0.45);
      --text-main: #f0f3fe;
      --text-muted: #a0aec0;
      
      --ring-yellow: #f1c40f;
      --ring-green: #2ecc71;
      --ring-blue: #3498db;
      --ring-red: #e74c3c;
    }

    * {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
      user-select: none;
      -webkit-tap-highlight-color: transparent;
    }

    body {
      font-family: 'Outfit', sans-serif;
      background-color: #05060a;
      color: var(--text-main);
      height: 100vh;
      height: 100dvh;
      width: 100vw;
      display: flex;
      justify-content: center;
      align-items: center;
      overflow: hidden;
      background-image: 
        radial-gradient(circle at 50% 10%, rgba(124, 77, 255, 0.25) 0%, transparent 55%),
        radial-gradient(circle at 50% 90%, rgba(0, 176, 255, 0.2) 0%, transparent 55%);
    }

    /* 9:16 VERTICAL MOBILE CONTAINER */
    .mobile-game-wrapper {
      width: 100%;
      max-width: 520px;
      height: 100vh;
      height: 100dvh;
      max-height: 100vh;
      height: 100dvh;
      aspect-ratio: 9 / 16;
      background: #0d0f17;
      display: flex;
      flex-direction: column;
      position: relative;
      overflow: hidden;
      box-shadow: 0 0 50px rgba(0, 0, 0, 0.95), 0 0 25px var(--accent-glow);
    }

    @media (min-width: 540px) {
      .mobile-game-wrapper {
        border-radius: 28px;
        border: 2px solid rgba(255, 255, 255, 0.18);
        height: 96vh;
        height: 96dvh;
      }
    }

    /* COMPACT MOBILE HEADER */
    .irazu-top-hud-bar {
      padding: 2px 6px;
      background: var(--panel-bg);
      backdrop-filter: blur(16px);
      border-bottom: 1px solid var(--panel-border);
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 4px;
      z-index: 20;
    }

    .brand-group {
      display: flex;
      align-items: center;
      gap: 9px;
    }

    .brand-icon {
      width: 24px;
      height: 24px;
      background: linear-gradient(135deg, var(--accent), #00b0ff);
      border-radius: 6px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 13px;
      box-shadow: 0 3px 12px var(--accent-glow);
    }

    .brand-text h1 {
      font-size: 13px;
      font-weight: 800;
      background: linear-gradient(to right, #fff, #90caf9);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      line-height: 1.1;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      max-width: 40vw;
    }

    .brand-text .song-active-text {
      font-size: 12px;
      color: #00e676;
      font-weight: 700;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      max-width: 140px;
    }

    .header-actions {
      display: flex;
      align-items: center;
      gap: 4px;
      flex-shrink: 0;
    }

    .btn {
      background: rgba(255, 255, 255, 0.08);
      border: 1px solid var(--panel-border);
      color: var(--text-main);
      padding: 5px 6px;
      border-radius: 6px;
      font-family: inherit;
      font-weight: 700;
      font-size: 11px;
      cursor: pointer;
      display: flex;
      align-items: center;
      gap: 3px;
      transition: all 0.2s ease;
      white-space: nowrap;
    }

    .btn:active {
      transform: scale(0.96);
    }

    .btn-catalog {
      background: linear-gradient(135deg, #00b0ff, #7c4dff);
      border: none;
      color: #fff;
      font-weight: 800;
      box-shadow: 0 3px 10px rgba(0, 176, 255, 0.4);
    }

    .btn-mic-toggle {
      background: rgba(255, 255, 255, 0.08);
    }

    .btn-mic-toggle.active {
      background: linear-gradient(135deg, #00e676, #00b0ff);
      border-color: #00e676;
      color: #000;
      font-weight: 800;
      box-shadow: 0 3px 12px rgba(0, 230, 118, 0.4);
    }

    /* IN-GAME VERTICAL CANVAS VIEWPORT */
    .canvas-container {
      flex: 1;
      width: 100%;
      position: relative;
      overflow: hidden;
    }

    #visualizer-canvas {
      width: 100%;
      height: 100%;
      display: block;
    }

    /* FLOATING IN-GAME HUD CHIPS */
    .hud-overlay {
      position: absolute;
      top: 10px;
      left: 10px;
      right: 10px;
      display: flex;
      justify-content: space-between;
      pointer-events: none;
      z-index: 15;
    }

    .hud-chip {
      background: rgba(18, 22, 33, 0.82);
      border: 1px solid var(--panel-border);
      backdrop-filter: blur(10px);
      padding: 6px 10px;
      border-radius: 10px;
      display: flex;
      flex-direction: column;
      gap: 2px;
      box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    }

    .hud-score-val {
      font-size: 15px;
      font-weight: 900;
      color: #ffb300;
      font-family: 'JetBrains Mono', monospace;
    }

    .hud-combo-val {
      font-size: 12px;
      font-weight: 800;
      color: #00e676;
    }

    .hud-tuner-note {
      font-size: 15px;
      font-weight: 900;
      color: #fff;
      font-family: 'JetBrains Mono', monospace;
      text-align: right;
    }

    .hud-tuner-freq {
      font-size: 12px;
      font-weight: 700;
      color: var(--text-muted);
      text-align: right;
    }

    /* 4-SECOND IDLE PLAY HINT TOOLTIP */
    .play-hint-tooltip {
      position: absolute;
      bottom: 72px;
      left: 14px;
      white-space: nowrap;
      background: linear-gradient(135deg, #ff9100, #ff3d00);
      color: #fff;
      padding: 9px 14px;
      border-radius: 10px;
      font-weight: 800;
      font-size: 13px;
      box-shadow: 0 6px 20px rgba(255, 145, 0, 0.7);
      display: none;
      align-items: center;
      gap: 6px;
      z-index: 40;
      animation: bouncePlayHint 1.2s infinite ease-in-out;
    }

    .play-hint-tooltip::after {
      content: '';
      position: absolute;
      bottom: -7px;
      left: 20px;
      border-width: 7px 7px 0;
      border-style: solid;
      border-color: #ff3d00 transparent;
      display: block;
      width: 0;
    }

    @keyframes bouncePlayHint {
      0%, 100% { transform: translateY(0); }
      50% { transform: translateY(-6px); }
    }

    /* BOTTOM CONTROLS & TIMELINE */
    .mobile-bottom-bar {
      background: var(--panel-bg);
      backdrop-filter: blur(16px);
      border-top: 1px solid var(--panel-border);
      padding: 10px 14px;
      display: flex;
      flex-direction: column;
      gap: 7px;
      z-index: 20;
    }

    .controls-main-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
    }

    .play-btn {
      width: 44px;
      height: 44px;
      min-width: 44px;
      border-radius: 50%;
      background: linear-gradient(135deg, #ff9100, #ff3d00);
      border: none;
      color: #fff;
      font-size: 20px;
      font-weight: 900;
      display: flex;
      align-items: center;
      justify-content: center;
      box-shadow: 0 4px 15px rgba(255, 145, 0, 0.5);
      cursor: pointer;
    }

    .timeline-wrapper {
      flex: 1;
      display: flex;
      flex-direction: column;
      gap: 2px;
    }

    .timeline-meta {
      display: flex;
      justify-content: space-between;
      font-size: 12px;
      font-weight: 700;
      color: var(--text-muted);
      font-family: 'JetBrains Mono', monospace;
    }

    .timeline-slider {
      width: 100%;
      -webkit-appearance: none;
      appearance: none;
      height: 6px;
      border-radius: 3px;
      background: rgba(255, 255, 255, 0.15);
      outline: none;
    }

    .timeline-slider::-webkit-slider-thumb {
      -webkit-appearance: none;
      appearance: none;
      width: 15px;
      height: 15px;
      border-radius: 50%;
      background: #00b0ff;
      box-shadow: 0 0 8px rgba(0, 176, 255, 0.6);
    }

    .mobile-settings-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 6px;
      overflow-x: auto;
      padding-bottom: 2px;
    }

    .pill-select {
      background: rgba(255, 255, 255, 0.08);
      border: 1px solid var(--panel-border);
      color: var(--text-main);
      padding: 4px 7px;
      border-radius: 6px;
      font-size: 12px;
      font-weight: 700;
      outline: none;
      font-family: inherit;
    }

    /* MODAL STYLES (SONG CATALOG & WELCOME) */
    .modal-overlay {
      position: absolute;
      inset: 0;
      background: rgba(4, 5, 8, 0.92);
      backdrop-filter: blur(14px);
      display: none;
      align-items: center;
      justify-content: center;
      z-index: 50;
      padding: 16px;
    }

    .modal-overlay.active {
      display: flex;
    }

    .modal-card {
      background: var(--panel-bg);
      border: 1px solid rgba(255, 255, 255, 0.2);
      border-radius: 20px;
      padding: 24px 19px;
      width: 100%;
      max-width: 440px;
      display: flex;
      flex-direction: column;
      gap: 16px;
      box-shadow: 0 16px 40px rgba(0, 0, 0, 0.9), 0 0 25px var(--accent-glow);
    }

    .song-grid {
      display: flex;
      flex-direction: column;
      gap: 10px;
      max-height: 280px;
      overflow-y: auto;
    }

    .song-card-item {
      background: rgba(255, 255, 255, 0.05);
      border: 1px solid var(--panel-border);
      border-radius: 12px;
      padding: 12px 14px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      cursor: pointer;
      transition: all 0.2s ease;
    }

    .song-card-item:hover, .song-card-item:active {
      background: linear-gradient(135deg, rgba(124,77,255,0.25), rgba(0,176,255,0.25));
      border-color: rgba(0, 176, 255, 0.5);
    }

    .song-title {
      font-size: 14px;
      font-weight: 800;
      color: #fff;
    }

    .song-subtitle {
      font-size: 12px;
      color: var(--text-muted);
    }

    .song-badge-level {
      padding: 3px 8px;
      border-radius: 6px;
      font-size: 11px;
      font-weight: 800;
      background: rgba(0, 230, 118, 0.2);
      color: #00e676;
      border: 1px solid rgba(0, 230, 118, 0.4);
    }
/* WordPress Integration Isolation */
.irazu-wp-container {
  display: flex !important;
  justify-content: center !important;
  align-items: flex-start !important;
  width: 100% !important;
  min-height: 100dvh !important;
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
  position: relative !important;
  z-index: 99 !important;
}

@media (max-width: 768px) {
  .irazu-wp-container {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100dvh !important;
    z-index: 999999 !important;
    background: var(--bg-main) !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  
  .mobile-game-wrapper {
    width: 100% !important;
    height: 100% !important;
    max-height: none !important;
  }
}

.mobile-game-wrapper {
  position: relative !important;
  box-sizing: border-box !important;
}

/* Immunize Buttons and Text from Theme Overrides */
.irazu-wp-container button.btn {
  font-size: 12px !important;
  padding: 7px 10px !important;
  line-height: 1.2 !important;
  min-height: 0 !important;
  height: auto !important;
  white-space: nowrap !important;
  margin: 0 !important;
  letter-spacing: normal !important;
  font-family: 'Outfit', sans-serif !important;
}

.irazu-wp-container h1, 
.irazu-wp-container h3, 
.irazu-wp-container h4, 
.irazu-wp-container p,
.irazu-wp-container div,
.irazu-wp-container span {
  line-height: 1.1 !important;
  margin: 0 !important;
  letter-spacing: normal !important;
  font-family: 'Outfit', sans-serif !important;
}

.irazu-wp-container .hud-score-val,
.irazu-wp-container .hud-tuner-note {
  font-family: 'JetBrains Mono', monospace !important;
}

.irazu-wp-container .brand-text h1 {
  font-size: 15px !important;
  margin-bottom: 2px !important;
}

/* Ensure Canvas scales properly without getting chato */
.irazu-wp-container #visualizer-canvas {
  width: 100% !important;
  height: 100% !important;
  object-fit: fill !important;
  display: block !important;
}

.irazu-wp-container .irazu-top-hud-bar {
  display: flex !important;
  flex-shrink: 0 !important;
  min-height: 30px !important;
  opacity: 1 !important;
  visibility: visible !important;
}

.modal-overlay {
  display: none !important;
}

.modal-overlay.active {
  display: flex !important;
}
