:root {
  --crimson: #dc143c;
  --crimson-soft: #ff4063;
  --ink: #181818;
  --paper: #f7f4f1;
  --paper-deep: #ece4dc;
  --night: #20161a;
  --glass: rgba(255, 255, 255, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
  background: radial-gradient(circle at 20% 20%, #3a1b23, #120e10 56%);
  color: var(--paper);
  font-family: "Sora", sans-serif;
}

body {
  min-height: 100vh;
  position: relative;
}

h1,
h2,
h3,
.brand-mark {
  font-family: "Teko", sans-serif;
  letter-spacing: 0.03em;
}

.text-crimson {
  color: var(--crimson-soft);
}

.bg-orb {
  position: fixed;
  pointer-events: none;
  z-index: -1;
  border-radius: 999px;
  filter: blur(45px);
}

.bg-orb-1 {
  width: 240px;
  height: 240px;
  top: 8%;
  left: -50px;
  background: rgba(220, 20, 60, 0.5);
}

.bg-orb-2 {
  width: 280px;
  height: 280px;
  right: -80px;
  bottom: 12%;
  background: rgba(255, 165, 0, 0.28);
}

.site-nav {
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(10px);
  transition: box-shadow 0.25s ease, background-color 0.25s ease;
}

.site-nav.scrolled {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  background: rgba(12, 8, 10, 0.85);
}

.navbar-brand {
  color: #fff;
  font-size: 1.6rem;
}

.navbar-brand:hover,
.nav-link:hover,
.nav-link:focus {
  color: var(--crimson-soft);
}

.nav-link {
  color: rgba(255, 255, 255, 0.85);
  font-weight: 600;
}

.hero-section {
  padding: 3.2rem 0 3rem;
}

.eyebrow {
  color: var(--crimson-soft);
  text-transform: uppercase;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.display-title {
  font-size: clamp(2.4rem, 6vw, 5rem);
  line-height: 0.95;
  margin-bottom: 1rem;
}

.hero-copy {
  font-size: 1.05rem;
  max-width: 60ch;
  color: rgba(255, 255, 255, 0.9);
}

.hero-panel {
  background: linear-gradient(155deg, rgba(220, 20, 60, 0.3), rgba(255, 255, 255, 0.05));
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  padding: 1.4rem;
}

.hero-panel h2 {
  margin-top: 0;
}

.hero-panel ul {
  margin-bottom: 0;
}

.section-block {
  padding: 4.2rem 0;
}

.section-tinted {
  background: linear-gradient(180deg, rgba(220, 20, 60, 0.1), rgba(0, 0, 0, 0.12));
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.info-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.info-card,
.feature-tile,
.stack-card,
.game-card {
  background: var(--glass);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  padding: 1.1rem;
  height: 100%;
}

.feature-tile h3,
.info-card h3,
.stack-card h3,
.game-card h3 {
  font-size: 1.7rem;
}

.stack-card ul {
  margin-bottom: 0;
  padding-left: 1.1rem;
}

.btn-crimson {
  --bs-btn-color: #fff;
  --bs-btn-bg: var(--crimson);
  --bs-btn-border-color: var(--crimson);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: #b01131;
  --bs-btn-hover-border-color: #b01131;
  --bs-btn-active-bg: #970f2a;
  --bs-btn-active-border-color: #970f2a;
  --bs-btn-focus-shadow-rgb: 220, 20, 60;
}

.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1.1rem 0;
  color: rgba(255, 255, 255, 0.9);
}

#contactoModal .modal-content {
  background: linear-gradient(165deg, #1b1216, #0f0b0d);
  border: 1px solid rgba(220, 20, 60, 0.55);
  color: #f8f3ee;
}

#contactoModal .modal-header,
#contactoModal .modal-footer {
  border-color: rgba(255, 255, 255, 0.12);
}

#contactoModal .modal-title {
  color: #ffd5dd;
}

#contactoModal .btn-close {
  filter: invert(1) grayscale(1) brightness(1.8);
}

#contactoModal .form-label {
  color: #f8f3ee;
  font-weight: 600;
}

#contactoModal .form-control {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff;
}

#contactoModal .form-control::placeholder {
  color: rgba(255, 255, 255, 0.58);
}

#contactoModal .form-control:focus {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(220, 20, 60, 0.86);
  box-shadow: 0 0 0 0.2rem rgba(220, 20, 60, 0.25);
}

.contact-honeypot {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  opacity: 0;
}

#contactFormStatus {
  color: rgba(255, 255, 255, 0.72);
}

#contactFormStatus.status-loading {
  color: #ffd5a8;
}

#contactFormStatus.status-success {
  color: #9be9be;
}

#contactFormStatus.status-error {
  color: #ffb8c6;
}

.game-page main {
  padding: 2.2rem 0 3rem;
}

.game-shell {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  overflow: hidden;
}

.game-header {
  padding: 1rem 1.2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(220, 20, 60, 0.2);
}

.game-stage {
  width: 100%;
  height: 560px;
  position: relative;
  background: #0f0f14;
}

.game-stage canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.game-ui {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  z-index: 2;
}

.hud-pill {
  background: rgba(0, 0, 0, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  padding: 0.45rem 0.8rem;
  font-size: 0.84rem;
  letter-spacing: 0.03em;
}

.game-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: rgba(0, 0, 0, 0.66);
  padding: 1rem;
}

.game-overlay[hidden] {
  display: none;
}

.game-overlay h2 {
  margin-bottom: 0.7rem;
  font-size: clamp(2rem, 4vw, 3rem);
}

.instructions {
  padding: 1rem 1.2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
}

.instructions p {
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
}

.td-shell {
  overflow: visible;
}

.td-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 0;
}

.td-panel {
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  padding: 1rem;
}

.td-panel h2 {
  margin-top: 0.2rem;
  margin-bottom: 1rem;
  font-size: 2rem;
}

.td-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
  margin-bottom: 0.9rem;
}

.td-stat {
  font-size: 0.88rem;
  padding: 0.4rem 0.55rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.28);
}

.td-help {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.86);
}

.td-help code {
  color: #fff;
}

.td-step {
  margin: 0.35rem 0 0.45rem;
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
}

.td-panel .btn.btn-build-active {
  color: #fff;
  border-color: #dc143c;
  background: rgba(220, 20, 60, 0.85);
}

.td-panel .btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.td-stage {
  height: 620px;
}

@media (max-width: 992px) {
  .game-stage {
    height: 460px;
  }

  .info-card-grid {
    grid-template-columns: 1fr;
  }

  .td-layout {
    grid-template-columns: 1fr;
  }

  .td-panel {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .td-stage {
    height: 460px;
  }
}

@media (max-width: 576px) {
  .display-title {
    font-size: 2.7rem;
  }

  .game-stage {
    height: 360px;
  }

  .game-ui {
    flex-direction: column;
    align-items: flex-start;
  }
}
