/* ============================================================
   STICKSQUARE.COM — Main Stylesheet
   Dark arcade / retro-neon aesthetic
   ============================================================ */

/* ---- Custom Properties ---- */
:root {
  --bg:           #08080f;
  --bg-card:      #0f0f1a;
  --bg-card-hover:#141425;
  --bg-section:   #0b0b16;
  --cyan:         #00f5ff;
  --cyan-dim:     #00c8d4;
  --magenta:      #ff006e;
  --magenta-dim:  #cc0058;
  --yellow:       #ffe600;
  --green:        #00ff88;
  --text:         #e8e8f0;
  --text-sub:     #8888aa;
  --text-muted:   #444466;
  --border:       #1e1e35;
  --border-bright:#2a2a50;
  --font-pixel:   'Press Start 2P', monospace;
  --font-body:    'Inter', system-ui, sans-serif;
  --radius:       12px;
  --radius-sm:    8px;
  --transition:   0.22s cubic-bezier(0.4, 0, 0.2, 1);
  --glow-cyan:    0 0 20px rgba(0, 245, 255, 0.35), 0 0 60px rgba(0, 245, 255, 0.12);
  --glow-magenta: 0 0 20px rgba(255, 0, 110, 0.35), 0 0 60px rgba(255, 0, 110, 0.12);
}

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { cursor: pointer; font-family: inherit; }

/* ---- Animated Grid Background ---- */
.bg-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(rgba(0, 245, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 245, 255, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  animation: grid-drift 30s linear infinite;
  pointer-events: none;
}

@keyframes grid-drift {
  0%   { background-position: 0 0; }
  100% { background-position: 48px 48px; }
}

/* ---- Scanlines ---- */
.scanlines {
  position: fixed;
  inset: 0;
  z-index: 1;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 3px,
    rgba(0,0,0,0.12) 3px,
    rgba(0,0,0,0.12) 4px
  );
  pointer-events: none;
  opacity: 0.4;
}

/* ---- Floating Particles ---- */
.particles {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.particle {
  position: absolute;
  border-radius: 50%;
  animation: float-up linear infinite;
  opacity: 0;
}

@keyframes float-up {
  0%   { transform: translateY(0) scale(1); opacity: 0; }
  10%  { opacity: 0.8; }
  90%  { opacity: 0.4; }
  100% { transform: translateY(-100vh) scale(0.3); opacity: 0; }
}

/* ---- Layout ---- */
.section-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 2;
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(8, 8, 15, 0.85);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

/* Logo */
.logo-link {
  display: flex;
  align-items: center;
  gap: 12px;
  transition: opacity var(--transition);
}
.logo-link:hover { opacity: 0.85; }

.logo-img {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  object-fit: cover;
}

.logo-text {
  font-family: var(--font-pixel);
  font-size: 0.62rem;
  line-height: 1;
  letter-spacing: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.logo-stick { color: var(--cyan); }
.logo-sq    { color: var(--magenta); }

/* Nav */
.header-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-sub);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: color var(--transition);
  position: relative;
  padding-bottom: 2px;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0; right: 0;
  height: 1px;
  background: var(--cyan);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
}

.nav-link:hover { color: var(--cyan); }
.nav-link:hover::after { transform: scaleX(1); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  z-index: 2;
  padding: 160px 24px 80px;
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
}

.hero-inner { max-width: 720px; margin: 0 auto; }

.challenge-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 245, 255, 0.08);
  border: 1px solid rgba(0, 245, 255, 0.25);
  border-radius: 100px;
  padding: 6px 18px;
  font-family: var(--font-pixel);
  font-size: 0.5rem;
  color: var(--cyan);
  letter-spacing: 0.1em;
  margin-bottom: 32px;
  animation: pulse-border 3s ease-in-out infinite;
}

@keyframes pulse-border {
  0%, 100% { border-color: rgba(0, 245, 255, 0.25); }
  50%       { border-color: rgba(0, 245, 255, 0.55); box-shadow: 0 0 16px rgba(0,245,255,0.15); }
}

.badge-icon { font-size: 0.9rem; }

.hero-title {
  font-family: var(--font-pixel);
  font-size: clamp(1.4rem, 5vw, 2.6rem);
  line-height: 1.6;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.title-line-1 { color: var(--text); }

.title-line-2 {
  color: var(--cyan);
  text-shadow: 0 0 30px rgba(0, 245, 255, 0.5);
  min-height: 1.6em;
}

.hero-sub {
  font-size: 1.1rem;
  color: var(--text-sub);
  margin-bottom: 40px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

/* CTA Buttons */
.hero-cta-group {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 64px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  transition: all var(--transition);
  border: none;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.06);
  opacity: 0;
  transition: opacity var(--transition);
}
.btn:hover::before { opacity: 1; }

.btn-primary {
  background: linear-gradient(135deg, var(--cyan) 0%, var(--cyan-dim) 100%);
  color: #000;
  box-shadow: 0 0 20px rgba(0, 245, 255, 0.4);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 35px rgba(0, 245, 255, 0.6);
}
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-bright);
}
.btn-ghost:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  transform: translateY(-2px);
}

.btn-share {
  background: linear-gradient(135deg, var(--magenta) 0%, var(--magenta-dim) 100%);
  color: #fff;
  box-shadow: 0 0 20px rgba(255, 0, 110, 0.4);
  padding: 12px 28px;
  font-size: 0.9rem;
}
.btn-share:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 35px rgba(255, 0, 110, 0.6);
}

.btn-icon { font-size: 0.8rem; }

/* Progress Bar */
.progress-section {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
  max-width: 600px;
  margin: 0 auto;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 0.85rem;
}

.progress-count { color: var(--text-sub); }
.progress-num { color: var(--cyan); font-weight: 700; font-size: 1.05rem; }
.progress-pct { color: var(--text-muted); font-size: 0.78rem; }

.progress-track {
  height: 8px;
  background: var(--border);
  border-radius: 100px;
  overflow: hidden;
  margin-bottom: 10px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--cyan) 0%, var(--magenta) 100%);
  border-radius: 100px;
  position: relative;
  transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 8px;
}

.progress-glow {
  position: absolute;
  right: 0; top: -4px;
  width: 16px; height: 16px;
  background: var(--magenta);
  border-radius: 50%;
  box-shadow: 0 0 12px 4px rgba(255,0,110,0.7);
  animation: glow-pulse 1.5s ease-in-out infinite;
}

@keyframes glow-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.6; transform: scale(0.8); }
}

.progress-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
}

/* ============================================================
   GAMES SECTION
   ============================================================ */
.games-section {
  position: relative;
  z-index: 2;
  padding: 80px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-title {
  font-family: var(--font-pixel);
  font-size: clamp(1rem, 3vw, 1.6rem);
  color: var(--text);
  margin-bottom: 12px;
  line-height: 1.4;
}

.section-sub {
  color: var(--text-sub);
  font-size: 0.95rem;
}

/* Games Grid */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  position: relative;
}

/* Game Card base */
.game-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform var(--transition);
}

.game-card-link {
  display: block;
  height: 100%;
}

.game-card-inner {
  position: relative;
  z-index: 2;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  height: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  transition: all var(--transition);
}

/* LIVE cards */
.game-card.live .game-card-inner {
  border-color: var(--border-bright);
}

.game-card.live:hover {
  transform: translateY(-4px);
}

.game-card.live:hover .game-card-inner {
  background: var(--bg-card-hover);
  border-color: rgba(0, 245, 255, 0.35);
}

.game-card.live:hover .game-play-hint {
  opacity: 1;
  transform: translateX(0);
}

/* UPCOMING card */
.game-card.upcoming .game-card-inner {
  border-color: rgba(255, 230, 0, 0.2);
  background: rgba(255, 230, 0, 0.03);
}

/* LOCKED cards */
.game-card.locked .game-card-inner {
  opacity: 0.4;
  border-style: dashed;
}

/* Card Glow overlays */
.card-glow {
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  opacity: 0;
  transition: opacity 0.35s;
  pointer-events: none;
  z-index: 1;
}

.card-glow-cyan {
  box-shadow: inset 0 0 40px rgba(0, 245, 255, 0.08), 0 0 40px rgba(0, 245, 255, 0.1);
}
.card-glow-magenta {
  box-shadow: inset 0 0 40px rgba(255, 0, 110, 0.08), 0 0 40px rgba(255, 0, 110, 0.1);
}

.game-card.live:hover .card-glow-cyan,
.game-card.live:hover .card-glow-magenta {
  opacity: 1;
}

/* Card elements */
.game-number {
  font-family: var(--font-pixel);
  font-size: 0.55rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
}

.game-card.live .game-number { color: var(--cyan); }
.game-card.upcoming .game-number { color: var(--yellow); }

.game-emoji {
  font-size: 2.4rem;
  line-height: 1;
  margin-bottom: 2px;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.game-card.live:hover .game-emoji {
  transform: scale(1.15) rotate(-5deg);
}

.game-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}

.game-desc {
  font-size: 0.85rem;
  color: var(--text-sub);
  line-height: 1.5;
}

.game-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  padding-top: 8px;
}

.tag {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 4px;
}

.tag-genre {
  background: rgba(255,255,255,0.06);
  color: var(--text-sub);
  border: 1px solid var(--border);
}

.tag-live {
  background: rgba(0, 255, 136, 0.1);
  color: var(--green);
  border: 1px solid rgba(0, 255, 136, 0.25);
  animation: live-blink 2s ease-in-out infinite;
}

@keyframes live-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.65; }
}

.tag-upcoming {
  background: rgba(255, 230, 0, 0.1);
  color: var(--yellow);
  border: 1px solid rgba(255, 230, 0, 0.25);
}

/* Play hint */
.game-play-hint {
  font-family: var(--font-pixel);
  font-size: 0.55rem;
  color: var(--cyan);
  letter-spacing: 0.12em;
  opacity: 0;
  transform: translateX(-8px);
  transition: all var(--transition);
  margin-top: 4px;
}

/* More hint */
.more-hint {
  grid-column: 1 / -1;
  text-align: center;
  padding: 32px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.more-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 12px;
}

.more-dots span {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
  animation: dot-pulse 1.4s ease-in-out infinite;
}
.more-dots span:nth-child(2) { animation-delay: 0.2s; }
.more-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes dot-pulse {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50%       { opacity: 1; transform: scale(1.4); }
}

/* ============================================================
   CHALLENGE SECTION
   ============================================================ */
.challenge-section {
  position: relative;
  z-index: 2;
  padding: 80px 0;
  background: linear-gradient(180deg, transparent 0%, rgba(0,245,255,0.03) 50%, transparent 100%);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.challenge-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.challenge-text p {
  color: var(--text-sub);
  margin-bottom: 20px;
  font-size: 0.97rem;
  line-height: 1.7;
}

.challenge-rules {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 28px;
}

.rule-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
  color: var(--text-sub);
}

.rule-icon { font-size: 1.1rem; width: 28px; flex-shrink: 0; text-align: center; }

/* Stats */
.challenge-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
  text-align: center;
  transition: all var(--transition);
}

.stat-card:hover {
  border-color: var(--border-bright);
  transform: translateY(-2px);
}

.stat-num {
  font-family: var(--font-pixel);
  font-size: clamp(1.5rem, 4vw, 2.4rem);
  color: var(--cyan);
  line-height: 1;
  margin-bottom: 8px;
  text-shadow: 0 0 20px rgba(0,245,255,0.4);
}

#stat-installs .stat-num,
#stat-accounts .stat-num {
  color: var(--magenta);
  text-shadow: 0 0 20px rgba(255,0,110,0.4);
}

.stat-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
}

/* ============================================================
   ABOUT SECTION
   ============================================================ */
.about-section {
  position: relative;
  z-index: 2;
  padding: 80px 0;
}

.about-inner {
  max-width: 700px;
  text-align: center;
}

.about-body {
  color: var(--text-sub);
  font-size: 0.97rem;
  line-height: 1.75;
  margin-bottom: 20px;
}

.share-cta {
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.share-text {
  color: var(--text-sub);
  font-size: 0.9rem;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  position: relative;
  z-index: 2;
  border-top: 1px solid var(--border);
  padding: 40px 24px;
  text-align: center;
}

.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 8px; }

.footer-logo {
  font-family: var(--font-pixel);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.footer-tagline {
  font-size: 0.8rem;
  color: var(--text-sub);
}

.footer-copy {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .header-nav { gap: 16px; }
  .nav-link { font-size: 0.75rem; }

  .hero { padding: 120px 20px 60px; }
  .hero-title { font-size: clamp(1.1rem, 6vw, 1.8rem); }

  .challenge-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .games-grid {
    grid-template-columns: 1fr;
  }

  .challenge-stats {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 480px) {
  .logo-text { display: none; }
  .header-nav { gap: 12px; }
  .hero-cta-group { flex-direction: column; align-items: center; }
  .btn { width: 100%; max-width: 260px; justify-content: center; }
  .challenge-stats { grid-template-columns: 1fr 1fr; gap: 12px; }
  .stat-num { font-size: 1.5rem; }
}

/* ============================================================
   ANIMATIONS & UTILITIES
   ============================================================ */
@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fade-in { animation: fade-in-up 0.6s ease both; }
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }

/* Focus styles for accessibility */
:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Selection color */
::selection {
  background: rgba(0, 245, 255, 0.25);
  color: var(--cyan);
}
