/* Logo Quiz Game — Landing Page Styles */

:root {
  --bg: #09090b;
  --surface: #18181b;
  --border: #27272a;
  --accent: #6366f1;
  --amber: #f59e0b;
  --cta: #22c55e;
  --text: #fafafa;
  --muted: #a1a1aa;
  --radius-btn: 16px;
  --radius-card: 20px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ─── NAV ─────────────────────────────────────────────── */
nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: rgba(9,9,11,0.85);
  backdrop-filter: blur(12px);
  z-index: 100;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1.1rem;
}

.nav-brand img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
}

.nav-cta {
  background: var(--cta);
  color: #fff;
  border: none;
  padding: 0.5rem 1.2rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
}
.nav-cta:hover { opacity: 0.9; transform: translateY(-1px); }

/* ─── HERO ────────────────────────────────────────────── */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 5rem 1.5rem 4rem;
  gap: 1.5rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 50% 0%, rgba(99,102,241,0.18) 0%, transparent 70%);
  pointer-events: none;
}

.logo-mosaic {
  display: grid;
  grid-template-columns: repeat(3, 80px);
  grid-template-rows: repeat(3, 80px);
  gap: 10px;
  margin-bottom: 1rem;
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.mosaic-item {
  background: #fff;
  border-radius: 18px;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

.mosaic-item:nth-child(odd) { transform: rotate(-5deg); }
.mosaic-item:nth-child(even) { transform: rotate(4deg); }
.mosaic-item:nth-child(5) { transform: rotate(-2deg) scale(1.08); }

.mosaic-item img {
  width: 56px;
  height: 56px;
  object-fit: contain;
}

.hero h1 {
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.hero h1 span {
  background: linear-gradient(135deg, var(--accent), var(--amber));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 420px;
}

.hero-stats {
  display: flex;
  gap: 2rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.hero-stats strong {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
}

.cta-play-store {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: linear-gradient(135deg, #16a34a, #22c55e);
  color: #fff;
  border: none;
  padding: 0.9rem 2rem;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 4px 24px rgba(34,197,94,0.35);
  transition: transform 0.15s, box-shadow 0.15s;
}

.cta-play-store:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 32px rgba(34,197,94,0.5);
}

.cta-play-store svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

/* ─── SECTION WRAPPER ─────────────────────────────────── */
section {
  padding: 5rem 1.5rem;
  max-width: 760px;
  margin: 0 auto;
}

.section-label {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.section-title {
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.section-sub {
  color: var(--muted);
  margin-bottom: 2.5rem;
}

/* ─── PUZZLE SECTION ──────────────────────────────────── */
#puzzle {
  max-width: 540px;
}

.puzzle-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 2rem;
  box-shadow: 0 0 0 1px rgba(99,102,241,0.1), 0 8px 40px rgba(0,0,0,0.4);
}

#puzzle-logo-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 1.5rem;
}

#puzzle-logo {
  width: 200px;
  height: 200px;
  object-fit: contain;
  background: #fff;
  border-radius: 24px;
  padding: 16px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.3);
}

#puzzle-area {}

#slots {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 1.5rem;
}

.slot {
  width: 44px;
  height: 48px;
  border-bottom: 3px solid var(--accent);
  border-radius: 4px 4px 0 0;
  font-size: 1.25rem;
  font-weight: 700;
  text-align: center;
  line-height: 48px;
  color: var(--text);
  text-transform: uppercase;
  transition: border-color 0.2s;
}

.slot.filled { color: var(--text); }
.slot.correct { border-color: var(--cta); color: var(--cta); }

@keyframes shake {
  0%,100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}
.slot.shake { animation: shake 0.5s ease; border-color: #ef4444; }

#tiles {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 1rem;
}

.tile {
  width: 42px;
  height: 46px;
  background: #fff;
  color: #18181b;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  transition: opacity 0.15s, transform 0.1s;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.tile:hover:not(.used) { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.35); }
.tile:active:not(.used) { transform: scale(0.94); }
.tile.used { opacity: 0.2; pointer-events: none; }

/* Solved banner */
#solved-banner {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
  background: rgba(34,197,94,0.1);
  border: 1px solid rgba(34,197,94,0.3);
  border-radius: 16px;
  margin-top: 1rem;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.solved-check { font-size: 2rem; }
.solved-msg { font-weight: 600; color: var(--cta); text-align: center; }

#next-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.6rem 1.4rem;
  border-radius: 50px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  transition: border-color 0.2s, background 0.2s;
}
#next-btn:hover { border-color: var(--accent); background: rgba(99,102,241,0.1); }

/* Finished screen */
#finished-screen {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  text-align: center;
  padding: 2rem;
  animation: fadeIn 0.4s ease;
}

.finished-trophy { font-size: 3.5rem; }
.finished-title { font-size: 1.5rem; font-weight: 700; }
.finished-sub { color: var(--muted); }

/* ─── SCREENSHOTS ─────────────────────────────────────── */
#screenshots { max-width: 100%; padding-left: 0; padding-right: 0; }
#screenshots > * { padding-left: 1.5rem; }

.screenshots-scroll {
  display: flex;
  gap: 1.2rem;
  overflow-x: auto;
  padding: 1rem 1.5rem 1.5rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.screenshots-scroll::-webkit-scrollbar { display: none; }

.screenshot-frame {
  flex-shrink: 0;
  scroll-snap-align: start;
  width: 200px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}

.screenshot-frame img {
  width: 100%;
  height: auto;
  display: block;
}

/* ─── FEATURES ────────────────────────────────────────── */
#features { max-width: 760px; }

.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.2rem;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 1.5rem;
}

.feature-icon {
  font-size: 1.8rem;
  margin-bottom: 0.75rem;
}

.feature-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
}

.feature-card p {
  font-size: 0.875rem;
  color: var(--muted);
}

/* ─── CTA BAND ────────────────────────────────────────── */
.cta-band {
  background: radial-gradient(ellipse at center, rgba(99,102,241,0.15) 0%, transparent 70%);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 5rem 1.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.cta-band h2 {
  font-size: clamp(1.6rem, 4vw, 2.5rem);
  font-weight: 700;
}

.cta-band p { color: var(--muted); max-width: 400px; }

/* ─── FOOTER ──────────────────────────────────────────── */
footer {
  padding: 2rem 1.5rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
}

footer a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}
footer a:hover { color: var(--text); }

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

/* ─── RESPONSIVE ──────────────────────────────────────── */
@media (max-width: 480px) {
  .features-grid { grid-template-columns: 1fr; }
  .logo-mosaic { grid-template-columns: repeat(3, 64px); grid-template-rows: repeat(3, 64px); gap: 8px; }
  .mosaic-item img { width: 44px; height: 44px; }
  .puzzle-card { padding: 1.25rem; }
  #puzzle-logo { width: 160px; height: 160px; }
  .slot { width: 38px; height: 42px; font-size: 1.1rem; line-height: 42px; }
  .tile { width: 38px; height: 40px; font-size: 0.9rem; }
  .hero-stats { gap: 1.2rem; }
  nav { padding: 0.8rem 1rem; }
}
