/* ============================================================
   1v1 lol — 1v1lol.io  |  kid-friendly gaming theme
   Primary gold: #E5B76F  |  Contrast: deep purple night sky
   ============================================================ */
:root {
  --gold: #E5B76F;
  --gold-dark: #c99447;
  --ink: #1E1440;
  --ink-2: #2B1B4E;
  --ink-3: #3A2668;
  --orange: #FF7A3C;
  --teal: #3EDBB6;
  --pink: #FF5C78;
  --paper: #FFF6E8;
  --radius: 20px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Fredoka', 'Baloo 2', 'Comic Sans MS', 'Segoe UI', Verdana, sans-serif;
  background: linear-gradient(180deg, #1E1440 0%, #2B1B4E 40%, #3A2668 100%);
  color: #F3E9D8;
  min-height: 100vh;
}
img { max-width: 100%; display: block; }
a { color: var(--gold); text-decoration: none; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* ---------------- header ---------------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(30, 20, 64, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 3px solid var(--gold);
  box-shadow: 0 4px 24px rgba(0,0,0,0.4);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.logo { display: flex; align-items: center; gap: 10px; font-size: 26px; font-weight: 800; color: #fff; }
.logo img { width: 42px; height: 42px; border-radius: 10px; box-shadow: 0 0 14px rgba(229,183,111,0.5); }
.logo em { font-style: normal; color: var(--gold); }
.main-nav { display: flex; gap: 6px; }
.main-nav a {
  padding: 9px 16px; border-radius: 12px; color: #EDDFC5; font-weight: 600; font-size: 15px;
  transition: all .18s ease;
}
.main-nav a:hover, .main-nav a.active { background: var(--gold); color: var(--ink); transform: translateY(-2px); }
#navToggle {
  display: none; background: var(--gold); color: var(--ink); border: none; font-size: 22px;
  width: 44px; height: 44px; border-radius: 12px; cursor: pointer; font-weight: 800;
}

/* ---------------- hero / game ---------------- */
.hero { padding: 34px 0 10px; text-align: center; }
.hero h1 {
  font-size: clamp(30px, 5vw, 52px); color: #fff; letter-spacing: 1px;
  text-shadow: 0 4px 0 rgba(0,0,0,0.35), 0 0 34px rgba(229,183,111,0.35);
}
.hero h1 span { color: var(--gold); }
.hero p.tag { color: #D9C6A6; margin-top: 8px; font-size: 17px; }
.badges { display: flex; gap: 10px; justify-content: center; margin-top: 14px; flex-wrap: wrap; }
.badge {
  background: var(--ink-2); border: 2px solid var(--gold); color: var(--gold);
  border-radius: 999px; padding: 6px 16px; font-size: 13px; font-weight: 700;
}
.game-shell {
  margin: 22px auto 0; max-width: 1000px; position: relative;
  border-radius: var(--radius); overflow: hidden;
  border: 4px solid var(--gold);
  box-shadow: 0 14px 50px rgba(0,0,0,0.55), 0 0 40px rgba(229,183,111,0.25);
  background: #0d0820;
  aspect-ratio: 16 / 9;
}
.game-shell iframe { width: 100%; height: 100%; border: 0; display: block; }
.game-cover {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 18px; text-align: center;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(229,183,111,0.18), transparent 55%),
    radial-gradient(ellipse at 70% 80%, rgba(255,122,60,0.16), transparent 55%),
    linear-gradient(160deg, #241850 0%, #120c2c 100%);
  cursor: pointer; z-index: 5;
}
.game-cover img.cover-icon { width: 110px; height: 110px; border-radius: 24px; box-shadow: 0 0 40px rgba(229,183,111,0.6); animation: float 3s ease-in-out infinite; }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
.game-cover h2 { color: #fff; font-size: clamp(22px, 3.5vw, 36px); }
.play-btn {
  font-family: inherit; font-size: 24px; font-weight: 800; letter-spacing: 2px; cursor: pointer;
  color: var(--ink); background: linear-gradient(180deg, #F7D492, var(--gold) 55%, var(--gold-dark));
  border: none; border-radius: 999px; padding: 18px 66px;
  box-shadow: 0 8px 0 #8a5f22, 0 14px 34px rgba(0,0,0,0.5), 0 0 30px rgba(229,183,111,0.5);
  transition: transform .12s ease, box-shadow .12s ease;
}
.play-btn:hover { transform: scale(1.07); }
.play-btn:active { transform: translateY(5px); box-shadow: 0 3px 0 #8a5f22, 0 8px 20px rgba(0,0,0,0.5); }
.cover-note { color: #C9B693; font-size: 13px; }
.under-game { display: flex; gap: 12px; justify-content: center; margin: 14px 0 6px; flex-wrap: wrap; }
.mini-btn {
  font-family: inherit; cursor: pointer; font-weight: 700; font-size: 14px;
  background: var(--ink-2); color: var(--gold); border: 2px solid var(--gold);
  padding: 9px 22px; border-radius: 999px; transition: all .15s ease;
}
.mini-btn:hover { background: var(--gold); color: var(--ink); }

/* ---------------- sections ---------------- */
section { padding: 54px 0; }
.sec-title { text-align: center; font-size: clamp(26px, 4vw, 38px); color: #fff; margin-bottom: 8px; }
.sec-title span { color: var(--gold); }
.sec-sub { text-align: center; color: #C9B693; margin-bottom: 34px; font-size: 16px; }

/* about / how to play */
.about-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 26px; align-items: start; }
.card {
  background: rgba(255,255,255,0.05); border: 2px solid rgba(229,183,111,0.35);
  border-radius: var(--radius); padding: 26px;
}
.card h3 { color: var(--gold); font-size: 22px; margin-bottom: 12px; }
.card p { color: #E8DCC4; line-height: 1.75; margin-bottom: 12px; font-size: 15.5px; }
.controls-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.controls-table td { padding: 8px 10px; border-bottom: 1px dashed rgba(229,183,111,0.25); color: #E8DCC4; }
.controls-table td.k { color: var(--ink); font-weight: 800; text-align: center; width: 130px; }
.controls-table td.k b { background: var(--gold); border-radius: 8px; padding: 3px 10px; display: inline-block; box-shadow: 0 2px 0 #8a5f22; }

/* highlights */
.high-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.high {
  text-align: center; padding: 28px 16px; border-radius: var(--radius);
  background: rgba(255,255,255,0.05); border: 2px solid rgba(229,183,111,0.3);
  transition: transform .18s ease, border-color .18s ease;
}
.high:hover { transform: translateY(-8px) rotate(-1deg); border-color: var(--gold); }
.high .emoji { font-size: 44px; display: block; margin-bottom: 10px; }
.high h3 { color: #fff; font-size: 17px; margin-bottom: 6px; }
.high p { color: #C9B693; font-size: 13.5px; line-height: 1.6; }

/* features / posts */
.posts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.post-card {
  background: rgba(255,255,255,0.05); border: 2px solid rgba(229,183,111,0.3);
  border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.post-card:hover { transform: translateY(-8px); border-color: var(--gold); box-shadow: 0 16px 34px rgba(0,0,0,0.45); }
.post-card img { aspect-ratio: 16/9; object-fit: cover; width: 100%; }
.post-body { padding: 18px 18px 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.post-body h3 { color: #fff; font-size: 18px; }
.post-body p { color: #C9B693; font-size: 14px; line-height: 1.65; flex: 1; }
.read-more {
  align-self: flex-start; font-weight: 800; font-size: 14px; color: var(--ink);
  background: linear-gradient(180deg, #F7D492, var(--gold));
  padding: 9px 20px; border-radius: 999px; box-shadow: 0 4px 0 #8a5f22;
  transition: transform .12s ease;
}
.read-more:hover { transform: scale(1.06); }

/* FAQ */
.faq-list { max-width: 780px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.faq-item { background: rgba(255,255,255,0.05); border: 2px solid rgba(229,183,111,0.3); border-radius: 16px; overflow: hidden; }
.faq-q {
  width: 100%; text-align: left; font-family: inherit; font-size: 16px; font-weight: 700;
  color: #fff; background: none; border: none; cursor: pointer;
  padding: 17px 52px 17px 20px; position: relative;
}
.faq-q::after {
  content: '+'; position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
  width: 28px; height: 28px; border-radius: 50%; background: var(--gold); color: var(--ink);
  font-weight: 800; display: flex; align-items: center; justify-content: center; transition: transform .2s ease;
}
.faq-item.open .faq-q::after { content: '−'; transform: translateY(-50%) rotate(180deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.faq-a p { padding: 0 20px 18px; color: #D9C6A6; line-height: 1.7; font-size: 14.5px; }
.faq-item.open { border-color: var(--gold); }

/* CTA */
.cta {
  text-align: center; border-radius: var(--radius); padding: 46px 24px;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(255,122,60,0.25), transparent 50%),
    radial-gradient(ellipse at 80% 100%, rgba(62,219,182,0.2), transparent 50%),
    linear-gradient(135deg, #3A2668, #241850);
  border: 3px solid var(--gold);
}
.cta h2 { color: #fff; font-size: clamp(24px, 4vw, 36px); margin-bottom: 10px; }
.cta p { color: #D9C6A6; margin-bottom: 22px; }

/* ---------------- article page ---------------- */
.article { max-width: 820px; margin: 0 auto; padding: 40px 20px 60px; }
.article .hero-img { border-radius: var(--radius); border: 3px solid var(--gold); box-shadow: 0 12px 40px rgba(0,0,0,0.5); }
.article h1 { color: #fff; font-size: clamp(26px, 4.5vw, 40px); margin: 26px 0 6px; }
.article .meta-line { color: #B59F7C; font-size: 13.5px; margin-bottom: 22px; }
.article h2 { color: var(--gold); font-size: 24px; margin: 28px 0 10px; }
.article p { color: #E8DCC4; line-height: 1.85; margin-bottom: 16px; font-size: 16px; }
.article ul { margin: 0 0 16px 22px; color: #E8DCC4; line-height: 1.85; }
.back-link { display: inline-block; margin-top: 10px; }

/* legal pages */
.page-content { max-width: 820px; margin: 0 auto; padding: 40px 20px 60px; }
.page-content h1 { color: #fff; font-size: 34px; margin-bottom: 20px; }
.page-content h2 { color: var(--gold); font-size: 22px; margin: 24px 0 8px; }
.page-content p, .page-content li { color: #E8DCC4; line-height: 1.8; margin-bottom: 12px; font-size: 15.5px; }
.page-content ul { margin-left: 22px; }

/* ---------------- footer ---------------- */
.site-footer {
  margin-top: 40px; background: #16102F; border-top: 3px solid var(--gold);
  padding: 46px 0 0;
}
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px; padding-bottom: 34px; }
.f-brand .logo { font-size: 22px; margin-bottom: 12px; }
.f-brand p { color: #B59F7C; font-size: 14px; line-height: 1.7; }
.site-footer h4 { color: #fff; font-size: 16px; margin-bottom: 14px; }
.site-footer ul { list-style: none; }
.site-footer ul li { margin-bottom: 9px; }
.site-footer ul a { color: #C9B693; font-size: 14.5px; transition: color .15s ease, padding-left .15s ease; }
.site-footer ul a:hover { color: var(--gold); padding-left: 5px; }
.footer-bottom {
  border-top: 1px solid rgba(229,183,111,0.25); padding: 18px 0; text-align: center;
  color: #B59F7C; font-size: 14px;
}
.footer-bottom a { font-weight: 700; }

/* ---------------- scroll to top ---------------- */
.scroll-top {
  position: fixed;
  right: clamp(16px, 3vw, 30px);
  bottom: clamp(16px, 3vw, 30px);
  z-index: 800;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 2px solid var(--gold);
  border-radius: 14px;
  background: linear-gradient(145deg, #34206a, #1a1237);
  color: var(--gold);
  box-shadow: 0 8px 24px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.14);
  font: 800 21px/1 inherit;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px) scale(.9);
  transition: opacity .2s ease, transform .2s ease, visibility .2s ease, background .2s ease;
}
.scroll-top::after {
  content: '';
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(229,183,111,.25);
  border-radius: 9px;
}
.scroll-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.scroll-top:hover { background: linear-gradient(145deg, #4a2f91, #24194a); transform: translateY(-3px); }
.scroll-top:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }

/* ---------------- fullscreen game mode ---------------- */
body.game-fs { overflow: hidden; }
.game-shell.fs {
  position: fixed !important; inset: 0 !important; z-index: 999;
  max-width: none; border-radius: 0; border: none; aspect-ratio: auto;
  margin: 0; height: 100vh;
}
#exitFsBtn {
  display: none; position: absolute; z-index: 50; right: 14px; bottom: 14px;
  font-family: inherit; font-weight: 800; font-size: 13px; cursor: pointer;
  background: rgba(20,12,40,0.8); color: var(--gold); border: 2px solid var(--gold);
  border-radius: 999px; padding: 9px 18px;
}
.game-shell.fs #exitFsBtn, .game-shell:fullscreen #exitFsBtn { display: block; }

/* ---------------- responsive ---------------- */
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; }
  .high-grid { grid-template-columns: repeat(2, 1fr); }
  .posts-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  #navToggle { display: block; }
  .main-nav {
    position: absolute; top: 72px; left: 0; right: 0; flex-direction: column; gap: 0;
    background: rgba(24,16,50,0.98); border-bottom: 3px solid var(--gold);
    max-height: 0; overflow: hidden; transition: max-height .3s ease;
  }
  .main-nav.open { max-height: 340px; }
  .main-nav a { padding: 15px 24px; border-radius: 0; font-size: 16px; }
  .posts-grid { grid-template-columns: 1fr; }
  .game-shell { aspect-ratio: auto; height: 72vh; }
}
@media (max-width: 520px) {
  .high-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .play-btn { padding: 15px 44px; font-size: 20px; }
}
