/* Shared visual system for the three Purple Eye games. Neutral surfaces lead,
   purple carries navigation and actions, and each game gets a small color cue. */
:root {
  --bg: #17151b;
  --panel: #211e27;
  --border: #473e50;
  --text: #f2eff5;
  --muted: #b7adbf;
  --accent-purple: #8953e5;
  --accent-purple-dark: #cbb2f5;
  --accent-purple-deep: #6333b7;
  --accent-purple-tint: #30263c;
  --accent: #8953e5;
  --accent-text: #cbb2f5;
  --accent-dark: #cbb2f5;
  --accent-deep: #6333b7;
  --accent-tint: #30263c;
  --tint: #30263c;
  --accent-sky: #b88aef;
  --glow-1: rgba(137, 83, 229, .16);
  --glow-2: rgba(137, 83, 229, .08);
  --scroll-thumb: #635274;
  --scroll-thumb-hover: #9274b0;
  color-scheme: dark;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
body[data-game="dota"] { --game: #e46c70; --game-rgb: 228 108 112; }
body[data-game="mlbb"] { --game: #f3cc64; --game-rgb: 243 204 100; }
body[data-game="lol"] { --game: #79c4ff; --game-rgb: 121 196 255; --on-accent: #fff; }

html { background: var(--bg); }
body {
  color: var(--text);
  background: radial-gradient(circle at 92% 5%, rgb(var(--game-rgb) / .10), transparent 24%),
    radial-gradient(circle at 7% 0%, rgba(137, 83, 229, .16), transparent 38%), var(--bg);
  background-attachment: fixed;
  line-height: 1.45;
}
body[data-game="lol"] { min-height: calc(100vh / 1.1); overflow-x: hidden; }
body[data-game="lol"] main { width: 100%; max-width: 1180px; }
body[data-game="dota"] .homeSection:has(.howItWorksSection:not(.hidden)) { max-width: 1180px; }
body[data-game="lol"] .prose { max-width: 760px; }

#siteTitle, .topNavTitle, .siteHeader .brand {
  flex: none;
  margin: 0;
  border: 0;
  padding: 0;
  background: linear-gradient(95deg, var(--accent-purple-dark) 0% 78%, var(--game) 100%);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  font-size: 1.4rem;
  font-weight: 800;
  line-height: 1.15;
  white-space: nowrap;
}
.topNavTitle:hover, .siteHeader .brand:hover { background: linear-gradient(95deg, var(--accent-purple-dark) 0% 78%, var(--game) 100%); background-clip: text; -webkit-background-clip: text; color: transparent; opacity: .85; }
.topNavBrand, .siteHeader .brandRow { display: flex; flex-wrap: nowrap; align-items: center; gap: 10px; min-width: 0; }
.gameTag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  min-width: 70px;
  padding: 3px 9px;
  border: 1px solid rgb(var(--game-rgb) / .55);
  border-radius: 7px;
  background: rgb(var(--game-rgb) / .12);
  color: var(--game);
  font-size: .73rem;
  font-weight: 700;
  white-space: nowrap;
}

@media (min-width: 701px) {
  #drawer, #drawerOverlay, #menuBtn, #mobileHeader { display: none !important; }
  .topNav, .siteHeader {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 12px;
    width: 100%;
    max-width: 1180px;
    min-height: 64px;
    margin: 0 auto 18px;
    padding: 10px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--panel);
  }
  .topNavCenter, .siteHeader nav {
    grid-column: 1 / -1;
    grid-row: 2;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    align-items: center;
    justify-items: stretch;
    gap: 3px;
    width: 100%;
  }
  .topNavRight, #accountArea { grid-column: 2; grid-row: 1; justify-self: end; margin: 0; }
  .topNavBtn, .siteHeader nav button, #accountArea button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 7px 10px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--muted);
    font-size: .82rem;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    white-space: nowrap;
  }
  .topNavBtn:hover, .siteHeader nav button:hover, #accountArea button:hover { background: var(--accent-purple-tint); color: var(--accent-purple-dark); }
  .topNavBtn--active, .topNavBtn--active:hover, .siteHeader nav button.active, .siteHeader nav button.active:hover { background: var(--accent-purple); color: #fff; }
  .topNavRight .topNavBtn, #accountArea button { border: 1px solid var(--accent-purple); color: var(--accent-purple-dark); }
  .topNavRight .topNavBtn:hover, #accountArea button:hover { background: var(--accent-purple); color: #fff; }
}
@media (min-width: 701px) { .topNav, .siteHeader { row-gap: 5px; } }
@media (max-width: 700px) {
  #mobileHeader { display: flex; align-items: center; gap: 10px; }
  #mobileHeader #siteTitle { font-size: 1.4rem; }
  body[data-game="lol"] .siteHeader { display: none; }
  body[data-game="lol"] #mobileHeader { min-height: 42px; margin: 0 55px 16px 0; }
  body[data-game="lol"] #mobileHeader .brand { font-size: 1.4rem; }
  body[data-game="lol"] .menuBtn { position: fixed; top: 16px; right: 16px; z-index: 100; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; width: 42px; height: 42px; padding: 0; border: 1px solid var(--accent-purple); border-radius: 4px; background: var(--panel); }
  body[data-game="lol"] .menuBtn span { width: 20px; height: 2px; background: var(--accent-purple); }
  body[data-game="lol"] .drawerOverlay { position: fixed; inset: 0; z-index: 150; background: rgba(0, 0, 0, .4); }
  body[data-game="lol"] .drawer { position: fixed; top: 0; right: 0; z-index: 200; display: flex; flex-direction: column; gap: 9px; width: min(340px, 92vw); height: 100%; padding: 56px 20px 20px; overflow-y: auto; border-left: 3px solid rgba(255, 255, 255, .3); background: linear-gradient(165deg, var(--accent-purple-deep), var(--accent-purple)); box-shadow: -6px 0 20px rgba(0,0,0,.18); transform: translateX(100%); transition: transform .25s ease; }
  body[data-game="lol"] .drawer--open { transform: translateX(0); }
  body[data-game="lol"] .drawerClose { position: absolute; top: 10px; right: 12px; padding: 4px 8px; border: 0; background: transparent; color: #fff; font-size: 1.6rem; line-height: 1; }
  body[data-game="lol"] .drawer nav { display: grid; gap: 7px; }
  body[data-game="lol"] .drawer nav button, body[data-game="lol"] #mobileAccountBtn, body[data-game="lol"] #mobileHowBtn { width: 100%; min-height: 40px; border: 1px solid rgba(255,255,255,.35); background: rgba(0,0,0,.12); color: #fff; text-align: left; }
  body[data-game="lol"] .drawer nav button.active { background: rgba(255,255,255,.22); }
  .gameTag { min-width: 59px; height: 27px; font-size: .67rem; }
  body { background-attachment: scroll; }
}

.profileGameLinks { max-width: 780px; margin: 22px auto; padding: 17px; border: 1px solid var(--border); border-radius: 10px; background: var(--panel); }
.profileGameLinks h2, .profileGameLinks h3 { display: block !important; margin: 0 0 13px; color: var(--text); font-size: 1rem; }
.profileGameGrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.profileGameGrid a { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; color: var(--text); text-align: center; text-decoration: none; font-weight: 650; font-size: .85rem; }
.profileGameGrid a:hover, .profileGameGrid a[aria-current="page"] { border-color: var(--accent-purple); background: var(--accent-purple-tint); }
.profileGameDot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--link-game); }
.profileGameGrid a:nth-child(1) { --link-game: #e46c70; }
.profileGameGrid a:nth-child(2) { --link-game: #e9c45f; }
.profileGameGrid a:nth-child(3) { --link-game: #79c4ff; }
@media (max-width: 600px) { .profileGameGrid { grid-template-columns: 1fr; } }

.siteLanding { max-width: 850px; margin: clamp(24px, 8vh, 80px) auto 0; padding: clamp(20px, 4vw, 36px); border: 1px solid var(--border); border-radius: 12px; background: var(--panel); text-align: center; }
.siteLanding h1, .siteLanding h2 { display: block; margin: 0 0 18px; color: var(--text); background: none; font-size: clamp(1.45rem, 3vw, 2rem); font-weight: 800; }
.siteLanding p { max-width: 660px; margin: 0 auto 24px; color: var(--muted); line-height: 1.55; }
.landingGames { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0 auto 24px; }
.landingGames a { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 53px; padding: 10px; border: 1px solid var(--border); border-radius: 8px; color: var(--text); text-decoration: none; font-weight: 700; }
.landingGames a:hover, .landingGames a[aria-current="page"] { border-color: var(--accent-purple); background: var(--accent-purple-tint); }
.landingGames a:nth-child(1) { --link-game: #e46c70; }
.landingGames a:nth-child(2) { --link-game: #e9c45f; }
.landingGames a:nth-child(3) { --link-game: #79c4ff; }
.landingHowBtn { min-height: 42px; padding: 9px 22px; border: 1px solid var(--accent-purple); border-radius: 7px; background: var(--accent-purple); color: #fff; }
@media (max-width: 600px) { .landingGames { grid-template-columns: 1fr; } .siteLanding { margin-top: 18px; } }
.analyzeBtnWrap:has(.detailedReviewChoice) { align-items: center; gap: 18px; }
.detailedReviewChoice { flex: none; white-space: nowrap; }
@media (max-width: 600px) {
  .analyzeBtnWrap:has(.detailedReviewChoice) { flex-direction: column; align-items: stretch; gap: 12px; }
  .analyzeBtnWrap:has(.detailedReviewChoice) #analyzeBtn { width: 100%; white-space: nowrap; }
}

body[data-game="lol"] .view > h1 { font-size: 1.5rem; }
body[data-game="lol"] .card, body[data-game="lol"] .teamGrid > div { border-radius: 8px; }
body[data-game="lol"] #profileLogoutBtn { margin-top: 10px; }
.metaTableWrap { max-width: 100%; overflow-x: auto; border: 1px solid var(--border); border-radius: 8px; background: var(--panel); }
.metaTable { width: 100%; border-collapse: collapse; text-align: left; }
.metaTable th, .metaTable td { padding: 9px 13px; border-bottom: 1px solid var(--border); }
.metaTable tr:last-child td { border-bottom: 0; }
.metaTable th { color: var(--muted); font-size: .82rem; }
.metaTable th:not(:first-child), .metaTable td:not(:first-child) { text-align: right; }

@media (prefers-color-scheme: light) {
  :root {
    --bg: #faf9fc;
    --panel: #fff;
    --border: #ddd5e5;
    --text: #24202b;
    --muted: #655d70;
    --accent-purple: #7541cc;
    --accent-purple-dark: #5e2cab;
    --accent-purple-deep: #5e2cab;
    --accent-purple-tint: #f2ecfa;
    --accent: #7541cc;
    --accent-text: #5e2cab;
    --accent-dark: #5e2cab;
    --accent-deep: #5e2cab;
    --accent-tint: #f2ecfa;
    --tint: #f2ecfa;
    --glow-1: rgba(117, 65, 204, .08);
    --glow-2: rgba(117, 65, 204, .04);
    --scroll-thumb: #a994c1;
    --scroll-thumb-hover: #856aab;
    color-scheme: light;
  }
  body[data-game="dota"] { --game: #bb3949; --game-rgb: 187 57 73; }
  body[data-game="mlbb"] { --game: #946500; --game-rgb: 148 101 0; }
  body[data-game="lol"] { --game: #166cad; --game-rgb: 22 108 173; }
  body { background: radial-gradient(circle at 92% 5%, rgb(var(--game-rgb) / .07), transparent 24%), radial-gradient(circle at 7% 0%, rgba(117, 65, 204, .07), transparent 38%), var(--bg); }
}
