@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

:root {
  color-scheme: dark;
  --page: #040814;
  --page-strong: #0a1020;
  --panel: rgba(16, 21, 34, 0.7);
  --panel-strong: rgba(12, 17, 29, 0.9);
  --panel-soft: rgba(255, 255, 255, 0.04);
  --line: rgba(168, 195, 255, 0.18);
  --ink: #edf5ff;
  --muted: #a4b5d0;
  --muted-strong: #d6e1f8;
  --accent: #7dd3fc;
  --accent-rgb: 125, 211, 252;
  --accent-soft: rgba(125, 211, 252, 0.18);
  --accent-glow: rgba(125, 211, 252, 0.55);
  --accent-border: rgba(125, 211, 252, 0.8);
  --shadow: rgba(10, 12, 24, 0.65);
  --scanline: rgba(125, 211, 252, 0.05);
  --screen-glow: rgba(125, 211, 252, 0.22);
  --hero-gradient: radial-gradient(circle at top left, rgba(125, 211, 252, 0.30), transparent 40%), radial-gradient(circle at bottom right, rgba(168, 85, 247, 0.18), transparent 36%);
  --glow-one: rgba(124, 92, 255, 0.42);
  --glow-two: rgba(38, 200, 255, 0.28);
}

:root[data-theme="light"] {
  color-scheme: light;
  --page: #eef5ff;
  --page-strong: #f5f9ff;
  --panel: rgba(255, 255, 255, 0.7);
  --panel-strong: rgba(255, 255, 255, 0.9);
  --panel-soft: rgba(10, 18, 32, 0.03);
  --line: rgba(66, 91, 137, 0.18);
  --ink: #1a2437;
  --muted: #4f607b;
  --muted-strong: #1f3050;
  --accent: #4a8df7;
  --accent-rgb: 74, 141, 247;
  --accent-soft: rgba(74, 141, 247, 0.12);
  --accent-glow: rgba(74, 141, 247, 0.38);
  --accent-border: rgba(74, 141, 247, 0.56);
  --shadow: rgba(116, 132, 179, 0.22);
  --scanline: rgba(74, 141, 247, 0.04);
  --screen-glow: rgba(74, 141, 247, 0.11);
  --hero-gradient: radial-gradient(circle at top left, rgba(74, 141, 247, 0.12), transparent 35%), radial-gradient(circle at bottom right, rgba(175, 122, 247, 0.14), transparent 32%);
  --glow-one: rgba(124, 92, 255, 0.2);
  --glow-two: rgba(38, 140, 255, 0.16);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(var(--scanline) 50%, transparent 50%),
    var(--hero-gradient),
    var(--page);
  background-size: 100% 4px, 100% 100%, 100% 100%;
  font-family: "SF Pro Display", "Segoe UI", sans-serif;
}

img, canvas { max-width: 100%; }
a { color: inherit; }
button, select, input { font: inherit; }

#home-space {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  opacity: 0.72;
  pointer-events: none;
  mix-blend-mode: screen;
}

.page-glow {
  position: fixed;
  width: 38rem;
  height: 38rem;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.28;
  z-index: 0;
  pointer-events: none;
}
.page-glow-one {
  top: -12rem;
  left: -6rem;
  background: var(--glow-one);
}
.page-glow-two {
  right: -8rem;
  bottom: -10rem;
  background: var(--glow-two);
}

.site-shell {
  position: relative;
  z-index: 1;
  width: min(1200px, calc(100% - 56px));
  margin: 0 auto;
  padding-bottom: 36px;
}

.site-header,
.site-footer,
.hero,
.section-heading,
.card-row,
.card-actions,
.stat-row,
.cta-row,
.game-footer {
  display: flex;
  align-items: center;
}

.site-header,
.site-footer {
  justify-content: space-between;
  gap: 18px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  min-height: 88px;
  margin-top: 16px;
  padding: 14px 20px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(8, 12, 19, 0.52);
  backdrop-filter: blur(18px);
  box-shadow: 0 20px 40px var(--shadow);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  text-decoration: none;
  color: var(--ink);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--accent-border);
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent-soft), rgba(255,255,255,0.04));
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  box-shadow: 0 0 20px var(--accent-glow);
}

.brand-mark.tired-coffee-logo {
  display: inline-flex;
  align-items: flex-end;
  justify-content: center;
  gap: 2px;
  min-width: 58px;
  padding: 0 7px 8px;
  border-radius: 13px;
}

.brand-mark.tired-coffee-logo .logo-zzz {
  align-self: flex-start;
  margin-top: 7px;
  font-size: 0.38rem;
}

.brand-mark.tired-coffee-logo .logo-mug {
  width: 20px;
  height: 14px;
}

.brand-mark.tired-coffee-logo .logo-mug::before {
  top: 2px;
  right: -7px;
  width: 6px;
  height: 7px;
}

.brand-mark.tired-coffee-logo .logo-mug::after {
  top: -8px;
  left: 3px;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand-copy strong,
.brand-copy small {
  display: block;
}

.brand-copy strong {
  font-size: 0.85rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.brand-copy small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.54rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.main-nav {
  display: inline-flex;
  align-items: center;
  gap: 20px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--line);
}

.main-nav a {
  color: var(--muted-strong);
  text-decoration: none;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: color 0.2s ease;
}

.main-nav a:hover,
.main-nav a:focus-visible {
  color: var(--ink);
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 18px;
}

.accent-picker,
.theme-picker {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.accent-picker input {
  width: 92px;
  height: 20px;
  padding: 0;
  border: 1px solid var(--accent-border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  accent-color: var(--accent);
}

.accent-picker input[type="range"] {
  appearance: none;
  border: 0;
  background: linear-gradient(90deg, #ff5c7a, #ffd166, #8bea9a, #72d8ff, #a78bfa, #ff5c7a);
}

.accent-picker input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 16px;
  height: 16px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
}

.accent-picker input[type="range"]::-moz-range-thumb {
  width: 13px;
  height: 13px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
}

.accent-picker input::-webkit-color-swatch-wrapper { padding: 0; }
.accent-picker input::-webkit-color-swatch { border: none; border-radius: 7px; }

.theme-picker select {
  min-width: 100px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(9, 14, 21, 0.78);
  color: var(--ink);
  cursor: pointer;
}

.download-button,
.primary-button,
.secondary-button,
.inline-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid var(--accent-border);
  border-radius: 999px;
  text-decoration: none;
  color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 18px rgba(125, 211, 252, 0.15);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.download-button:hover,
.primary-button:hover,
.secondary-button:hover,
.inline-button:hover,
.download-button:focus-visible,
.primary-button:focus-visible,
.secondary-button:focus-visible,
.inline-button:focus-visible {
  transform: translateY(-1px);
  background: linear-gradient(135deg, var(--accent), rgba(255,255,255,0.95));
  color: #05101d;
  box-shadow: 0 0 28px var(--accent-glow);
}

.secondary-button,
.inline-button.light {
  background: transparent;
  color: var(--ink);
}

.page-content {
  padding: 42px 0 24px;
}

.hero {
  justify-content: space-between;
  gap: 36px;
  padding-top: 26px;
}

.hero-copy,
.hero-visual {
  flex: 1 1 0;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--accent);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  max-width: 620px;
  font-size: clamp(2.5rem, 5vw, 5rem);
  line-height: 0.92;
  letter-spacing: -0.05em;
}

.hero-text {
  max-width: 560px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 1.06rem;
  line-height: 1.7;
}

.cta-row {
  gap: 16px;
  margin-top: 30px;
  flex-wrap: wrap;
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(90px, 1fr));
  gap: 14px;
  max-width: 420px;
  margin-top: 32px;
}

.stat-box {
  padding: 16px 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,0.02);
}

.stat-box strong,
.stat-box span {
  display: block;
}

.stat-box strong {
  font-size: 1.12rem;
}

.stat-box span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.56rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.glass-panel {
  border: 1px solid var(--line);
  border-radius: 30px;
  background: linear-gradient(180deg, rgba(255,255,255,0.07), rgba(255,255,255,0.02));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 25px 50px var(--shadow);
  backdrop-filter: blur(20px);
}

.hero-visual {
  position: relative;
  padding: 18px;
  min-height: 420px;
}

.device-window {
  height: 100%;
  padding: 10px;
  border-radius: 22px;
  background: rgba(6, 9, 18, 0.75);
  border: 1px solid rgba(255,255,255,0.06);
}

.window-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px 4px;
}

.dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot-red { background: #ff6b6b; }
.dot-yellow { background: #fbd271; }
.dot-green { background: #7ae582; }

.screen {
  margin-top: 8px;
  border-radius: 20px;
  padding: 20px 20px 18px;
  background: linear-gradient(180deg, rgba(162, 177, 255, 0.12), rgba(9, 16, 30, 0.9));
  border: 1px solid rgba(255,255,255,0.04);
}

.screen-header,
.card-row,
.card-actions,
.game-footer {
  justify-content: space-between;
}

.screen-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mini-label,
.tag,
.card-badge,
.mini-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.02);
  color: var(--muted-strong);
  font-size: 0.56rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.screen h2,
.section-heading h2,
.about-panel h2 {
  margin: 18px 0 0;
  font-size: clamp(1.6rem, 2vw, 2.5rem);
  letter-spacing: -0.04em;
}

.screen p,
.game-card p,
.mini-card p,
.about-panel p {
  color: var(--muted);
  line-height: 1.7;
}

.orb-scene {
  position: relative;
  height: 180px;
  margin-top: 18px;
  overflow: hidden;
  border-radius: 18px;
  background: radial-gradient(circle at 50% 35%, rgba(125, 211, 252, 0.3), rgba(11, 16, 29, 0.8) 52%, rgba(3, 7, 16, 0.95));
}

.planet-main {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #f6fbff, #8ad9ff 42%, #5a7cff 80%, #1d2a52);
  transform: translate(-50%, -50%);
  box-shadow: 0 0 40px rgba(125, 211, 252, 0.55);
}

.ring {
  position: absolute;
  left: 50%;
  top: 50%;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.25);
  transform: translate(-50%, -50%) rotateX(68deg);
}

.ring-one { width: 180px; height: 180px; }
.ring-two { width: 220px; height: 220px; border-style: dashed; }

.screen-actions {
  display: flex;
  gap: 12px;
  margin-top: 18px;
}

.screen-actions button {
  min-height: 38px;
  padding: 0 16px;
  border: 1px solid var(--accent-border);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--ink);
  cursor: pointer;
}

.screen-actions .ghost {
  background: transparent;
}

.project-section {
  padding-top: 52px;
}

.section-heading {
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 22px;
}

.card-grid,
.mini-grid {
  display: grid;
  gap: 20px;
}

.card-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
}

.game-card,
.mini-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 24px 22px;
  border-radius: 24px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.game-card {
  min-height: 300px;
  height: 100%;
}

.featured-card {
  background: linear-gradient(180deg, rgba(125,211,252,0.12), rgba(255,255,255,0.02));
}

.game-card h3,
.mini-card h3 {
  margin: 16px 0 10px;
  font-size: clamp(1.3rem, 1.4vw, 1.8rem);
}

.card-row {
  gap: 8px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.card-actions {
  justify-content: flex-start;
  align-items: flex-end;
  gap: 12px;
  margin-top: auto;
  min-height: 58px;
  padding-top: 22px;
  flex-wrap: wrap;
}

.inline-button {
  min-height: 36px;
  padding: 0 14px;
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.mini-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.mini-card {
  min-height: 200px;
}

.mini-tag {
  margin-bottom: 10px;
}

.showcase {
  padding-top: 54px;
  transition: opacity 0.35s ease, transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.back-button {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted-strong);
  text-decoration: none;
  background: rgba(255,255,255,0.03);
  transition: transform 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.back-button:hover,
.back-button:focus-visible {
  transform: translateX(-3px);
  border-color: var(--accent-border);
  color: var(--ink);
}

body.game-view-active .page-content > :not(.showcase) {
  display: none !important;
}

body.game-view-active .page-content {
  min-height: calc(100vh - 120px);
}

body.game-view-active .showcase {
  display: none;
}

body.game-view-active[data-game="pistol"] #pistol-python,
body.game-view-active[data-game="whoo"] #whoo-gave-you-that,
body.game-view-active[data-game="simon"] #simon-says,
body.game-view-active[data-game="tree"] #tree-bound {
  display: block;
}

body.games-view-active .page-content > :not(.games-area) {
  display: none !important;
}

body.games-view-active .page-content {
  min-height: calc(100vh - 120px);
}

.page-content > .games-area {
  display: block;
  animation: game-view-enter 0.55s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

body.games-view-active .page-content > .games-area {
  display: block;
  animation: game-view-enter 0.55s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

body.about-view-active .page-content > :not(.about-panel) {
  display: none !important;
}

body.about-view-active .page-content {
  min-height: calc(100vh - 120px);
}

body.about-view-active .about-panel {
  display: block !important;
  animation: game-view-enter 0.55s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

body:not(.game-view-active) .page-content > .showcase {
  display: none;
}

body.game-view-active .page-content > :not(.showcase) {
  display: none;
}

body.game-view-active .showcase {
  display: none !important;
  animation: game-view-enter 0.55s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

body.game-view-active .hero-centered,
body.game-view-active .games-area,
body.game-view-active .about-panel {
  display: none;
}

body.game-view-active[data-game="pistol"] #pistol-python,
body.game-view-active[data-game="whoo"] #whoo-gave-you-that,
body.game-view-active[data-game="simon"] #simon-says,
body.game-view-active[data-game="tree"] #tree-bound {
  display: block !important;
}

body.games-view-active .page-content > :not(.games-area) {
  display: none;
}

.hero-centered {
  justify-content: center;
  min-height: 42vh;
  padding: 72px 0 38px;
  text-align: center;
}

.hero-centered .hero-copy {
  position: relative;
  z-index: 1;
  max-width: 860px;
  flex: 0 1 auto;
}

.hero-centered .eyebrow {
  margin-bottom: 24px;
}

.hero-centered h1 {
  font-size: clamp(2.2rem, 7vw, 6.5rem);
  line-height: 1.08;
  letter-spacing: 0.04em;
}

.hero-centered .hero-text {
  max-width: 660px;
  margin: 28px auto 0;
}

body.game-view-active .showcase {
  animation: game-view-enter 0.55s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

@keyframes game-view-enter {
  from {
    opacity: 0;
    transform: translateY(28px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

#unity-container {
  position: relative;
  overflow: hidden;
  margin-top: 18px;
  border: 1px solid var(--accent-border);
  border-radius: 30px;
  background: #000;
  box-shadow: 0 0 0 5px rgba(7, 10, 18, 0.9), 0 20px 50px rgba(0,0,0,0.65), 0 0 32px var(--accent-soft);
}

#unity-container.unity-desktop {
  width: 100%;
}

#whoo-unity-container,
#simon-unity-container,
#tree-unity-container {
  position: relative;
  overflow: hidden;
  min-height: 420px;
  margin-top: 18px;
  border: 1px solid var(--accent-border);
  border-radius: 30px;
  background: #000;
}

#whoo-unity-canvas,
#simon-unity-canvas {
  display: block;
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 8 / 5;
  background: #000;
}

#tree-unity-canvas {
  display: block;
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 16 / 9;
  margin-inline: auto;
  background: #000;
}

#whoo-loading-bar,
#simon-loading-bar,
#tree-loading-bar {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(320px, 60%);
  transform: translate(-50%, -50%);
  display: none;
}

#whoo-progress-bar-empty,
#simon-progress-bar-empty,
#tree-progress-bar-empty {
  width: 100%;
  height: 10px;
  overflow: hidden;
  border: 1px solid var(--accent-border);
  border-radius: 999px;
  padding: 2px;
  background: rgba(4,8,20,0.7);
}

#whoo-progress-bar-full,
#simon-progress-bar-full,
#tree-progress-bar-full {
  width: 0%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), rgba(255,255,255,0.9));
  box-shadow: 0 0 18px var(--accent-glow);
}

#whoo-warning,
#simon-warning,
#tree-warning {
  position: absolute;
  left: 50%;
  top: 5%;
  max-width: 80%;
  transform: translateX(-50%);
  display: none;
  border-radius: 12px;
  padding: 12px 14px;
  background: rgba(110, 16, 16, 0.45);
  border: 1px solid rgba(255,110,110,0.55);
  color: #ffe4e4;
  text-align: center;
}

#whoo-footer,
#simon-footer,
#tree-footer {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 54px;
  padding: 0 16px;
  background: linear-gradient(transparent, rgba(0,0,0,0.92));
}

#tree-fullscreen-button,
#whoo-fullscreen-button {
  min-height: 32px;
  padding: 0 14px;
  border: 1px solid var(--accent-border);
  border-radius: 999px;
  color: var(--accent);
  background: var(--accent-soft);
  cursor: pointer;
}

#simon-fullscreen-button {
  min-height: 32px;
  padding: 0 14px;
  border: 1px solid var(--accent-border);
  border-radius: 999px;
  color: var(--accent);
  background: var(--accent-soft);
  cursor: pointer;
}

#whoo-build-title,
#simon-build-title {
  margin-left: auto;
}

#unity-canvas {
  display: block;
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 30px;
}

#unity-loading-bar {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(320px, 60%);
  transform: translate(-50%, -50%);
  display: none;
}

.loading-label {
  margin-bottom: 12px;
  color: var(--accent);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-align: center;
  text-transform: uppercase;
}

#unity-progress-bar-empty {
  width: 100%;
  height: 10px;
  overflow: hidden;
  border: 1px solid var(--accent-border);
  border-radius: 999px;
  padding: 2px;
  background: rgba(4,8,20,0.7);
}

#unity-progress-bar-full {
  width: 0%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), rgba(255,255,255,0.9));
  box-shadow: 0 0 18px var(--accent-glow);
}

#unity-warning {
  position: absolute;
  left: 50%;
  top: 5%;
  max-width: 80%;
  transform: translate(-50%);
  display: none;
  border-radius: 12px;
  padding: 12px 14px;
  background: rgba(110, 16, 16, 0.45);
  border: 1px solid rgba(255,110,110,0.55);
  color: #ffe4e4;
  text-align: center;
}

#unity-footer {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 54px;
  padding: 0 16px;
  background: linear-gradient(transparent, rgba(0,0,0,0.92));
}

#unity-webgl-logo {
  background: none !important;
}

.tired-coffee-logo {
  position: relative;
  display: inline-flex;
  align-items: flex-end;
  gap: 4px;
  min-width: 78px;
  height: 30px;
  color: var(--accent);
  filter: drop-shadow(0 0 8px var(--accent-glow));
}

.logo-zzz {
  align-self: flex-start;
  font-size: 0.48rem;
  letter-spacing: 0.08em;
  line-height: 1;
  text-shadow: 0 0 8px var(--accent-glow);
  animation: logo-snore 2.8s ease-in-out infinite;
}

.logo-mug {
  position: relative;
  display: block;
  width: 25px;
  height: 17px;
  border: 2px solid currentColor;
  border-radius: 2px 2px 7px 7px;
  box-shadow: inset 0 -5px 0 var(--accent-soft);
}

.logo-mug::before {
  position: absolute;
  top: 3px;
  right: -8px;
  width: 7px;
  height: 8px;
  border: 2px solid currentColor;
  border-left: 0;
  border-radius: 0 6px 6px 0;
  content: "";
}

.logo-mug::after {
  position: absolute;
  top: -9px;
  left: 4px;
  width: 12px;
  height: 9px;
  border-left: 2px solid currentColor;
  border-radius: 50%;
  content: "";
  opacity: 0.75;
  transform: skewX(-18deg);
  animation: steam-rise 2.2s ease-in-out infinite;
}

#unity-build-title {
  margin-left: auto;
  color: rgba(225, 234, 255, 0.72);
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

#unity-fullscreen-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 128px;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--accent-border);
  border-radius: 999px;
  color: var(--accent);
  background: rgba(125,211,252,0.12);
  cursor: pointer;
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.fullscreen-glyph {
  position: relative;
  width: 12px;
  height: 12px;
  border: 1px solid currentColor;
}

.fullscreen-glyph::before,
.fullscreen-glyph::after {
  position: absolute;
  width: 5px;
  height: 5px;
  content: "";
  background: transparent;
}

.fullscreen-glyph::before {
  right: -2px;
  bottom: -2px;
  border-top: 1px solid currentColor;
  border-left: 1px solid currentColor;
}

.fullscreen-glyph::after {
  top: -2px;
  left: -2px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
}

.game-footer {
  gap: 14px;
  padding-top: 18px;
  color: var(--muted);
  font-size: 0.56rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.footer-divider {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
}

.about-panel {
  margin-top: 56px;
  padding: 26px 24px;
}

.about-panel p {
  max-width: 740px;
  margin-top: 16px;
  font-size: 1rem;
}

.site-footer {
  min-height: 72px;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.no-script-banner {
  width: min(760px, calc(100% - 32px));
  margin: 24px auto 0;
  padding: 14px 18px;
  border: 1px solid var(--accent-border);
  border-radius: 16px;
  text-align: center;
  font-size: 0.64rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: rgba(125,211,252,0.09);
}

@media (max-width: 900px) {
  .site-header {
    flex-wrap: wrap;
    justify-content: center;
  }

  .hero {
    flex-direction: column;
  }

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

@media (max-width: 640px) {
  .site-shell {
    width: min(100% - 28px, 1200px);
  }

  .site-header {
    padding: 14px 14px;
  }

  .main-nav {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }

  .header-tools {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }

  .accent-picker span,
  .theme-picker span {
    display: none;
  }

  .hero h1 {
    max-width: 100%;
  }

  .stat-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .site-footer {
    flex-direction: column;
    text-align: center;
  }

}

/* Pixel-night visual system */
:root {
  --page: #020202;
  --page-strong: #050505;
  --panel: rgba(8, 8, 8, 0.88);
  --panel-strong: #090909;
  --panel-soft: rgba(255, 255, 255, 0.035);
  --line: color-mix(in srgb, var(--accent) 28%, #202020);
  --ink: #f1f1e8;
  --muted: #96968c;
  --muted-strong: #c6c6ba;
  --shadow: rgba(0, 0, 0, 0.82);
}

* {
  image-rendering: auto;
}

html {
  background: #020202;
}

body {
  overflow-x: hidden;
  background:
    linear-gradient(rgba(255, 255, 255, 0.018) 50%, transparent 50%),
    radial-gradient(circle at 50% -10%, var(--screen-glow), transparent 42%),
    #020202;
  background-size: 100% 4px, 100% 100%, 100% 100%;
  font-family: "Press Start 2P", "Courier New", monospace;
  animation: page-breathe 8s ease-in-out infinite;
}

body::after {
  box-shadow: inset 0 0 120px rgba(0, 0, 0, 0.94);
}

:root[data-theme="light"] {
  color-scheme: light;
  --page: #f3f6fb;
  --page-strong: #ffffff;
  --panel: rgba(255, 255, 255, 0.92);
  --panel-strong: #ffffff;
  --panel-soft: rgba(16, 28, 48, 0.06);
  --line: color-mix(in srgb, var(--accent) 34%, #52627a);
  --ink: #101827;
  --muted: #34445c;
  --muted-strong: #16233a;
  --shadow: rgba(28, 45, 76, 0.2);
}

:root[data-theme="light"] body {
  color: var(--ink);
  background:
    linear-gradient(rgba(16, 24, 38, 0.035) 50%, transparent 50%),
    radial-gradient(circle at 50% -10%, var(--screen-glow), transparent 42%),
    var(--page);
  background-size: 100% 4px, 100% 100%, 100% 100%;
}

:root[data-theme="light"] .site-header {
  background: rgba(255, 255, 255, 0.78);
}

:root[data-theme="light"] .glass-panel {
  background: rgba(255, 255, 255, 0.82);
}

:root[data-theme="light"] .game-card p,
:root[data-theme="light"] .about-panel p,
:root[data-theme="light"] .hero-text {
  color: var(--muted);
}

.page-glow {
  opacity: 0.2;
  filter: blur(110px);
  animation: drift 14s ease-in-out infinite alternate;
}

.page-glow-two {
  animation-delay: -7s;
}

.site-shell {
  width: min(1120px, calc(100% - 36px));
}

.site-header {
  border-radius: 0;
  border-width: 0 0 1px;
  background: rgba(2, 2, 2, 0.78);
  box-shadow: 0 12px 35px rgba(0,0,0,0.8), 0 0 24px var(--accent-soft);
}

.brand-mark,
.glass-panel,
.stat-box,
.main-nav,
.download-button,
.primary-button,
.secondary-button,
.inline-button,
.back-button {
  border-radius: 2px;
}

.brand-mark,
.glass-panel,
.game-card,
.mini-card,
.stat-box {
  box-shadow: 0 0 18px rgba(var(--accent-rgb), 0.08), inset 0 0 24px rgba(255,255,255,0.018);
}

.brand-copy strong,
.hero h1,
.screen h2,
.section-heading h2,
.about-panel h2,
.game-card h3,
.mini-card h3 {
  text-shadow: 0 0 12px var(--accent-glow);
}

.hero h1 {
  max-width: 760px;
  font-size: clamp(1.6rem, 3vw, 3.35rem);
  line-height: 1.35;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.hero-text,
.screen p,
.game-card p,
.about-panel p {
  font-size: 0.78rem;
  line-height: 2;
}

.glass-panel {
  background: rgba(5, 5, 5, 0.82);
  backdrop-filter: blur(14px);
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.glass-panel:hover {
  border-color: var(--accent-border);
  box-shadow: 0 0 28px var(--accent-soft), inset 0 0 28px var(--accent-soft);
}

.game-card,
.mini-card {
  animation: card-rise 0.7s both;
}

.game-card:nth-child(2),
.mini-card:nth-child(2) {
  animation-delay: 0.12s;
}

.game-card:nth-child(3),
.mini-card:nth-child(3) {
  animation-delay: 0.24s;
}

.orb-scene {
  background: #030303;
  box-shadow: inset 0 0 30px var(--accent-soft);
  animation: scene-pulse 5s ease-in-out infinite;
}

.planet-main {
  background: radial-gradient(circle at 35% 30%, #fff, var(--accent) 46%, #050505 78%);
  animation: planet-float 5s ease-in-out infinite;
}

.ring-one,
.ring-two {
  border-color: var(--accent-border);
  animation: ring-spin 12s linear infinite;
}

.ring-two {
  animation-direction: reverse;
  animation-duration: 18s;
}

.eyebrow,
.tag,
.card-badge,
.mini-tag {
  text-shadow: 0 0 10px var(--accent-glow);
}

.primary-button,
.secondary-button,
.inline-button,
.download-button,
.back-button {
  font-family: inherit;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-heading h2,
.about-panel h2 {
  font-size: clamp(1.1rem, 2vw, 1.8rem);
  line-height: 1.5;
}

.showcase {
  min-height: 70vh;
}

@keyframes page-breathe {
  0%, 100% { background-position: 0 0, 50% 0, 0 0; }
  50% { background-position: 0 2px, 50% 8px, 0 0; }
}

@keyframes drift {
  from { transform: translate3d(-2%, -1%, 0) scale(0.98); }
  to { transform: translate3d(3%, 2%, 0) scale(1.05); }
}

@keyframes card-rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes scene-pulse {
  0%, 100% { box-shadow: inset 0 0 24px var(--accent-soft); }
  50% { box-shadow: inset 0 0 48px var(--accent-soft), 0 0 24px var(--accent-soft); }
}

@keyframes planet-float {
  0%, 100% { transform: translate(-50%, -50%) scale(0.96); }
  50% { transform: translate(-50%, -56%) scale(1.04); }
}

@keyframes ring-spin {
  from { transform: translate(-50%, -50%) rotateX(68deg) rotateZ(0deg); }
  to { transform: translate(-50%, -50%) rotateX(68deg) rotateZ(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  #home-space {
    display: none;
  }
}

/* Final polish */
.page-content {
  position: relative;
}

.hero-centered {
  min-height: 58vh;
  padding: clamp(84px, 12vh, 150px) 0 72px;
}

.hero-centered .hero-copy {
  width: min(100%, 860px);
  padding: 34px 28px;
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
  border-radius: 28px;
  background: color-mix(in srgb, var(--panel) 72%, transparent);
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.22), inset 0 0 40px var(--panel-soft);
  backdrop-filter: blur(4px);
}

.hero-centered .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.hero-centered .eyebrow::before,
.hero-centered .eyebrow::after {
  width: 28px;
  height: 1px;
  background: var(--accent-border);
  box-shadow: 0 0 12px var(--accent-glow);
  content: "";
}

.hero-centered h1 {
  margin: 0;
  width: 100%;
  max-width: 100%;
  font-family: "Press Start 2P", "Courier New", monospace;
  font-size: 1.8rem !important;
  letter-spacing: -0.065em;
  line-height: 1.4;
  white-space: nowrap;
  text-shadow: 0 0 7px var(--accent-glow);
  transform: scaleX(0.88);
  transform-origin: center;
}

.hero-centered .hero-text {
  color: var(--muted-strong);
}

.project-section {
  padding-top: 26px;
}

.section-heading {
  padding: 0 2px 14px;
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 20%, var(--line));
}

.section-heading h2 {
  margin-top: 12px;
}

.card-grid {
  gap: 18px;
}

.site-header {
  isolation: isolate;
  overflow: hidden;
  animation: header-drop 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.site-header::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(105deg, transparent 20%, var(--accent-soft), transparent 75%);
  content: "";
  transform: translateX(-110%);
  animation: header-sheen 9s ease-in-out infinite;
  pointer-events: none;
}

.header-tools {
  margin-left: auto;
}

.brand {
  transition: transform 0.35s ease, filter 0.35s ease;
}

.brand:hover,
.brand:focus-visible {
  transform: translateY(-2px);
  filter: drop-shadow(0 0 14px var(--accent-glow));
}

.brand-mark {
  animation: mark-pulse 3.8s ease-in-out infinite;
}

.hero-centered {
  position: relative;
}

.hero-centered::before,
.hero-centered::after {
  position: absolute;
  width: 7px;
  height: 7px;
  border: 1px solid var(--accent-border);
  box-shadow: 0 0 16px var(--accent-glow);
  content: "";
  animation: pixel-orbit 7s linear infinite;
}

.hero-centered::before {
  top: 22%;
  left: 9%;
}

.hero-centered::after {
  right: 11%;
  bottom: 20%;
  animation-delay: -3.5s;
}

.hero-centered h1 {
  animation: title-glow 4s ease-in-out infinite;
}

.game-card,
.about-panel {
  position: relative;
  overflow: hidden;
}

.game-card::before,
.about-panel::before {
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 25%, rgba(255, 255, 255, 0.08), transparent 72%);
  content: "";
  transform: translateX(-120%);
  transition: transform 0.7s ease;
  pointer-events: none;
}

.game-card:hover::before,
.game-card:focus-within::before,
.about-panel:hover::before {
  transform: translateX(120%);
}

.game-card:hover {
  transform: translateY(-8px) rotateX(2deg);
}

.game-card {
  min-height: 318px;
  border-color: color-mix(in srgb, var(--accent) 20%, var(--line));
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.2), inset 0 0 24px var(--panel-soft);
}

.game-card h3 {
  max-width: 14ch;
  line-height: 1.45;
  text-wrap: balance;
}

.game-card p {
  max-width: 34ch;
}

.card-row span {
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-soft);
}

.inline-button {
  min-width: 124px;
  justify-content: center;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent-soft), transparent);
}

.about-panel {
  margin-top: 44px;
  border-color: color-mix(in srgb, var(--accent) 20%, var(--line));
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.18);
}

.site-footer {
  opacity: 0.82;
}

.inline-button,
.back-button {
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.inline-button:hover,
.inline-button:focus-visible,
.back-button:hover,
.back-button:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 0 24px var(--accent-soft);
}

@keyframes header-drop {
  from { opacity: 0; transform: translateY(-18px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes header-sheen {
  0%, 35% { transform: translateX(-110%); }
  65%, 100% { transform: translateX(110%); }
}

@keyframes mark-pulse {
  0%, 100% { box-shadow: 0 0 16px var(--accent-glow); }
  50% { box-shadow: 0 0 30px var(--accent-glow), inset 0 0 14px var(--accent-soft); }
}

@keyframes pixel-orbit {
  0% { transform: translate(0, 0) rotate(0deg); opacity: 0.3; }
  50% { transform: translate(30px, -18px) rotate(180deg); opacity: 1; }
  100% { transform: translate(0, 0) rotate(360deg); opacity: 0.3; }
}

@keyframes title-glow {
  0%, 100% { filter: drop-shadow(0 0 8px var(--accent-glow)); }
  50% { filter: drop-shadow(0 0 22px var(--accent-glow)); }
}

@keyframes logo-snore {
  0%, 100% { transform: translateY(2px); opacity: 0.65; }
  50% { transform: translateY(-3px); opacity: 1; }
}

@keyframes steam-rise {
  0%, 100% { opacity: 0.2; transform: translateY(3px) skewX(-18deg); }
  50% { opacity: 0.9; transform: translateY(-2px) skewX(-18deg); }
}

@media (prefers-reduced-motion: reduce) {
  .site-header,
  .site-header::before,
  .brand-mark,
  .hero-centered::before,
  .hero-centered::after,
  .hero-centered h1 {
    animation: none !important;
  }
}
