@import url('https://fonts.googleapis.com/css2?family=Architects+Daughter&family=Kalam:wght@400;700&family=Outfit:wght@400;600;800&family=Rajdhani:wght@500;600;700&display=swap');

:root {
  --bg-dark: #090c10;
  --bg-card: #121720;
  --bg-card-hover: #19202c;
  --text-main: #f0f4f8;
  --text-muted: #8b9bb4;
  
  --ink-red: #ff5252;
  --ink-blue: #40c4ff;
  --ink-green: #69f0ae;
  --ink-yellow: #ffd740;
  --ink-pink: #ff6ec7;
  --ink-purple: #b388ff;
  
  --border-sketch: #2d3748;
  --border-active: #40c4ff;
  --shadow-sketch: rgba(0, 0, 0, 0.4);
  
  --font-sketch: 'Architects Daughter', 'Kalam', cursive;
  --font-hand: 'Kalam', cursive;
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Rajdhani', sans-serif;
}

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

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  background-color: var(--bg-dark);
  background-image: 
    radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 24px 24px, 48px 48px, 48px 48px;
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.6;
  overflow-x: hidden;
}

/* --- Container & Layout --- */
.container {
  width: 90%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* --- Hand-Drawn Sketch Box Utility --- */
.sketch-box {
  background: var(--bg-card);
  border: 3px solid var(--border-sketch);
  border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px;
  box-shadow: 5px 6px 0px var(--shadow-sketch);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}

.sketch-box:hover {
  transform: translateY(-3px) rotate(-0.5deg);
  border-color: var(--ink-blue);
  box-shadow: 7px 9px 0px rgba(64, 196, 255, 0.25);
}

.sketch-border-alt {
  border-radius: 15px 225px 15px 255px / 255px 15px 225px 15px;
}

/* --- Header / Navigation --- */
header {
  padding: 1.5rem 0;
  border-bottom: 2px dashed rgba(255, 255, 255, 0.08);
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(9, 12, 16, 0.88);
  backdrop-filter: blur(12px);
}

.nav-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-main);
  font-family: var(--font-sketch);
  font-size: 1.75rem;
  font-weight: 700;
}

.logo-badge {
  background: var(--ink-red);
  color: #fff;
  padding: 0.2rem 0.6rem;
  border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px;
  font-size: 0.9rem;
  transform: rotate(-3deg);
  display: inline-block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--ink-blue);
}

/* --- Buttons --- */
.btn-sketch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.8rem 1.6rem;
  font-family: var(--font-hand);
  font-size: 1.25rem;
  font-weight: 700;
  text-decoration: none;
  color: #fff;
  background: var(--bg-card);
  border: 3px solid var(--ink-blue);
  border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px;
  box-shadow: 4px 4px 0px var(--ink-blue);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  user-select: none;
}

.btn-sketch:hover {
  transform: translate(-2px, -2px) rotate(1deg);
  box-shadow: 6px 6px 0px var(--ink-blue);
}

.btn-sketch:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0px var(--ink-blue);
}

.btn-primary {
  background: var(--ink-red);
  border-color: #ff8a8a;
  box-shadow: 4px 4px 0px #b33030;
  color: #ffffff;
}

.btn-primary:hover {
  box-shadow: 6px 6px 0px #b33030;
  background: #ff6666;
}

.btn-github {
  background: #1f2937;
  border-color: #4b5563;
  box-shadow: 4px 4px 0px #111827;
  color: #f3f4f6;
}

.btn-github:hover {
  box-shadow: 6px 6px 0px #111827;
  background: #374151;
}

/* --- Hero Section --- */
.hero {
  padding: 5rem 0 3.5rem;
  text-align: center;
  position: relative;
}

.hero-badge-wrap {
  margin-bottom: 1.25rem;
}

.hero-tag {
  font-family: var(--font-sketch);
  color: var(--ink-yellow);
  font-size: 1.4rem;
  background: rgba(255, 215, 64, 0.1);
  border: 2px dashed var(--ink-yellow);
  padding: 0.3rem 1.2rem;
  display: inline-block;
  border-radius: 20px;
  transform: rotate(-1.5deg);
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 3.75rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #ffffff 30%, var(--ink-blue) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -1px;
}

.hero-subtitle {
  font-size: 1.4rem;
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto 2.5rem;
  font-weight: 500;
}

.hero-subtitle .highlight {
  color: var(--ink-green);
  font-family: var(--font-hand);
  font-weight: 700;
}

.hero-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

/* --- Section Headings --- */
.section-head {
  text-align: center;
  margin-bottom: 3rem;
}

.section-head h2 {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 800;
  color: #fff;
  display: inline-block;
  position: relative;
}

.section-head h2::after {
  content: '';
  display: block;
  height: 4px;
  background: var(--ink-pink);
  border-radius: 2px;
  margin-top: 4px;
  transform: rotate(-1deg);
}

.section-head p {
  color: var(--text-muted);
  font-size: 1.15rem;
  margin-top: 0.5rem;
}

/* --- Gameplay Screenshots Grid --- */
.showcase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.75rem;
  margin-bottom: 4rem;
}

.screenshot-card {
  overflow: hidden;
  padding: 0.75rem;
  cursor: pointer;
}

.screenshot-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  transition: transform 0.3s ease;
}

.screenshot-card:hover img {
  transform: scale(1.03);
}

.screenshot-caption {
  padding: 0.75rem 0.25rem 0.25rem;
  font-weight: 600;
  color: var(--text-main);
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.screenshot-tag {
  font-family: var(--font-sketch);
  color: var(--ink-blue);
  font-size: 0.9rem;
  background: rgba(64, 196, 255, 0.12);
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
}

/* --- Step-by-Step Setup Guide --- */
.setup-section {
  padding: 4rem 0;
}

.setup-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.step-card {
  padding: 2rem 1.5rem;
  position: relative;
}

.step-num {
  position: absolute;
  top: -18px;
  left: 20px;
  background: var(--ink-purple);
  color: #fff;
  font-family: var(--font-sketch);
  font-size: 1.3rem;
  font-weight: 700;
  padding: 0.2rem 0.8rem;
  border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px;
  box-shadow: 3px 3px 0px rgba(0, 0, 0, 0.5);
}

.step-card h3 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  margin-top: 0.5rem;
  margin-bottom: 0.75rem;
  color: #fff;
}

.step-card p {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 1.25rem;
}

.code-box {
  background: #080a0e;
  border: 2px dashed rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  font-family: monospace;
  font-size: 0.95rem;
  color: var(--ink-green);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.copy-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1rem;
  padding: 0.2rem 0.4rem;
  transition: color 0.2s ease;
}

.copy-btn:hover {
  color: var(--ink-yellow);
}

/* --- Game Modes Cards --- */
.modes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-bottom: 4rem;
}

.mode-card {
  padding: 1.5rem;
  text-align: center;
}

.mode-icon {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.mode-card h4 {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  color: #fff;
  margin-bottom: 0.4rem;
}

.mode-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* --- Controls Quick Ref --- */
.controls-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 5rem;
}

@media (max-width: 768px) {
  .controls-wrap {
    grid-template-columns: 1fr;
  }
}

.control-card {
  padding: 1.75rem;
}

.control-card h3 {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  color: var(--ink-blue);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.control-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.control-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1rem;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.06);
  padding-bottom: 0.4rem;
}

.kbd-badge {
  background: #1e2634;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  padding: 0.15rem 0.5rem;
  font-family: monospace;
  font-weight: 700;
  color: var(--ink-yellow);
  font-size: 0.9rem;
}

/* --- Footer --- */
footer {
  border-top: 2px dashed rgba(255, 255, 255, 0.1);
  padding: 3rem 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 1rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 1.25rem;
}

.footer-links a {
  color: var(--text-main);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--ink-pink);
}

/* --- Image Lightbox Modal --- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.lightbox.active {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-content {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: 12px;
  border: 3px solid var(--ink-blue);
  box-shadow: 0 0 30px rgba(64, 196, 255, 0.4);
}

.lightbox-close {
  position: absolute;
  top: 25px;
  right: 35px;
  color: #fff;
  font-size: 2.5rem;
  cursor: pointer;
  font-family: sans-serif;
}
