/*
Theme Name: FunSpin
Theme URI: https://funspin.it.com/
Author: FunSpin
Author URI: https://funspin.it.com/
Description: A modern entertainment-first social games theme for FunSpin.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
Text Domain: funspin
*/

:root {
  --bg: #07101b;
  --bg-soft: #0c1b28;
  --panel: rgba(9, 23, 35, 0.82);
  --panel-strong: rgba(7, 16, 27, 0.94);
  --line: rgba(255, 255, 255, 0.14);
  --text: #f8fbff;
  --muted: #aab8c7;
  --gold: #f7c84a;
  --aqua: #4ed6c4;
  --ember: #fb8b3b;
  --green: #77c95c;
  --shadow: 0 22px 80px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 12%, rgba(78, 214, 196, 0.14), transparent 32rem),
    radial-gradient(circle at 86% 18%, rgba(247, 200, 74, 0.13), transparent 28rem),
    linear-gradient(180deg, #07101b 0%, #0b1722 52%, #07101b 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

.site-shell {
  min-height: 100vh;
  overflow: hidden;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(7, 16, 27, 0.76);
  backdrop-filter: blur(18px);
}

.nav-wrap,
.section-inner,
.footer-inner,
.game-frame-shell,
.legal-page {
  width: min(1160px, calc(100% - 36px));
  margin: 0 auto;
}

.nav-wrap {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 900;
  letter-spacing: 0;
  font-size: 1.08rem;
}

.brand img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  box-shadow: 0 10px 28px rgba(247, 200, 74, 0.18);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--muted);
  font-size: 0.95rem;
}

.nav-links a:hover,
.footer-links a:hover {
  color: var(--text);
}

.age-pill {
  min-width: 48px;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(247, 200, 74, 0.45);
  border-radius: 999px;
  color: var(--gold);
  font-weight: 800;
}

.hero {
  position: relative;
  min-height: clamp(620px, 86vh, 820px);
  display: flex;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -28px;
  z-index: -2;
  background-image: var(--hero-image);
  background-size: cover;
  background-position: center;
  filter: blur(12px) saturate(1.08);
  transform: scale(1.05);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(7, 16, 27, 0.94) 0%, rgba(7, 16, 27, 0.62) 48%, rgba(7, 16, 27, 0.32) 100%),
    linear-gradient(180deg, rgba(7, 16, 27, 0.2), #07101b 100%);
}

.hero-content {
  width: min(760px, calc(100% - 36px));
  margin: 0 auto;
  padding: 88px 0 126px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  color: var(--gold);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.eyebrow::before {
  content: "";
  width: 34px;
  height: 2px;
  border-radius: 999px;
  background: var(--gold);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 22px;
  max-width: 720px;
  font-size: clamp(3rem, 7vw, 6.6rem);
  line-height: 0.94;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 620px;
  margin-bottom: 30px;
  color: #d7e3ef;
  font-size: clamp(1.05rem, 1.8vw, 1.25rem);
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.btn {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: 999px;
  padding: 0 22px;
  color: #07101b;
  background: linear-gradient(135deg, var(--gold), #ffe38a);
  box-shadow: 0 12px 30px rgba(247, 200, 74, 0.26);
  font-weight: 900;
  white-space: nowrap;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(247, 200, 74, 0.34);
}

.btn.secondary {
  color: var(--text);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: none;
}

.section {
  padding: 82px 0;
}

.section-heading {
  max-width: 720px;
  margin-bottom: 34px;
}

.section-heading h2 {
  margin-bottom: 12px;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.04;
  letter-spacing: 0;
}

.section-heading p,
.legal-page p {
  color: var(--muted);
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.game-card {
  position: relative;
  min-height: 390px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.game-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 360ms ease;
}

.game-card:hover img {
  transform: scale(1.045);
}

.game-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(7, 16, 27, 0.03) 0%, rgba(7, 16, 27, 0.26) 45%, rgba(7, 16, 27, 0.88) 100%),
    linear-gradient(90deg, rgba(7, 16, 27, 0.3), transparent 60%);
}

.game-card-content {
  position: absolute;
  inset: auto 22px 22px 22px;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}

.game-title {
  margin-bottom: 6px;
  font-size: clamp(1.55rem, 2.6vw, 2.4rem);
  line-height: 1;
}

.game-meta {
  margin: 0;
  color: #d5e2ef;
  font-size: 0.98rem;
}

.game-card .btn {
  position: relative;
  z-index: 3;
  flex: 0 0 auto;
}

.info-band {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.035);
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.info-item {
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.info-item h3 {
  margin-bottom: 8px;
  font-size: 1.05rem;
}

.info-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.game-page-main {
  padding: 34px 0 72px;
}

.game-frame-shell {
  display: grid;
  gap: 18px;
}

.game-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.game-topbar h1 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 3.5rem);
}

.iframe-wrap {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: #02060a;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.iframe-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.legal-page {
  padding: 58px 0 86px;
}

.legal-page h1 {
  font-size: clamp(2.2rem, 5vw, 4rem);
}

.legal-page h2 {
  margin-top: 34px;
}

.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  background: #050b12;
}

.footer-inner {
  padding: 46px 0;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 28px;
}

.footer-inner h2 {
  margin-bottom: 12px;
  font-size: 1.35rem;
}

.footer-inner p {
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 0.95rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  justify-content: flex-end;
  align-content: flex-start;
  color: var(--muted);
  font-size: 0.94rem;
}

.support-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.support-links a {
  color: var(--aqua);
  font-weight: 800;
}

@media (max-width: 780px) {
  .nav-wrap {
    min-height: 66px;
  }

  .nav-links {
    gap: 10px;
    font-size: 0.86rem;
  }

  .nav-links a:not(.age-pill) {
    display: none;
  }

  .hero {
    min-height: 620px;
  }

  .games-grid,
  .info-grid,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .game-card {
    min-height: 330px;
  }

  .game-card-content {
    align-items: flex-start;
    flex-direction: column;
  }

  .footer-links {
    justify-content: flex-start;
  }

  .game-topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .iframe-wrap {
    aspect-ratio: 10 / 14;
  }
}
