/*
  © 2026 1VMSK — All rights reserved.
  Enhancement layer (js/enhance.js): mobile dock, fluid spacing, bigger touch
  targets, share button, live-aware hero. Loaded after style.css.
*/
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
body{min-height:100vh;min-height:100dvh}
section{padding-block:clamp(52px,9vw,112px)}
.section-inner{width:100%}
@media (min-width:1800px){
  .nav-inner{max-width:1400px}
  .section-inner{max-width:1180px}
  #stream .section-inner{max-width:1500px}
}

/* ---------- top bar tools: language button always visible on phones/tablets ---------- */
.nav-tools{display:none;align-items:center;gap:6px}
.nav-lang{
  min-width:48px;height:40px;padding:0 12px;
  border:1px solid var(--line);border-radius:999px;background:var(--bg-elev);
  color:var(--ink);font-family:'Plex Arabic','JetBrains Mono',monospace;font-size:12.5px;
  transition:border-color .2s var(--ease),color .2s var(--ease);
}
.nav-lang:hover{border-color:var(--teal-deep);color:var(--teal)}
@media (max-width:1080px){
  .nav-tools{display:flex}
  .nav-toggle{width:44px;height:44px}
  .lang-switch{display:none}
}

/* ---------- bottom dock (phones) ---------- */
.dock{display:none}
@media (max-width:760px) and (min-height:481px){
  .dock{
    display:flex;gap:2px;
    position:fixed;left:10px;right:10px;
    bottom:max(10px,env(safe-area-inset-bottom,0px));
    z-index:95;height:60px;padding:4px;
    background:rgba(7,10,11,.92);
    -webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px);
    border:1px solid var(--line);
    clip-path:polygon(12px 0,100% 0,100% calc(100% - 12px),calc(100% - 12px) 100%,0 100%,0 12px);
  }
  .dock a{
    position:relative;flex:1;min-width:0;
    display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;
    font-size:11px;line-height:1;color:var(--ink-muted);
    transition:color .2s var(--ease),background .2s var(--ease);
  }
  .dock a svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
  .dock a span{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .dock a.active{color:var(--teal);background:rgba(63,211,232,.1)}
  html.site-live .dock a[data-k="live"]{color:#ff9a90}
  html.site-live .dock a[data-k="live"]::after{
    content:'';position:absolute;top:8px;inset-inline-end:calc(50% - 16px);
    width:7px;height:7px;border-radius:50%;background:#ff5a4a;animation:blink 1.4s ease-in-out infinite;
  }
  html.has-dock body{padding-bottom:calc(84px + env(safe-area-inset-bottom,0px))}
  html.has-dock .ux-top{bottom:calc(84px + env(safe-area-inset-bottom,0px))}
  html.has-dock .toast{bottom:calc(88px + env(safe-area-inset-bottom,0px))}
}

/* ---------- share button + toast ---------- */
.share-btn{
  margin-top:12px;display:inline-flex;align-items:center;gap:8px;
  min-height:40px;padding:0 16px;border:1px solid var(--line);border-radius:999px;
  background:transparent;color:var(--ink-muted);font-size:13px;
  transition:color .2s var(--ease),border-color .2s var(--ease);
}
.share-btn svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.share-btn:hover{color:var(--teal);border-color:var(--teal-deep)}
.toast{
  position:fixed;left:50%;bottom:calc(24px + env(safe-area-inset-bottom,0px));
  transform:translate(-50%,16px);z-index:200;
  padding:11px 18px;border:1px solid var(--teal-deep);border-radius:999px;
  background:var(--bg-elev-2);color:var(--ink);font-size:14px;white-space:nowrap;
  opacity:0;pointer-events:none;transition:opacity .25s,transform .25s var(--ease);
}
.toast.show{opacity:1;transform:translate(-50%,0)}

/* ---------- hero reacts to live state ---------- */
html.site-live .hero .cta-row .btn-primary{background:#ff5a4a;color:#fff}
html.site-live .hero .cta-row .btn-primary::before{
  content:'';width:8px;height:8px;border-radius:50%;background:#fff;animation:blink 1.4s ease-in-out infinite;
}

/* ---------- touch comfort ---------- */
@media (hover:none),(pointer:coarse){
  .btn,.link-card,.clip-tile,.dock a{-webkit-tap-highlight-color:transparent}
  .btn:active,.link-card:active,.clip-tile:active{transform:scale(.97)}
  .btn,.link-card,.clip-tile{transition-duration:.15s}
  .icon-btn{width:44px;height:44px}
  .kick-tab{min-height:40px;padding-inline:16px}
  .social-row a{display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px}
  .social-row{gap:6px}
}
@media (max-width:360px){
  .btn{padding:14px 20px}
  .badges-row{gap:12px}
  .badges-row img{width:64px;height:64px}
}
@media (prefers-reduced-motion:reduce){
  html.site-live .hero .cta-row .btn-primary::before,
  html.site-live .dock a[data-k="live"]::after{animation:none}
  .toast{transition:none}
}

/* ---------- refresh button ---------- */
.refresh-btn{
  position:fixed;inset-inline-start:max(16px,env(safe-area-inset-left,0px));
  bottom:max(16px,env(safe-area-inset-bottom,0px));z-index:90;
  width:46px;height:46px;border-radius:50%;
  display:flex;align-items:center;justify-content:center;
  border:1px solid var(--teal-deep);background:rgba(7,10,11,.88);color:var(--teal);
  -webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);
  transition:background .25s var(--ease),color .25s var(--ease);
}
.refresh-btn svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;transition:transform .5s var(--ease)}
.refresh-btn:hover{background:var(--teal);color:#031013}
.refresh-btn.spin svg{transform:rotate(360deg)}
@media (hover:none){.refresh-btn:hover{background:rgba(7,10,11,.88);color:var(--teal)}}
@media (max-width:760px) and (min-height:481px){html.has-dock .refresh-btn{bottom:calc(84px + env(safe-area-inset-bottom,0px))}}
@media (prefers-reduced-motion:reduce){.refresh-btn svg{transition:none}}

/* ---------- refresh button in the top bar ---------- */
.nav-refresh{
  width:40px;height:40px;flex-shrink:0;border-radius:50%;
  display:inline-flex;align-items:center;justify-content:center;
  border:1px solid var(--line);background:var(--bg-elev);color:var(--ink-muted);
  transition:color .2s var(--ease),border-color .2s var(--ease);
}
.nav-refresh svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;transition:transform .5s var(--ease)}
.nav-refresh:hover{color:var(--teal);border-color:var(--teal-deep)}
.nav-refresh.spin svg{transform:rotate(360deg)}
.nav-links .nav-refresh{margin-inline-end:-8px}
@media (max-width:1080px){.nav-links .nav-refresh{display:none}}
@media (prefers-reduced-motion:reduce){.nav-refresh svg{transition:none}}

/* =====================================================
   LINKS: rounded cards + white "Direct support" feature card
   ===================================================== */
#links .panel-card{background:none;border:0;padding:0;clip-path:none}
.panel-card .links{
  display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;
  margin-top:30px;background:none;border:0;clip-path:none;
}
.links .link-card{
  min-width:0;padding:20px;gap:12px;
  background:var(--bg-elev);border:1px solid var(--line);border-radius:22px;
}
.links .link-card:hover{background:var(--bg-elev-2);border-color:var(--teal-deep)}
.links .link-meta{min-width:0;gap:14px}
.links .link-icon{
  width:44px;height:44px;border-radius:14px;clip-path:none;
  background:var(--bg-elev-2);border:1px solid var(--line);
}
.links .link-text{min-width:0}
.links .link-text .label{display:block;font-size:15px;letter-spacing:.05em;text-transform:uppercase}
.links .link-text .sub{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.links .link-arrow{display:none}

.don-feature{
  grid-row:span 2;min-width:0;min-height:190px;
  display:flex;flex-direction:column;justify-content:space-between;gap:24px;
  padding:22px;border-radius:26px;background:#fff;color:#070a0b;
  transition:transform .25s var(--ease),box-shadow .25s var(--ease);
}
.don-feature-top{display:flex;align-items:flex-start;justify-content:space-between}
.don-feature-icon{
  width:48px;height:48px;border-radius:50%;background:#070a0b;color:#fff;
  display:flex;align-items:center;justify-content:center;
}
.don-feature-icon svg{width:22px;height:22px}
.don-feature-out{width:20px;height:20px;color:#6b7476;flex-shrink:0}
.don-feature-text{display:flex;flex-direction:column;gap:6px}
.don-feature-label{font-size:11.5px;font-weight:600;letter-spacing:.1em;text-transform:uppercase;color:#6b7476}
.don-feature-title{font-family:'Rajdhani',sans-serif;font-weight:700;font-size:clamp(1.7rem,3.2vw,2.2rem);line-height:1.05}
html[lang="ar"] .don-feature-title{font-family:'Plex Arabic','Rajdhani',sans-serif}
@media (hover:hover) and (pointer:fine){
  .don-feature:hover{transform:translateY(-3px);box-shadow:0 22px 44px -22px rgba(255,255,255,.4)}
}
.don-feature:active{transform:scale(.98)}

@media (max-width:900px){
  .panel-card .links{grid-template-columns:repeat(2,minmax(0,1fr))}
  .don-feature{grid-column:1 / -1;grid-row:auto;min-height:150px}
}
@media (max-width:480px){
  .panel-card .links{grid-template-columns:minmax(0,1fr)}
}

/* =====================================================
   SITE BACKGROUND: one continuous dark canvas with a soft teal ambience
   (replaces the alternating flat section colours)
   ===================================================== */
html{background:var(--bg)}
body{background:transparent}
html::before{
  content:'';position:fixed;inset:0;z-index:-1;pointer-events:none;
  background:
    radial-gradient(70vw 55vh at 6% -5%,rgba(63,211,232,.12) 0%,transparent 70%),
    radial-gradient(60vw 60vh at 100% 48%,rgba(15,85,96,.20) 0%,transparent 70%),
    radial-gradient(70vw 50vh at 0% 105%,rgba(63,211,232,.08) 0%,transparent 70%),
    linear-gradient(180deg,#070a0b 0%,#091214 55%,#070a0b 100%);
}
section,#links,#stream{background:transparent;border-top-color:rgba(63,211,232,.09)}
footer,.don-footer,.credit{background:transparent}
footer,.don-footer{border-top-color:rgba(63,211,232,.09)}

/* =====================================================
   LEADERBOARDS: original look (styles live in style.css)
   ===================================================== */
#watchtimeMount .botrix-live-dot{display:none}
.botrix-live{white-space:nowrap;flex-shrink:0}

/* =====================================================
   GAMES MENU + SNAKE
   ===================================================== */
.game-menu{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin-top:30px}
.game-card{
  display:flex;align-items:center;gap:16px;min-width:0;padding:20px;text-align:start;
  border-radius:22px;background:var(--bg-elev);border:1px solid var(--line);color:var(--ink);
  transition:border-color .2s var(--ease),background .2s var(--ease),box-shadow .2s var(--ease);
}
.game-card-icon{
  flex:0 0 54px;height:54px;border-radius:16px;display:flex;align-items:center;justify-content:center;
  background:var(--bg-elev-2);border:1px solid var(--line);
}
.game-card-icon img{width:32px;height:32px}
.game-card-icon svg{width:28px;height:28px;fill:none;stroke:var(--teal);stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.game-card-text{display:flex;flex-direction:column;gap:4px;min-width:0}
.game-card-name{font-family:'Rajdhani',sans-serif;font-weight:700;font-size:19px}
html[lang="ar"] .game-card-name{font-family:'Plex Arabic','Rajdhani',sans-serif}
.game-card-desc{font-size:13px;line-height:1.55;color:var(--ink-muted)}
.game-card.active{border-color:var(--teal);background:var(--bg-elev-2);box-shadow:0 0 0 1px var(--teal-deep),0 18px 40px -26px rgba(63,211,232,.55)}
@media (hover:hover) and (pointer:fine){.game-card:not(.active):hover{border-color:var(--teal-deep);background:var(--bg-elev-2)}}
.game-card:active{transform:scale(.985)}
.game-panel{margin-top:18px}
.game-panel[hidden]{display:none}

.snake-body{display:flex;flex-direction:column;align-items:center;gap:16px;padding:18px}
.snake-stage{
  position:relative;width:min(100%,480px);aspect-ratio:1;overflow:hidden;
  background:var(--bg-elev);border:1px solid var(--line);border-radius:18px;
  user-select:none;-webkit-user-select:none;
}
.snake-stage.playing{touch-action:none}
.snake-stage canvas{display:block;width:100%;height:100%}
.snake-pad{
  display:none;grid-template-columns:repeat(3,64px);grid-template-rows:repeat(2,64px);gap:8px;justify-content:center;
}
.snake-pad button{
  width:64px;height:64px;border-radius:50%;display:flex;align-items:center;justify-content:center;
  border:1px solid var(--line);background:var(--bg-elev);color:var(--teal);touch-action:manipulation;
}
.snake-pad button:active{background:var(--teal);color:#031013}
.snake-pad svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.snake-pad [data-dir="up"]{grid-column:2;grid-row:1}
.snake-pad [data-dir="left"]{grid-column:1;grid-row:2}
.snake-pad [data-dir="down"]{grid-column:2;grid-row:2}
.snake-pad [data-dir="right"]{grid-column:3;grid-row:2}
@media (hover:none),(pointer:coarse),(max-width:760px){.snake-pad{display:grid}}
@media (max-width:560px){
  .game-menu{grid-template-columns:minmax(0,1fr)}
  .snake-body{padding:12px}
}
.snake-pad{direction:ltr}
