/* Full pages share the game's dark surfaces and green accents. */
.detail-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 24px 16px 18px;
  border-bottom: 1px solid rgba(98, 165, 92, .3);
}
.detail-header .nav-text { font-size: 48px; }
.detail-header a { color: inherit; text-decoration: none; }
.detail-header nav { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.detail-header nav a { padding: 8px 18px; border-radius: 8px; font-size: 20px; }
.detail-header nav a:hover, .detail-header nav a[aria-current] { background: rgba(98, 165, 92, .16); color: #8ec987; }
.detail-page .page-container { width: 48%; max-width: 820px; margin: 40px auto 64px; overflow: visible; }
.page-card {
  width: 100%;
  max-width: none;
  padding: 32px;
  border: none;
  border-radius: 0;
  background: transparent;
  color: white;
  text-align: center;
  box-shadow: none;
}
.page-card .modal-title { font-size: 32px; }
.page-card .modal-back-button { display: inline-block; text-decoration: none; align-self: center; }
.page-card.auth-modal { padding: 32px; }
.page-card .auth-input { width: 100%; }
.page-card .auth-account-email { overflow-wrap: anywhere; }
.help-article { text-align: left; font-size: 20px; line-height: 1.55; }
.help-article h1 { font-size: 34px; line-height: 1.2; margin-bottom: 20px; }
.help-article h2 { font-size: 25px; margin: 28px 0 8px; }
.help-article p + p { margin-top: 12px; }
.help-article .lede { color: #c9d6c7; }
.help-article a { color: #8ec987; }
.help-article .article-cta { margin-top: 28px; }
.detail-page a:focus-visible, .detail-page button:focus-visible { outline: 2px solid #8ec987; outline-offset: 4px; }
.nav-icon-btn, .nav-dropdown-item { text-decoration: none; }
@media (max-width: 1180px) {
  .detail-page .page-container { width: 100%; max-width: none; margin: 24px 0 40px; }
}
@media (max-width: 480px) {
  .detail-header .nav-text { font-size: 40px; }
  .detail-header nav a { padding: 8px 12px; }
  .page-card, .page-card.auth-modal { padding: 24px 18px; }
}

.help-rules { list-style: none; margin-top: 20px; display: grid; gap: 10px; }

.community-distribution .distribution-caption { color: #bdbdbd; font-size: 16px; margin-bottom: 12px; }
.community-distribution [hidden] { display: none; }
.community-distribution .bar-count { font-size: clamp(10px, 1.1vw, 13px); overflow-wrap: anywhere; text-align: center; }

.community-distribution .bars-container { padding-top: 40px; }
.community-distribution .bar-col { position: relative; }
.distribution-you { position: absolute; bottom: 100%; margin-bottom: 5px; color: #a4db98; font-size: 14px; font-weight: bold; text-align: center; line-height: 1; }
.distribution-you span { display: block; font-size: 22px; margin-top: 2px; }
.community-distribution .is-player-result .bar-track { outline: 1px solid #8ec987; outline-offset: 2px; }

@media (min-width: 1181px) {
  .page-card.auth-modal, .page-card.account-settings {
    max-width: 484px;
    margin-inline: auto;
  }
}

.auth-social-buttons { display: grid; gap: 10px; margin-bottom: 16px; }
.auth-social-buttons a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  box-sizing: border-box;
  margin-top: 0;
  min-height: 48px;
  text-align: center;
  text-decoration: none;
  color: #fff;
  border-color: #666;
  background: #111;
}
.auth-social-buttons .auth-provider-google { background: #fff; color: #1f1f1f; border-color: #dadce0; }
.auth-social-buttons a:hover { color: #fff; background: #242424; border-color: #aaa; }
.auth-social-buttons .auth-provider-google:hover { color: #1f1f1f; background: #f2f5fc; border-color: #4285f4; }
.auth-social-buttons a:focus-visible { outline: 3px solid #8ab4f8; outline-offset: 3px; }
.auth-provider-logo { width: 22px; height: 22px; flex-shrink: 0; }
.auth-divider { text-align: center; margin: 20px 0; opacity: .75; }

.stats-modal :is([data-bar="X"], [data-result-column="X"]) .bar-label { color:#f87171; }
.stats-modal .stat-item:nth-child(6) { animation-delay:.5s; }
.stats-modal .stat-item:nth-child(6) .stat-value { animation-delay:.6s; }

.vault-nav-icon { flex-shrink: 0; vertical-align: middle; }

/* Registered main-game rating. */
.elelo-card, .major-stats-card { margin: 1.25rem 0; padding: 1rem; border: 1px solid #484848; border-radius: 16px; background: #262626; color: #f0f0f0; }
.elelo-summary { display: flex; align-items: baseline; flex-wrap: wrap; gap: .65rem; }
.elelo-summary strong { font-size: 1.8rem; color: #8ec987; }
.elelo-card p { font-size: .88rem; line-height: 1.6; margin: .5rem 0; }
.elelo-card a { color: #8ec987; }
.elelo-card summary { cursor: pointer; font-size: .85rem; }
.elelo-card details p { color: #c3c3c3; }

/* Rating progress, tier symbols and visible leaderboard entry points. */
.leaderboard-launch { display:inline-flex; align-items:center; justify-content:center; gap:.5rem; padding:.65rem .85rem; border:1px solid #626262; border-radius:12px; background:linear-gradient(140deg,#353535,#292929); color:#ededed; font-family:inherit; font-size:.8rem; font-weight:600; cursor:pointer; box-shadow:0 2px 10px #0003; transition:transform .2s, box-shadow .2s, background .2s; flex-shrink:0; }
.leaderboard-launch:hover, .leaderboard-launch.is-active { background:#3c3c3c; box-shadow:0 0 18px #ffffff18; transform:translateY(-2px); }
.leaderboard-launch:focus-visible, .elelo-card a:focus-visible { outline:2px solid #8ec987; outline-offset:4px; }
.leaderboard-launch i { animation:leaderboardShine 4s ease-in-out infinite; }
.streak-leaderboard-launch { border-color:#ca8650; color:#ffcd9a; background:linear-gradient(140deg,#583b28,#34281f); }
.streak-leaderboard-launch:hover, .streak-leaderboard-launch.is-active { background:#65442c; box-shadow:0 0 18px #ff983530; }
@keyframes leaderboardShine { 0%,70%,100% { transform:rotate(0deg) scale(1); filter:brightness(1); } 80% { transform:rotate(-8deg) scale(1.15); filter:brightness(1.4); } 90% { transform:rotate(8deg) scale(1.1); } }
.elelo-card [hidden] { display:none !important; }
.elelo-heading { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:.75rem; }
.elelo-heading h2 { margin:0; font-size:1.3rem; color:#ededed; }
.tier-symbol { width:26px; height:26px; object-fit:contain; flex-shrink:0; }
.elelo-summary { align-items:center; }
.elelo-summary strong { font-variant-numeric:tabular-nums; }
.elelo-explanation { color:#c5c5c5; max-width:65ch; }
.elelo-chart-heading { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-top:1.25rem; }
.elelo-chart-heading h3 { margin:0; font-size:.95rem; }
.elelo-chart-heading select { background:#242424; border:1px solid #616161; border-radius:7px; color:#e1e1e1; font:inherit; font-size:.8rem; padding:.4rem; }
.elelo-chart { min-width:0; }
.elelo-chart svg { display:block; width:100%; height:auto; overflow:visible; touch-action:pan-y; }
.elo-grid { stroke:#ffffff20; }
.elo-axis { fill:#b8b8b8; font-size:15px; }
.elo-tier-line { stroke:#8ec98755; stroke-dasharray:5 5; }
.elo-line { fill:none; stroke:#8ec987; stroke-width:2.5; stroke-linejoin:round; stroke-linecap:round; }
.elo-area { fill:#62a55c16; }
.elo-cursor { stroke:#ffffff44; stroke-dasharray:3 4; }
.elo-dot { fill:#8ec987; stroke:#262626; stroke-width:2; }
.elelo-inspector { padding:.6rem .75rem; border-radius:9px; background:#202020; display:grid; gap:.5rem; }
.elelo-scrubber-label { display:flex; align-items:center; gap:12px; font-size:.8rem; color:#c4c4c4; }
.elelo-inspector input { flex:1; min-width:50px; accent-color:#8ec987; }
.elelo-inspector output { font-size:.82rem; line-height:1.5; font-variant-numeric:tabular-nums; }
.elelo-inspector a { font-size:.8rem; justify-self:start; }
.elelo-guide { margin-top:1rem; }
.elelo-tiers { list-style:none; padding:0; margin:1rem 0 0; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.4rem; }
.elelo-tiers li { display:flex; align-items:center; gap:.6rem; padding:.4rem; background:#303030; border-radius:9px; font-size:.82rem; }
.elelo-tiers img { width:22px; height:22px; object-fit:contain; }
.elelo-tiers small { display:block; color:#ababab; margin-top:.2rem; }
.elelo-board { animation:eloPanelIn .22s ease-out; }
.elelo-board .leaderboard-list { max-height:460px; min-height:100px; }
.elelo-board .leaderboard-title { font-size:1.05rem; }
.elo-leader-row { display:grid; grid-template-columns:30px 22px minmax(0,1fr) auto; gap:8px; padding:10px; }
.elo-leader-row .tier-symbol { width:22px; height:22px; }
.elo-leader-row .leaderboard-streak { font-size:.88rem; color:#ededed; }
.elelo-board-caption { color:#bcbcbc; }
@keyframes eloPanelIn { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:translateY(0); } }
@media (max-width:480px) { .leaderboard-launch { padding:.6rem; gap:.35rem; font-size:.75rem; } .elelo-card { padding:.8rem; } .elo-leader-row { gap:5px; padding:8px; grid-template-columns:25px 20px minmax(0,1fr) auto; } .elo-leader-row .tier-symbol { width:20px; height:20px; } .elelo-tiers { grid-template-columns:1fr; } .elo-axis { font-size:20px; } }
@media (prefers-reduced-motion:reduce) { .leaderboard-launch i,.elelo-board { animation:none; } .leaderboard-launch { transition:none; } .leaderboard-launch:hover { transform:none; } }

.elo-title-help { display:flex; align-items:center; gap:.55rem; }
.elo-help { display:inline-flex; position:relative; }
.elo-help-button { width:22px; height:22px; padding:0; display:grid; place-items:center; border:1px solid #666; border-radius:50%; color:#ccc; background:#303030; font:inherit; font-size:.75rem; cursor:help; }
.elo-help-tooltip { position:absolute; z-index:5; top:calc(100% + 8px); left:-45px; width:min(280px,65vw); padding:.8rem; border:1px solid #616161; border-radius:10px; background:#1e1e1e; box-shadow:0 6px 20px #0008; color:#ddd; text-align:left; font-size:.8rem; line-height:1.65; opacity:0; visibility:hidden; transition:opacity .15s; pointer-events:none; }
.elo-help:hover .elo-help-tooltip,.elo-help:focus-within .elo-help-tooltip,.elo-help:has([aria-expanded="true"]) .elo-help-tooltip { opacity:1; visibility:visible; }
.elo-rank-progress { margin:.85rem 0 1rem; }
.elo-rank-labels { display:flex; justify-content:space-between; gap:10px; color:#bcbcbc; font-size:.75rem; margin-bottom:.4rem; }
.elo-rank-progress progress { display:block; width:100%; height:7px; border:0; border-radius:10px; overflow:hidden; background:#414141; accent-color:#62a55c; }
.elo-rank-progress progress::-webkit-progress-bar { background:#414141; border-radius:10px; }
.elo-rank-progress progress::-webkit-progress-value { background:#62a55c; border-radius:10px; transition:width .3s; }
.elo-rank-progress progress::-moz-progress-bar { background:#62a55c; border-radius:10px; }
.elo-empty-line { stroke-dasharray:5 5; opacity:.55; }
.elelo-tiers li,.elelo-tiers li span,.elelo-tiers small { text-align:left; }
.elelo-tiers li span { min-width:0; }

.major-stats-card { margin-top:0; }
.major-stats-card .modal-title { font-size:1.3rem; }
.major-stats-card .stats-grid { margin-bottom:0; }
.major-stats-card .stat-item { background:#303030; }
@media (max-width:480px) { .major-stats-card { padding:.8rem; } }

.account-billing{margin:24px 0;padding:20px 0;border-top:1px solid #538d4e66;border-bottom:1px solid #538d4e66;text-align:left}.account-billing h2{font-size:18px;margin:0 0 16px;color:#8ec987}.account-billing dl{margin:0}.account-billing dl>div{display:grid;grid-template-columns:1fr 1.25fr;gap:12px;padding:9px 0;line-height:1.6;font-size:13px}.account-billing dt{color:#aab5a7}.account-billing dd{margin:0;color:#e4eadf;overflow-wrap:anywhere}.account-billing-note{font-size:12px;line-height:1.8;color:#becaba}.account-billing-actions{display:grid;gap:10px}.account-billing-refresh{background:none;border:0;color:#8ec987;cursor:pointer;font:inherit;font-size:12px;padding:8px}.account-billing [hidden]{display:none!important}.account-billing button:disabled{opacity:.55;cursor:wait}

.account-billing .auth-btn-outline:disabled { background:#282828; border-color:#414141; color:#858585; opacity:1; cursor:not-allowed; transform:none; }

/* Shared feedback for membership checks and secure billing redirects. */
.billing-loading::before { content:""; display:inline-block; width:12px; height:12px; flex:0 0 12px; margin-right:8px; vertical-align:-2px; border:2px solid #8ec98755; border-top-color:currentColor; border-radius:50%; animation:billingSpin .75s linear infinite; }
button.billing-loading { cursor:wait; }
@keyframes billingSpin { to { transform:rotate(360deg); } }
@media (prefers-reduced-motion:reduce) { .billing-loading::before { animation:none; } }

/* Stats requests retain existing values while the current request is pending. */
.stats-loading-indicator::before { content:""; display:inline-block; width:12px; height:12px; margin-right:8px; vertical-align:-2px; border:2px solid #8ec98755; border-top-color:#8ec987; border-radius:50%; animation:billingSpin .75s linear infinite; }
.stats-is-loading .stat-value,.stats-is-loading .js-elelo-rating,.stats-is-loading .js-freeze-count { position:relative; overflow:hidden; }
.stats-is-loading .stat-value::after,.stats-is-loading .js-elelo-rating::after,.stats-is-loading .js-freeze-count::after,.stats-initial-loading .js-streak-days button::after { content:""; position:absolute; inset:0; border-radius:6px; background:linear-gradient(100deg,transparent 20%,#8ec98722 45%,#d5f3cf33 50%,transparent 75%); background-size:250% 100%; animation:statsShine 1.5s linear infinite; pointer-events:none; }
.stats-initial-loading .js-streak-days button { position:relative; overflow:hidden; }
.stats-initial-loading .js-elelo-chart { opacity:.45; animation:statsPulse 1.5s ease-in-out infinite; }
@keyframes statsShine { from {background-position:200% 0;} to {background-position:-100% 0;} }
@keyframes statsPulse { 50% {opacity:.75;} }
@media (prefers-reduced-motion:reduce) { .stats-loading-indicator::before,.stats-is-loading .stat-value::after,.stats-is-loading .js-elelo-rating::after,.stats-is-loading .js-freeze-count::after,.stats-initial-loading .js-streak-days button::after,.stats-initial-loading .js-elelo-chart { animation:none; } }

/* Language preferences remain available to guests and signed-in players. */
.account-settings { margin: 24px auto 0; text-align: start; }
.account-settings h2 { margin: 0 0 20px; font-size: 1.35rem; }
.account-settings .language-label { display: block; margin-bottom: 8px; font-weight: 600; }
.language-picker { position: relative; }
.language-picker summary { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border: 1px solid rgba(255,255,255,.25); border-radius: 10px; background: #18231d; color: #fff; cursor: pointer; list-style: none; }
.language-picker summary::-webkit-details-marker { display: none; }
.language-picker summary::after { content: ''; width: 7px; height: 7px; margin: 0 4px 4px 16px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); }
.language-choice { display: flex; align-items: center; gap: 10px; min-height: 24px; line-height: 1.5; }
.language-flag { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 28px; height: 24px; font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', sans-serif; font-size: 22px; line-height: 1; }
.language-options { position: fixed; z-index: 20; box-sizing: border-box; max-height: 320px; overflow-y: auto; overscroll-behavior: contain; visibility: hidden; padding: 6px; border: 1px solid rgba(255,255,255,.25); border-radius: 10px; background: #18231d; box-shadow: 0 8px 24px #0006; }
.language-options button { width: 100%; padding: 9px 8px; border: 0; border-radius: 6px; background: transparent; color: #fff; font: inherit; text-align: start; cursor: pointer; }
.language-options button:hover, .language-options button[aria-pressed="true"] { background: #8abd8326; }
.language-picker summary:focus-visible, .language-options button:focus-visible { outline: 2px solid #8abd83; outline-offset: 3px; }
.account-settings .auth-help-text { line-height: 1.6; margin-bottom: 0; }
