:root {
  --bg: #08090f;
  --surface: #111318;
  --surface2: #181b24;
  --border: rgba(255, 255, 255, 0.07);
  --text: #e8ecf4;
  --text2: #8b92a8;
  --accent: #e53e3e;
  --accent2: #f6ad55;
  --hero-c: #38d9a9;
  --enemy-c: #e53e3e;
  --radius: 12px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* ── Navbar ── */

.navbar {
  position: sticky;
  top: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  height: 56px;
  background: rgba(8, 9, 15, 0.82);
  backdrop-filter: blur(16px) saturate(1.6);
  border-bottom: 1px solid var(--border);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "Bebas Neue", sans-serif;
  font-size: 1.5rem;
  letter-spacing: 0.12em;
  color: var(--accent);
  text-decoration: none;
}

.nav-logo {
  height: 36px;
  width: auto;
  border-radius: 6px;
}

.ca-copy {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text2);
  font-family: "Inter", sans-serif;
  font-size: 0.78rem;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
  white-space: nowrap;
}

.ca-copy:hover {
  border-color: var(--accent);
  color: var(--text);
}

.ca-label {
  color: var(--accent2);
  font-weight: 600;
}

.ca-toast {
  position: absolute;
  top: -28px;
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: var(--accent);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 5px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}

.ca-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.nav-links {
  display: flex;
  gap: 28px;
}

.nav-links a {
  color: var(--text2);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: color 0.15s;
}

.nav-links a:hover {
  color: var(--text);
}

/* ── Hero Banner ── */

.hero-banner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 24px 64px;
  text-align: center;
  background:
    radial-gradient(ellipse 60% 50% at 50% 40%, rgba(229, 62, 62, 0.12), transparent),
    radial-gradient(ellipse 40% 40% at 30% 60%, rgba(56, 217, 169, 0.06), transparent);
}

.hero-text h1 {
  font-family: "Bebas Neue", sans-serif;
  font-size: clamp(3.5rem, 10vw, 7rem);
  letter-spacing: 0.08em;
  line-height: 0.95;
}

.hero-text .accent {
  color: var(--accent);
}

.hero-text p {
  margin-top: 12px;
  color: var(--text2);
  font-size: 1.05rem;
}

.cta {
  display: inline-block;
  margin-top: 28px;
  padding: 12px 36px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 0.92rem;
  border-radius: 8px;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
}

.cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(229, 62, 62, 0.35);
}

/* ── Sections ── */

.app {
  max-width: 1060px;
  margin: 0 auto;
}

.section {
  padding: 48px 24px;
  scroll-margin-top: 60px;
}

.section-title {
  font-family: "Bebas Neue", sans-serif;
  font-size: 1.8rem;
  letter-spacing: 0.06em;
  margin-bottom: 24px;
}

/* ── Fighter Select ── */

.menu {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.fighter-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.2s, transform 0.15s, box-shadow 0.2s;
  font-family: inherit;
}

.fighter-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(229, 62, 62, 0.15);
}

.card-img-wrap {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid var(--border);
}

.card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-info {
  display: grid;
  gap: 2px;
  text-align: left;
}

.card-info strong {
  font-size: 1.1rem;
}

.card-sub {
  color: var(--text2);
  font-size: 0.82rem;
}

/* ── Tutorial ── */

.tut-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}

.tut-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 18px;
  text-align: center;
}

.tut-card .tut-icon {
  font-size: 1.8rem;
  margin-bottom: 8px;
}

.tut-card h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.tut-card p {
  color: var(--text2);
  font-size: 0.82rem;
  line-height: 1.5;
}

.key-row {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: 10px;
}

kbd {
  display: inline-block;
  background: var(--surface2);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom-width: 3px;
  border-radius: 6px;
  padding: 4px 12px;
  font-family: "Inter", sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}

.tut-tip {
  margin-top: 18px;
  padding: 14px 18px;
  background: rgba(229, 62, 62, 0.06);
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  font-size: 0.85rem;
  color: var(--text2);
}

.tut-tip strong {
  color: var(--accent);
}

/* ── HUD ── */

.hud {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 24px;
}

.hud-side {
  flex: 1;
  display: grid;
  gap: 4px;
}

.hud-right {
  text-align: right;
}

.hud-right .bar {
  direction: rtl;
}

.hud-name {
  font-family: "Bebas Neue", sans-serif;
  font-size: 1rem;
  letter-spacing: 0.06em;
}

.hud-center {
  width: 80px;
  text-align: center;
}

.combo {
  font-family: "Bebas Neue", sans-serif;
  font-size: 1.3rem;
  color: var(--accent2);
  text-shadow: 0 0 12px rgba(246, 173, 85, 0.5);
}

.bar {
  height: 14px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 7px;
  overflow: hidden;
}

.fill {
  height: 100%;
  width: 100%;
  border-radius: 7px;
  transition: width 0.2s ease;
}

.fill.hero {
  background: linear-gradient(90deg, #20c997, #63e6be);
}

.fill.enemy {
  background: linear-gradient(90deg, #ff6b6b, #e03131);
}

/* ── Canvas ── */

.game-wrap {
  position: relative;
  margin: 0 24px 12px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: #000;
}

canvas {
  width: 100%;
  height: auto;
  display: block;
}

.overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: "Bebas Neue", sans-serif;
  font-size: clamp(2rem, 5vw, 3.5rem);
  letter-spacing: 0.05em;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  text-align: center;
  padding: 20px;
}

.restart {
  display: block;
  margin: 0 auto 32px;
  padding: 12px 32px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: "Inter", sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: border-color 0.15s;
}

.restart:hover {
  border-color: var(--accent);
}

/* ── Footer ── */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 36px 24px;
  text-align: center;
  scroll-margin-top: 60px;
}

.footer-inner {
  max-width: 1060px;
  margin: 0 auto;
  display: grid;
  gap: 6px;
}

.footer-brand {
  font-family: "Bebas Neue", sans-serif;
  font-size: 1.2rem;
  letter-spacing: 0.12em;
  color: var(--accent);
}

.site-footer p {
  color: var(--text2);
  font-size: 0.82rem;
}

.disclaimer {
  opacity: 0.5;
  font-size: 0.72rem !important;
}

.hidden {
  display: none !important;
}
