:root {
  --bg-color: #0b0c10;
  --panel-bg: rgba(22, 27, 34, 0.88);
  --panel-border: #30363d;
  --accent-gold: #e5a93b;
  --accent-cyan: #45f3ff;
  --accent-crimson: #ff3366;
  --accent-green: #38ef7d;
  --accent-purple: #9b5de5;
  --text-main: #f0f6fc;
  --text-dim: #8b949e;
  --font-title: 'Cinzel', 'Noto Serif JP', serif;
  --font-body: 'Nunito', sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
}

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: var(--font-body);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  overflow-x: hidden;
  background-image: radial-gradient(circle at 50% 20%, #1f2430 0%, #090a0f 85%);
}

#game-container {
  width: 100%;
  max-width: 1074px; /* +50px no tamanho total */
  margin: 10px auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Header */
#game-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 18px;
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
}

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

.kanji-badge {
  font-size: 24px;
  background: linear-gradient(135deg, #e5a93b, #ff4500);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 900;
  border: 2px solid #e5a93b;
  border-radius: 8px;
  padding: 2px 8px;
}

.titles h1 {
  font-family: var(--font-title);
  font-size: 20px;
  letter-spacing: 2px;
  color: #fff;
  text-shadow: 0 0 10px rgba(229, 169, 59, 0.4);
}

.titles .subtitle {
  font-size: 11px;
  color: var(--accent-cyan);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.header-controls {
  display: flex;
  gap: 8px;
  align-items: center;
}

.icon-btn, .mode-btn {
  background: #1f242d;
  color: var(--text-main);
  border: 1px solid #3d4450;
  border-radius: 8px;
  padding: 8px 12px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.icon-btn:hover, .mode-btn:hover {
  background: #2a313d;
  border-color: var(--accent-cyan);
  box-shadow: 0 0 12px rgba(69, 243, 255, 0.2);
}

.mode-btn.active {
  background: linear-gradient(135deg, #1f4068, #162447);
  border-color: var(--accent-cyan);
  color: #fff;
  box-shadow: 0 0 10px rgba(69, 243, 255, 0.3);
}

/* Viewport and Canvas (+50px no tamanho total) */
#viewport-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 101 / 59;
  max-height: 630px;
  background: #000;
  border: 2px solid #2d333b;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.7);
}

#gameCanvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* ==========================================
   BARRA DE VIDA 100% DO SHINOBI (TOP-LEFT)
   ========================================== */
#player-hud-bar {
  position: absolute;
  top: 14px;
  left: 14px;
  width: 250px;
  background: rgba(13, 17, 23, 0.9);
  border: 1.5px solid #e11d48;
  border-radius: 12px;
  padding: 9px 14px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6), 0 0 15px rgba(225, 29, 72, 0.25);
  backdrop-filter: blur(8px);
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 5px;
  pointer-events: none;
}

.hp-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.hp-label-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.hp-heart-icon {
  font-size: 16px;
  animation: heartPulse 1.8s infinite ease-in-out;
}

@keyframes heartPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

.hp-title {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #94a3b8;
  font-family: var(--font-title);
}

.hp-percent-val {
  font-size: 16px;
  font-weight: 900;
  color: #22c55e;
  font-family: var(--font-title);
  text-shadow: 0 0 10px rgba(34, 197, 94, 0.6);
  transition: color 0.2s ease;
}

.hp-meter-container {
  width: 100%;
  height: 12px;
  background: #1e293b;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid #475569;
}

.hp-meter-fill {
  height: 100%;
  background: linear-gradient(90deg, #e11d48, #22c55e);
  transition: width 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.5);
}

.hp-rules-badge {
  font-size: 9.5px;
  color: #94a3b8;
  text-align: center;
  letter-spacing: 0.3px;
}

.dmg-loss-10 {
  color: #facc15;
}

.dmg-loss-5 {
  color: #38bdf8;
}

/* Breathwork HUD Overlay (TOP-RIGHT) */
#breathwork-hud {
  position: absolute;
  top: 14px;
  right: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  pointer-events: none;
}

#breath-indicator-container {
  background: rgba(13, 17, 23, 0.85);
  border: 1px solid rgba(69, 243, 255, 0.3);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  border-radius: 16px;
  padding: 12px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 220px;
  backdrop-filter: blur(6px);
  pointer-events: auto;
}

.breath-phase-badge {
  font-family: var(--font-title);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: var(--accent-cyan);
  margin-bottom: 8px;
  text-transform: uppercase;
}

/* Breathing Orb */
.orb-outer-ring {
  position: relative;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  border: 2px dashed rgba(69, 243, 255, 0.3);
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 6px 0;
  transition: border-color 0.4s ease;
}

.orb-inner {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: radial-gradient(circle, #45f3ff 0%, #17709c 70%, #0a2e47 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 0 15px rgba(69, 243, 255, 0.6);
  transform: scale(1);
  transition: transform 0.1s linear, background 0.3s ease;
}

.orb-core {
  font-family: 'Noto Serif JP', serif;
  font-size: 16px;
  color: #fff;
  font-weight: 900;
  text-shadow: 0 0 6px rgba(0, 0, 0, 0.8);
}

.breath-subtext {
  font-size: 11px;
  color: var(--text-dim);
  text-align: center;
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 4px;
}

.breath-timer {
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  font-variant-numeric: tabular-nums;
  margin-top: 2px;
}

/* Sincronia Meter */
.breath-sync-meter {
  background: rgba(13, 17, 23, 0.85);
  border: 1px solid #30363d;
  border-radius: 10px;
  padding: 6px 14px;
  width: 220px;
}

.sync-label {
  font-size: 11px;
  color: var(--text-dim);
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
}

.sync-label span {
  color: var(--accent-green);
  font-weight: 700;
}

.meter-bar-bg {
  width: 100%;
  height: 6px;
  background: #21262d;
  border-radius: 3px;
  overflow: hidden;
}

.meter-fill {
  height: 100%;
  background: linear-gradient(90deg, #45f3ff, #00b4d8);
  transition: width 0.1s linear, background 0.3s ease;
}

.breath-mode-toggle-area {
  margin-top: 6px;
  text-align: center;
}

.mode-pill-btn {
  background: #1c222c;
  color: #94a3b8;
  border: 1px solid #334155;
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 10px;
  cursor: pointer;
  width: 100%;
  transition: all 0.2s;
}

.mode-pill-btn:hover {
  border-color: var(--accent-cyan);
  color: #fff;
  background: #252e3d;
}

.mode-pill-btn strong {
  color: var(--accent-cyan);
}

/* 4 Pontinhos de Ciclo da Respiração */
.breath-pips-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  width: 100%;
  padding-top: 6px;
  border-top: 1px solid #21262d;
}

.pips-label {
  font-size: 10px;
  color: var(--text-dim);
}

.pips-row {
  display: flex;
  gap: 6px;
}

.breath-pip {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #21262d;
  border: 1.5px solid #484f58;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.breath-pip.active {
  background: #45f3ff;
  border-color: #fff;
  box-shadow: 0 0 10px #45f3ff;
  transform: scale(1.15);
}

/* Ability Bar */
#ability-bar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 220px;
  pointer-events: auto;
}

.ability-slot {
  background: rgba(13, 17, 23, 0.85);
  border: 1px solid #30363d;
  border-radius: 10px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.2s ease;
  cursor: pointer;
  backdrop-filter: blur(6px);
}

.ability-slot.locked {
  opacity: 0.5;
  border-color: #21262d;
  cursor: not-allowed;
}

.ability-slot.unlocked {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 12px rgba(69, 243, 255, 0.25);
  animation: pulseSlot 3s infinite ease-in-out;
}

@keyframes pulseSlot {
  0%, 100% { border-color: rgba(69, 243, 255, 0.6); }
  50% { border-color: #45f3ff; box-shadow: 0 0 18px rgba(69, 243, 255, 0.5); }
}

.ability-key {
  font-size: 10px;
  font-weight: 800;
  background: #21262d;
  color: var(--accent-gold);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid #30363d;
}

.ability-icon {
  font-size: 18px;
}

.ability-info strong {
  display: block;
  font-size: 11px;
  color: #fff;
  letter-spacing: 0.5px;
}

.ability-info small {
  font-size: 9px;
  color: var(--text-dim);
}

/* ==========================================
   SAQUINHO DE RYOS (DINHEIRO SHINOBI)
   ========================================== */
#ryos-badge {
  background: rgba(18, 22, 30, 0.9);
  border: 1px solid #e5a93b;
  border-radius: 12px;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 220px;
  box-shadow: 0 4px 15px rgba(229, 169, 59, 0.25);
  backdrop-filter: blur(6px);
  pointer-events: auto;
  transition: all 0.2s ease;
}

#ryos-badge:hover {
  box-shadow: 0 0 20px rgba(229, 169, 59, 0.5);
  border-color: #facc15;
}

.ryos-pouch-icon {
  font-size: 26px;
  filter: drop-shadow(0 2px 6px rgba(229, 169, 59, 0.6));
  animation: pouchBob 2.5s infinite ease-in-out;
}

@keyframes pouchBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

.ryos-info {
  display: flex;
  flex-direction: column;
}

.ryos-label {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #94a3b8;
}

.ryos-amount {
  font-size: 16px;
  font-weight: 900;
  color: #facc15;
  font-family: var(--font-title);
  letter-spacing: 0.5px;
  text-shadow: 0 0 10px rgba(245, 158, 11, 0.4);
}

.ryos-unit {
  font-size: 11px;
  color: #e2e8f0;
  font-weight: 600;
}

/* ==========================================
   TELA DE INÍCIO DO JOGO (START SCREEN HERO)
   ========================================== */
.start-screen-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 50% 35%, rgba(15, 23, 42, 0.96) 0%, rgba(6, 9, 14, 0.98) 100%);
  backdrop-filter: blur(12px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 100;
  animation: fadeIn 0.3s ease;
}

.start-screen-panel {
  background: rgba(18, 24, 38, 0.95);
  border: 2px solid #e5a93b;
  box-shadow: 0 0 45px rgba(0, 0, 0, 0.85), 0 0 25px rgba(229, 169, 59, 0.25);
  border-radius: 18px;
  padding: 24px 34px;
  width: 92%;
  max-width: 620px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.start-badge {
  font-size: 18px;
  letter-spacing: 6px;
  color: #e5a93b;
  border-bottom: 2px solid #e5a93b;
  padding-bottom: 4px;
}

.start-title {
  font-family: var(--font-title);
  font-size: 34px;
  font-weight: 900;
  letter-spacing: 4px;
  color: #f8fafc;
  text-shadow: 0 0 18px rgba(229, 169, 59, 0.7);
  margin-top: -4px;
}

.start-subtitle {
  font-size: 12.5px;
  color: var(--accent-cyan);
  margin-top: -6px;
  letter-spacing: 1px;
}

/* BOTÃO HERO GIGANTE DE COMEÇAR */
.btn-start-hero {
  background: linear-gradient(135deg, #e11d48, #b91c1c);
  color: #ffffff;
  border: 2px solid #fecdd3;
  border-radius: 12px;
  padding: 14px 28px;
  font-family: var(--font-title);
  font-weight: 900;
  letter-spacing: 2px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  box-shadow: 0 6px 20px rgba(225, 29, 72, 0.5), inset 0 0 10px rgba(255, 255, 255, 0.2);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  width: 100%;
  max-width: 440px;
}

.btn-start-hero:hover, .btn-start-hero:focus {
  background: linear-gradient(135deg, #f43f5e, #dc2626);
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 0 30px rgba(244, 63, 94, 0.8);
  border-color: #fff;
}

.btn-start-hero:active {
  transform: translateY(1px) scale(0.98);
}

.btn-hero-icon {
  font-size: 24px;
}

.btn-hero-text {
  font-size: 22px;
  letter-spacing: 2px;
}

.btn-hero-hint {
  font-size: 11px;
  font-family: var(--font-body);
  font-weight: 600;
  color: #fecdd3;
  opacity: 0.95;
}

/* Cartão de Regras de Dano */
.start-damage-card {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid #334155;
  border-radius: 10px;
  padding: 8px 14px;
  width: 100%;
  max-width: 500px;
  text-align: center;
}

.damage-rule-badge {
  font-size: 11px;
  font-weight: 800;
  color: #f43f5e;
  letter-spacing: 0.5px;
}

.damage-rule-text {
  font-size: 11.5px;
  color: #cbd5e1;
  margin-top: 3px;
  line-height: 1.4;
}

.damage-rule-text strong {
  color: #facc15;
}

/* Guia de Controles */
.start-guide-box {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid #27354a;
  border-radius: 10px;
  padding: 10px 14px;
  width: 100%;
  max-width: 500px;
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  text-align: left;
  font-size: 11px;
  color: #e2e8f0;
}

.guide-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.tag-power {
  color: #38bdf8;
  font-weight: 800;
  font-size: 10px;
}

.tag-strike {
  color: #facc15;
  font-weight: 800;
  font-size: 10px;
}

/* Botões Secundários */
.start-secondary-row {
  display: flex;
  gap: 10px;
  justify-content: center;
  width: 100%;
  margin-top: 4px;
}

.secondary-btn {
  background: #1e293b;
  border: 1px solid #475569;
  border-radius: 8px;
  padding: 6px 14px;
  color: #cbd5e1;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.secondary-btn:hover {
  background: #334155;
  border-color: #e5a93b;
  color: #fff;
}

/* ==========================================
   GAME OVER MODAL
   ========================================== */
.gameover-panel {
  text-align: center;
  align-items: center;
  border-color: #e11d48 !important;
  box-shadow: 0 0 40px rgba(225, 29, 72, 0.5) !important;
}

.gameover-icon {
  font-size: 48px;
  filter: drop-shadow(0 0 15px rgba(225, 29, 72, 0.8));
  animation: heartPulse 1.2s infinite ease-in-out;
}

/* Modais Secundários (Servidores & Devs) */
.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(4, 7, 12, 0.88);
  backdrop-filter: blur(8px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 110;
  animation: fadeIn 0.3s ease;
}

.custom-modal-panel {
  background: #111827;
  border: 2px solid #374151;
  border-radius: 14px;
  padding: 24px 30px;
  width: 90%;
  max-width: 520px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: left;
}

.custom-modal-panel h3 {
  font-family: var(--font-title);
  color: #facc15;
  font-size: 20px;
  letter-spacing: 1px;
  border-bottom: 1px solid #374151;
  padding-bottom: 8px;
}

.modal-subtitle {
  font-size: 12px;
  color: #94a3b8;
  margin-top: -6px;
}

.servers-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.server-item {
  background: #1f2937;
  border: 1px solid #374151;
  border-radius: 8px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  transition: all 0.2s ease;
}

.server-item.active {
  border-color: #22c55e;
  background: rgba(34, 197, 94, 0.12);
}

.server-text {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.server-text strong {
  font-size: 13px;
  color: #fff;
}

.server-text small {
  font-size: 10px;
  color: #9ca3af;
}

.server-status-tag {
  font-size: 10px;
  font-weight: 700;
  color: #22c55e;
  background: rgba(34, 197, 94, 0.2);
  padding: 2px 8px;
  border-radius: 4px;
}

.devs-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dev-card {
  background: #1f2937;
  border-left: 3px solid #e5a93b;
  padding: 8px 12px;
  border-radius: 4px;
}

.dev-card strong {
  font-size: 12px;
  color: #e5a93b;
}

.dev-card p {
  font-size: 12px;
  color: #cbd5e1;
  margin-top: 2px;
}

/* Toast de Diálogo Não-Bloqueante */
#dialogue-box {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.95);
  border: 1.5px solid var(--accent-gold);
  border-radius: 12px;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 620px;
  width: 90%;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.7);
  z-index: 50;
  pointer-events: auto;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from { opacity: 0; transform: translate(-50%, 20px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

.speaker-avatar {
  font-size: 28px;
}

.dialogue-content {
  flex: 1;
}

.dialogue-content h4 {
  font-family: var(--font-title);
  font-size: 13px;
  color: var(--accent-gold);
}

.dialogue-content p {
  font-size: 12px;
  color: #e2e8f0;
  margin: 3px 0;
  line-height: 1.4;
}

#dialogue-next {
  padding: 5px 12px;
  font-size: 11px;
}

/* Modal de Conclusão do Tutorial */
#tutorial-choice-modal {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(4, 7, 12, 0.85);
  backdrop-filter: blur(6px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 105;
}

.choice-panel {
  background: rgba(18, 24, 38, 0.95);
  border: 2px solid var(--accent-gold);
  border-radius: 14px;
  padding: 24px 30px;
  max-width: 520px;
  width: 90%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  box-shadow: 0 0 35px rgba(229, 169, 59, 0.4);
}

.choice-panel .npc-avatar {
  font-size: 38px;
}

.choice-panel h3 {
  font-family: var(--font-title);
  font-size: 20px;
  color: var(--accent-gold);
}

.choice-panel p {
  font-size: 13px;
  color: #e2e8f0;
  line-height: 1.5;
}

.choice-buttons {
  display: flex;
  gap: 12px;
  width: 100%;
  justify-content: center;
}

.btn-choice-yes {
  background: linear-gradient(135deg, #15803d, #166534);
  color: #fff;
  border: 1px solid #4ade80;
  border-radius: 8px;
  padding: 10px 18px;
  font-weight: 800;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s;
}

.btn-choice-yes:hover {
  background: #22c55e;
  transform: translateY(-1px);
}

.btn-choice-no {
  background: linear-gradient(135deg, #991b1b, #7f1d1d);
  color: #fff;
  border: 1px solid #f87171;
  border-radius: 8px;
  padding: 10px 18px;
  font-weight: 800;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s;
}

.btn-choice-no:hover {
  background: #dc2626;
  transform: translateY(-1px);
}

/* Dojo Modal */
#dojo-modal {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(4, 7, 12, 0.92);
  backdrop-filter: blur(8px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 105;
}

.dojo-panel {
  background: #111827;
  border: 2px solid var(--accent-gold);
  border-radius: 16px;
  padding: 24px 30px;
  width: 90%;
  max-width: 580px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.dojo-panel h2 {
  font-family: var(--font-title);
  color: var(--accent-gold);
  font-size: 22px;
}

.dojo-desc {
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.4;
}

.technique-selector {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tech-card {
  background: #1f2937;
  border: 1.5px solid #374151;
  border-radius: 8px;
  padding: 10px 14px;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s;
}

.tech-card.active, .tech-card:hover {
  border-color: var(--accent-cyan);
  background: #1e293b;
}

.tech-card h3 {
  font-size: 13px;
  color: #fff;
}

.tech-card p {
  font-size: 11px;
  color: #94a3b8;
}

.tech-benefit {
  font-size: 10px;
  color: var(--accent-green);
  font-weight: 700;
}

.dojo-stats {
  display: flex;
  justify-content: space-around;
  padding: 8px;
  background: #0d1117;
  border-radius: 8px;
  font-size: 12px;
  color: #cbd5e1;
}

.dojo-stats strong {
  color: var(--accent-gold);
}

/* Controls Bar */
#controls-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  font-size: 12px;
  align-items: center;
}

.control-hint {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-dim);
}

kbd {
  background: #21262d;
  border: 1px solid #30363d;
  border-radius: 4px;
  padding: 3px 6px;
  font-family: monospace;
  font-weight: 700;
  color: var(--accent-gold);
}

.touch-breath-btn {
  background: linear-gradient(135deg, #1f4068, #162447);
  color: #fff;
  border: 1px solid var(--accent-cyan);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.touch-breath-btn:active {
  transform: scale(0.96);
  background: #45f3ff;
  color: #000;
}

.btn-primary {
  background: linear-gradient(135deg, #e5a93b, #d97706);
  color: #0b0c10;
  font-weight: 800;
  border: none;
  border-radius: 8px;
  padding: 10px 18px;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s ease;
}

.btn-primary:hover {
  box-shadow: 0 0 15px rgba(229, 169, 59, 0.5);
  transform: translateY(-1px);
}

/* Footer */
#game-footer {
  text-align: center;
}

.tip-box {
  background: rgba(30, 41, 59, 0.4);
  border-left: 3px solid var(--accent-cyan);
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 12px;
  color: var(--text-dim);
  display: inline-block;
}

.tip-box strong {
  color: var(--accent-cyan);
}

.hidden {
  display: none !important;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1); }
}

@media (max-width: 768px) {
  #game-container {
    padding: 6px;
  }
  .titles h1 {
    font-size: 16px;
  }
  #controls-bar {
    font-size: 11px;
    flex-direction: column;
    align-items: flex-start;
  }
  #breathwork-hud {
    transform: scale(0.85);
    transform-origin: top right;
  }
  #player-hud-bar {
    transform: scale(0.85);
    transform-origin: top left;
  }
}
