:root {
  --bg: #050816;
  --bg-card: #111827;
  --bg-card-alt: #020617;
  --border-strong: rgba(31, 41, 55, 0.9);
  --shadow-soft: 0 18px 40px rgba(15, 23, 42, 0.75);
  --radius-lg: 1.25rem;
  --accent: #38bdf8;
  --accent-gradient: linear-gradient(to right, #38bdf8, #a855f7);
  --text: #f9fafb;
  --text-muted: #9ca3af;
}

body {
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: radial-gradient(circle at top, #1f2937 0, #020617 50%, #000 100%);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, sans-serif;
}

body.is-mobile .site-header {
  display: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(14px);
  background: linear-gradient(
    to bottom,
    rgba(15, 23, 42, 0.9),
    rgba(15, 23, 42, 0.65),
    transparent
  );
  border-bottom: 1px solid rgba(148, 163, 184, 0.25);
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.95rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: radial-gradient(circle at top left, #38bdf8, #0ea5e9);
  color: #0b1120;
}

.nav a {
  margin-left: 1.25rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  text-decoration: none;
  position: relative;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.25rem;
  width: 0;
  height: 2px;
  background: var(--accent-gradient);
  transition: width 0.2s ease-out;
}

.nav a:hover::after {
  width: 100%;
}

.game-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5rem 1.5rem 2.5rem;
}

body.is-mobile .game-main {
  padding: 2rem 1rem;
}

#unity-container {
  position: relative;
  padding: 0.9rem;
  background: radial-gradient(circle at top left, #0b1120, var(--bg-card-alt) 55%);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  box-sizing: border-box;
  aspect-ratio: 16 / 9;
  width: min(90vw, 960px);
  margin: 0 auto;
}

#unity-container.unity-desktop {
  width: min(90vw, 960px);
  height: auto;
}
#unity-container.unity-mobile { position: fixed; width: 100%; height: 100% }

#unity-canvas {
  background: #231F20;
  border: 1px solid var(--border-strong);
  border-radius: calc(var(--radius-lg) - 0.25rem);
  overflow: hidden;
  width: 100%;
  height: 100%;
}

.unity-mobile #unity-canvas { width: 100%; height: 100% }

#unity-loading-bar { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: none }
#unity-logo { width: 154px; height: 130px; background: url('unity-logo-dark.png') no-repeat center }
#unity-progress-bar-empty { width: 141px; height: 18px; margin-top: 10px; margin-left: 6.5px; background: url('progress-bar-empty-dark.png') no-repeat center }
#unity-progress-bar-full { width: 0%; height: 18px; margin-top: 10px; background: url('progress-bar-full-dark.png') no-repeat center }

#unity-footer { position: relative }
.unity-mobile #unity-footer { display: none }

#unity-logo-title-footer { float:left; width: 102px; height: 38px; background: url('unity-logo-title-footer.png') no-repeat center }
#unity-build-title { float: right; margin-right: 10px; line-height: 38px; font-family: arial; font-size: 18px }
  #unity-fullscreen-button { cursor:pointer; float: right; width: 38px; height: 38px; background: url('fullscreen-button.png') no-repeat center }

  #unity-warning { position: absolute; left: 50%; top: 5%; transform: translate(-50%); background: white; padding: 10px; display: none }

  .orientation-overlay {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: linear-gradient(140deg, rgba(5, 8, 22, 0.95), rgba(5, 8, 22, 0.75));
    backdrop-filter: blur(10px);
    z-index: 20;
  }

  .orientation-card {
    max-width: 420px;
    width: 100%;
    padding: 1.4rem 1.3rem 1.2rem;
    border-radius: var(--radius-lg);
    background: radial-gradient(circle at 20% 25%, #0ea5e9 0, #020617 60%);
    border: 1px solid rgba(148, 163, 184, 0.35);
    box-shadow: var(--shadow-soft);
    text-align: center;
  }

  .orientation-card h2 {
    margin: 0 0 0.35rem;
    font-size: 1.2rem;
  }

  .orientation-card p {
    margin: 0;
    color: var(--text-muted);
  }

  body.needs-landscape .orientation-overlay {
    display: flex;
  }
