/* ===== Mobile-only stylesheet (wrapped in media query) ===== */
@media only screen and (max-width: 767px) {
/* ===== AVALOC Fire Theme — Mobile-First Stylesheet (generated 2025-08-20) ===== */

/* 1) Register RockoFLF as 'Rocko' */
@font-face{
  font-family: 'Rocko';
  src: url('../fonts/RockoFLF.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* 2) Global design tokens */
:root{
  --font-main: 'Rocko', 'Open Sans', system-ui, Segoe UI, Arial, sans-serif;
  --gold:#ffca2a; --orange:#ff7a00; --red:#c12b00;
  --light:#fff; --coal:#090605;

  /* Mobile-friendly rhythm */
  --pad: clamp(12px, 3.5vw, 28px);
  --gap: clamp(10px, 2.8vw, 20px);
  --tap: 44px; /* minimum touch target */
  --maxw: min(1100px, 92vw);
}

*{box-sizing:border-box}
html,body{width:100%;min-height:100%;margin:0}

/* 3) Apply Rocko site-wide */
body{
  font-family: var(--font-main);
  color:var(--light); background:#000;
  display:block; /* prevent flex shrink issues on small screens */
  text-align:center;
  /* Allow vertical scroll on phones; keep background effects visible */
  overflow-x:hidden; overflow-y:auto;
  cursor: url("../img/cursor.png") 0 0, auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  padding: env(safe-area-inset-top) env(safe-area-inset-right)
           env(safe-area-inset-bottom) env(safe-area-inset-left);
}

/* ——— Background video and overlays ——— */
.bg-video{
  position:fixed; inset:0; z-index:0; width:100%; height:100%;
  object-fit:cover; pointer-events:none; filter:saturate(1.05) brightness(0.9);
}
.bg-vignette{
  position:fixed; inset:0; z-index:1; pointer-events:none;
  background:
    radial-gradient(1200px 800px at 50% 50%, rgba(0,0,0,.0), rgba(0,0,0,.25) 70%),
    linear-gradient(to bottom, rgba(0,0,0,.35), rgba(0,0,0,.15) 20%, rgba(0,0,0,.35));
}
#embers{position:fixed; inset:0; z-index:2; pointer-events:none}
.noise{
  position:fixed; inset:0; z-index:3; pointer-events:none;
  background-image:repeating-conic-gradient(from 45deg, rgba(255,255,255,.02) 0 10deg, rgba(0,0,0,.02) 10deg 20deg);
  mix-blend-mode:overlay
}

@media (prefers-reduced-motion: reduce){
  .bg-video{display:none}
}

/* ——— Layout ——— */
.container{max-width:var(--maxw);margin:0 auto;padding:calc(var(--pad)*1.2) var(--pad) calc(var(--pad)*2);position:relative;z-index:4}

/* Logo */
.logo-wrap{position:relative;display:inline-block;width:100%}
.logo{
  width:min(520px, 80vw);
  height:auto;
  filter:drop-shadow(0 10px 22px rgba(0,0,0,.7)) drop-shadow(0 0 26px rgba(255,160,60,.35));
}

/* ICON GRID — mobile-first */
.items{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: var(--gap);
  justify-items:center;
  margin: clamp(16px, 5vh, 48px) 0 18px;
  padding:0;
}
.item{
  display:grid;
  grid-template-rows:auto auto;
  align-content:center; justify-items:center;
  text-decoration:none;
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: clamp(12px, 3.5vw, 18px);
  min-height: max(var(--tap) * 2.2, 110px);
  -webkit-tap-highlight-color: transparent;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.item:active{ transform: scale(0.98); }
.item:hover{ background: rgba(0,0,0,0.5); border-color: rgba(255,255,255,0.15); }
.item .img{
  width: clamp(48px, 16vw, 96px);
  height:auto;
  border-radius:50%;
  padding: 8px;
  transition:transform .25s ease, filter .25s ease, box-shadow .25s ease;
}
.item .title{
  margin:6px 0 0;
  font-weight:800; font-size: clamp(13px, 3.2vw, 18px); letter-spacing:.03em;
  color:#fff; text-shadow:0 3px 8px rgba(0,0,0,.6);
}
/* Subtle hover glow, scaled for mobile */
.item:hover .img{
  transform:scale(1.05);
  filter:brightness(1.08) saturate(1.06)
    drop-shadow(0 0 6px rgba(255,120,40,.65))
    drop-shadow(0 0 12px rgba(255,160,60,.45))
    drop-shadow(0 0 18px rgba(255,200,80,.25));
}

/* ===== Vote Section (no outer glow box) ===== */
.vote{
  margin-top:20px;
  padding:0;
  background:transparent;
  backdrop-filter:none;
  box-shadow:none;
  position:relative;
}
.vote h2{
  margin:6px 0 6px; font-size:clamp(18px, 4.4vw, 22px); font-weight:800; letter-spacing:.04em;
  text-shadow:0 0 10px rgba(255,160,60,.35);
}
.vote-sub{margin:0 0 14px;font-size:clamp(12px, 3.5vw, 14px);opacity:.95}

/* ===== Individual glowing vote LINKS ===== */
.vote-links{
  list-style:none;
  display:flex; flex-wrap:wrap; justify-content:center;
  gap:18px; padding:0; margin:12px 0 0;
}
.vote-links a{
  position:relative;
  display:inline-block;
  font-weight:800; font-size:clamp(14px, 3.8vw, 18px); letter-spacing:.06em;
  text-decoration:none; color:#fff;
  padding:6px 8px;
  border-radius:10px;
  transition:filter .2s ease, transform .18s ease;
}
.vote-links a::after{
  content:"";
  position:absolute; left:10px; right:10px; bottom:2px; height:2px;
  background:linear-gradient(90deg, rgba(255,120,40,0), rgba(255,160,60,1), rgba(255,120,40,0));
  transform:scaleX(0); transform-origin:50% 100%;
  transition:transform .25s ease;
  box-shadow:0 0 10px rgba(255,160,60,.45);
}
.vote-links a::before{
  content:"";
  position:absolute; inset:-6px -10px;
  border-radius:14px;
  background:
    radial-gradient(60% 80% at 50% 50%, rgba(255,160,60,.18), rgba(255,120,40,.12) 45%, rgba(255,160,60,0) 70%);
  opacity:0; filter:blur(6px);
  transform:scale(.95);
  transition:opacity .18s ease, transform .18s ease;
  z-index:-1;
}
.vote-links a:hover,
.vote-links a:focus-visible{
  filter:brightness(1.12);
  transform:translateY(-1px);
  text-shadow:0 2px 10px rgba(255,160,60,.35), 0 0 18px rgba(255,130,40,.25);
}
.vote-links a:hover::after,
.vote-links a:focus-visible::after{ transform:scaleX(1) }
.vote-links a:hover::before,
.vote-links a:focus-visible::before{
  opacity:1; transform:scale(1);
  animation: voteGlowPulse 1.8s ease-in-out infinite;
}
@keyframes voteGlowPulse{
  0%,100%{ filter:blur(6px); opacity:.9 }
  50%{ filter:blur(8px); opacity:1 }
}

/* ===== Footer Line — mobile-safe ===== */
.playerline{
  margin-top: clamp(20px, 6vh, 34px);
  display:flex; align-items:center; justify-content:center; flex-wrap:wrap;
  gap:8px 12px;
  font-size:clamp(12px, 3.2vw, 18px); letter-spacing:.08em;
  color:#fff; padding:8px 14px; border-radius:999px;
  background:rgba(15,10,8,.35); backdrop-filter: blur(6px);
  box-shadow:0 1px 0 rgba(255,255,255,.06) inset, 0 0 20px rgba(255,120,40,.12);
  position:relative;
}
.playerline .pl-chunk.muted{opacity:.9}
.playerline .dot{opacity:.5}

/* Animated lava-gradient count + states */
.count{
  font-weight:900;
  letter-spacing:.02em;
  background:linear-gradient(90deg,#ffd37a,#ff9a2e,#ff4d17,#ffd37a);
  background-size:300% 100%;
  -webkit-background-clip:text; background-clip:text; color:transparent;
  animation:lavaShift 6s linear infinite, pulse 2.2s ease-in-out infinite;
}
.count.loading{
  background:linear-gradient(90deg,#bbb,#ddd,#bbb);
  background-size:200% 100%;
  animation:lavaShift 2.5s linear infinite;
}
.count.stale{opacity:.85; filter:saturate(.9)}
.count.offline{background:unset; color:#ffd9d9; text-shadow:0 0 8px rgba(255,80,80,.35); animation:none}
@keyframes lavaShift{to{background-position:300% 0}}
@keyframes pulse{0%,100%{text-shadow:0 0 6px rgba(255,160,60,.35)}50%{text-shadow:0 0 16px rgba(255,190,90,.65)}}

/* Copyable IP pill — larger tap target on mobile */
.ip-copy{
  appearance:none; border:none; background:transparent; color:#fff;
  font:inherit; letter-spacing:.1em;
  padding: 8px 14px;
  min-height: var(--tap);
  border-radius: 999px;
  cursor: url("../img/cursor-hover.png") 0 0, pointer;
  position:relative; transition:filter .2s ease, transform .15s ease;
}
.ip-copy::after{
  content:"Click to copy";
  position:absolute; left:50%; top:-160%;
  transform:translateX(-50%) translateY(6px);
  padding:4px 8px; font-size:11px; letter-spacing:.04em;
  background:rgba(0,0,0,.55); color:#fff; border-radius:6px;
  opacity:0; pointer-events:none; white-space:nowrap;
  transition:opacity .18s ease, transform .18s ease;
  box-shadow:0 2px 8px rgba(0,0,0,.3);
}
.ip-copy:hover::after{opacity:1; transform:translateX(-50%) translateY(0)}
.ip-copy:before{
  content:""; position:absolute; left:0; right:0; bottom:-2px; height:2px;
  background:linear-gradient(90deg, rgba(255,120,40,0), rgba(255,160,60,1), rgba(255,120,40,0));
  transform:scaleX(0); transform-origin:50% 100%;
  transition:transform .25s ease; box-shadow:0 0 10px rgba(255,160,60,.6);
}
.ip-copy:hover:before{transform:scaleX(1)}
.ip-copy.copied{filter:brightness(1.15); transform:translateY(-1px) scale(1.03)}
.copy-toast{
  position:absolute; right:-2px; top:-34px;
  font-weight:800; font-size:11px; letter-spacing:.15em;
  padding:4px 10px; border-radius:999px;
  color:#1a0c05; background:linear-gradient(90deg,#ffd37a,#ff9a2e);
  box-shadow:0 4px 16px rgba(0,0,0,.35), 0 0 14px rgba(255,160,60,.5);
  opacity:0; transform:translateY(6px); transition:opacity .2s ease, transform .2s ease;
}
.ip-copy.copied + .copy-toast{opacity:1; transform:translateY(0)}

/* Hover cursor (fiery) on key targets */
a:hover, button:hover, .item:hover, .ip-copy:hover {
  cursor: url("../img/cursor-hover.png") 0 0, pointer;
}

/* ===== Small phones (≤360px) — force two columns for icons ===== */
@media (max-width: 360px){
  .items { grid-template-columns: repeat(2, 1fr); }
  .item .title { font-size: 12px; }
}

/* ===== Landscape phones (short height) ===== */
@media (max-height: 520px) and (orientation: landscape){
  .logo { width: min(280px, 35vw); }
  .items { gap: 10px; }
  .playerline { font-size: 12px; }
}

/* ===== Tablets & up — progressively enhance ===== */
@media (min-width: 768px){
  .container { padding: calc(var(--pad)*1.8) var(--pad) calc(var(--pad)*2.2); }
  .item:hover .img{ transform:scale(1.08); }
}

/* ===== Desktops — keep your big look ===== */
@media (min-width: 1024px){
  .container { max-width: min(1300px, 96vw); }
  .items { gap: clamp(24px, 4vw, 64px); }
  .item .img { width: 160px; }
  .item .title { font-size: 24px;
/* Fix footer playerline for mobile */
.playerline {
  display: flex;
  flex-direction: column;   /* stack vertically */
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  max-width: 320px;         /* prevent stretching edge-to-edge */
  margin: 20px auto 0;
  padding: 10px 12px;
  font-size: 14px;
  line-height: 1.3;
  border-radius: 14px;
}

/* Ensure copy button & toast fit well */
.playerline .ip-copy {
  margin-top: 4px;
  min-height: 44px;
  font-size: 13px;
}
.playerline .copy-toast {
  position: static;
  margin-top: 6px;
}


/* === Mobile fix: footer playerline stacking & sizing === */
.playerline {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  max-width: 320px;
  margin: 20px auto 0;
  padding: 10px 12px;
  font-size: 14px;
  line-height: 1.3;
  border-radius: 14px;
}
.playerline .ip-copy {
  margin-top: 4px;
  min-height: 44px;
  font-size: 13px;
}
.playerline .copy-toast {
  position: static;
  margin-top: 6px;
}


/* === Mobile fix: player count visibility / no gradient while loading === */
.count {
  display: inline-block;
  min-width: 2ch;              /* keep space reserved for digits */
}
.count.loading {
  /* On mobile, avoid gradient rectangle and show a plain dash/number */
  background: none !important;
  -webkit-background-clip: initial !important;
  background-clip: initial !important;
  -webkit-text-fill-color: currentColor !important;
  color: #ffffff !important;
  text-shadow: 0 0 6px rgba(255,160,60,.35);
}
/* Fallback for browsers without background-clip:text support */
@supports not (-webkit-background-clip: text) {
  .count {
    background: none !important;
    -webkit-text-fill-color: currentColor !important;
    color: #ffd37a !important;
    text-shadow: 0 0 10px rgba(255,160,60,.35);
  }
}


/* === Android Chrome hardening for player count === */
.count { 
  display: inline-block;
  min-width: 2ch;
  line-height: 1.2;
}
.count.loading,
.count.offline {
  background: none !important;
  background-image: none !important;
  -webkit-background-clip: initial !important;
  background-clip: initial !important;
  box-shadow: none !important;
  -webkit-text-fill-color: currentColor !important;
  color: #ffffff !important;
  text-shadow: 0 0 6px rgba(255,160,60,.35);
}


/* === Mobile universal fix (Chrome 139 Android): disable gradient text for count === */
.count,
.count.loading,
.count.stale {
  background: none !important;
  background-image: none !important;
  -webkit-background-clip: initial !important;
  background-clip: initial !important;
  -webkit-text-fill-color: currentColor !important;
  color: #ffd37a !important;              /* readable lava-gold */
  text-shadow: 0 0 10px rgba(255,160,60,.35);
  animation: none !important;             /* avoid animating non-existent gradient */
}


/* === Mobile flair: pulse glow for player count (no gradient) === */
@keyframes mobilePulseGlow {
  0%, 100% { text-shadow: 0 0 6px rgba(255,160,60,.35); }
  50%      { text-shadow: 0 0 14px rgba(255,190,90,.65); }
}
.playerline .count {
  animation: mobilePulseGlow 2.2s ease-in-out infinite !important;
  color: #ffd37a !important;             /* lava-gold */
  -webkit-text-fill-color: currentColor !important;
}
.playerline .count.loading {
  color: #ffffff !important;
  opacity: 0.95;
}
.playerline .count.offline {
  color: #ffd9d9 !important;
  opacity: 1;
  text-shadow: 0 0 8px rgba(255,80,80,.35) !important;
}


/* === Mobile fix: use fallback font for player count to avoid missing glyphs in Rocko === */
.playerline .count {
  font-family: 'Open Sans', system-ui, Segoe UI, Arial, sans-serif !important;
}

}
