/*
 * Fbrkh Next Shell v1
 * 2026-09-18 — modern-only visual foundation.
 * Classic mode is intentionally untouched.
 */

:root[data-ui-mode="modern"]{
  --next-bg:#080512;
  --next-bg-2:#110823;
  --next-panel:rgba(24,13,43,.82);
  --next-panel-strong:rgba(29,15,52,.94);
  --next-panel-soft:rgba(255,255,255,.055);
  --next-line:rgba(255,255,255,.11);
  --next-line-hot:rgba(192,129,255,.34);
  --next-purple:#9b58ff;
  --next-purple-2:#6d2dde;
  --next-violet:#c182ff;
  --next-gold:#ffd568;
  --next-gold-2:#f4b936;
  --next-cyan:#66e7ef;
  --next-text:#fffafd;
  --next-muted:#c9bfd4;
  --next-shadow:0 26px 80px rgba(0,0,0,.38);
  --next-radius-xl:32px;
  --next-radius-lg:24px;
  --next-radius-md:18px;
  --next-touch:48px;
}

/* Global modern ambience */
:root[data-ui-mode="modern"] body.fbrkh-next-shell{
  background:
    radial-gradient(circle at 12% 5%,rgba(125,55,220,.24),transparent 34rem),
    radial-gradient(circle at 88% 18%,rgba(255,196,78,.075),transparent 27rem),
    radial-gradient(circle at 55% 95%,rgba(85,38,166,.15),transparent 32rem),
    linear-gradient(155deg,var(--next-bg-2),var(--next-bg) 48%,#07040f);
}
:root[data-ui-mode="modern"] body.fbrkh-next-shell::before{
  content:"";
  position:fixed;
  inset:0;
  pointer-events:none;
  z-index:-1;
  opacity:.36;
  background-image:
    linear-gradient(rgba(255,255,255,.018) 1px,transparent 1px),
    linear-gradient(90deg,rgba(255,255,255,.018) 1px,transparent 1px);
  background-size:38px 38px;
  mask-image:linear-gradient(to bottom,rgba(0,0,0,.7),transparent 76%);
}

/* Home navigation */
:root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell .home-topbar{
  width:min(1260px,calc(100% - 28px))!important;
  min-height:72px!important;
  margin:14px auto 0!important;
  padding:9px 12px 9px 16px!important;
  border:1px solid rgba(255,255,255,.09)!important;
  border-radius:24px!important;
  background:linear-gradient(180deg,rgba(22,11,39,.91),rgba(12,7,24,.86))!important;
  box-shadow:0 15px 50px rgba(0,0,0,.30),inset 0 1px rgba(255,255,255,.045)!important;
  backdrop-filter:blur(22px) saturate(1.25)!important;
}
:root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell .home-topbar.is-condensed{
  min-height:62px!important;
  background:rgba(12,7,23,.94)!important;
}
:root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell .home-topbar .brand{
  min-width:154px;
  padding-inline:4px 8px;
}
:root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell .home-topbar .brand-mark{
  width:clamp(138px,12vw,176px)!important;
  height:auto!important;
  filter:drop-shadow(0 4px 20px rgba(157,86,255,.18));
}
:root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell .primary-nav{
  gap:4px!important;
  padding:4px!important;
  border:1px solid rgba(255,255,255,.055);
  border-radius:16px;
  background:rgba(255,255,255,.025);
}
:root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell .primary-nav .nav-link,
:root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell .primary-nav button{
  min-height:44px;
  padding:9px 12px!important;
  border-radius:12px!important;
  color:#d8cede!important;
  font-weight:800!important;
}
:root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell .primary-nav .nav-link:hover,
:root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell .primary-nav .nav-link.active{
  background:rgba(155,88,255,.12)!important;
  color:#fff!important;
}
:root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell #accountBtn{
  min-height:48px!important;
  padding:7px 13px!important;
  border:1px solid rgba(255,213,104,.24)!important;
  border-radius:15px!important;
  background:linear-gradient(180deg,rgba(255,213,104,.105),rgba(255,255,255,.035))!important;
  color:#fff7db!important;
  box-shadow:none!important;
}
:root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell #accountBtn .platform-account-avatar{
  width:32px;height:32px;border-radius:10px;object-fit:cover;
  box-shadow:0 0 0 2px rgba(255,213,104,.22);
}

/* Hero */
:root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell .home-hero{
  width:min(1260px,calc(100% - 28px))!important;
  min-height:590px!important;
  margin:14px auto 0!important;
  padding:68px 50px 56px!important;
  display:grid!important;
  grid-template-columns:minmax(0,1.15fr) minmax(310px,.85fr)!important;
  gap:42px!important;
  align-items:center!important;
  overflow:hidden!important;
  isolation:isolate;
  border:1px solid rgba(255,255,255,.07)!important;
  border-radius:38px!important;
  background:
    radial-gradient(circle at 72% 35%,rgba(150,76,255,.23),transparent 23rem),
    radial-gradient(circle at 17% 15%,rgba(255,206,93,.07),transparent 20rem),
    linear-gradient(140deg,rgba(36,17,62,.80),rgba(12,7,24,.66) 58%,rgba(17,8,30,.86))!important;
  box-shadow:var(--next-shadow),inset 0 1px rgba(255,255,255,.045)!important;
}
:root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell .home-hero::before{
  content:""!important;
  position:absolute!important;
  inset:0!important;
  border:0!important;
  border-radius:inherit!important;
  background:
    linear-gradient(120deg,transparent 0 49%,rgba(255,255,255,.024) 49.5% 50.5%,transparent 51%),
    radial-gradient(circle at 80% 18%,rgba(255,255,255,.045),transparent 15rem)!important;
  mask-image:none!important;
  pointer-events:none;
  z-index:-1;
}
:root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell .hero-copy{
  width:100%!important;
  max-width:760px!important;
  align-items:flex-start!important;
  text-align:right!important;
}
:root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell .next-hero-kicker{
  display:inline-flex;
  align-items:center;
  gap:8px;
  min-height:34px;
  padding:7px 12px;
  margin-bottom:16px;
  border:1px solid rgba(193,130,255,.24);
  border-radius:999px;
  background:rgba(155,88,255,.075);
  color:#e5cffd;
  font-size:12px;
  font-weight:900;
  letter-spacing:.01em;
}
:root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell .next-hero-kicker::before{
  content:"";
  width:7px;height:7px;border-radius:50%;
  background:var(--next-gold);
  box-shadow:0 0 16px rgba(255,213,104,.75);
}
:root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell .home-hero h1,
:root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell .hero h1{
  width:auto!important;
  max-width:720px!important;
  margin:0!important;
  padding:0 0 .10em!important;
  white-space:normal!important;
  text-wrap:balance!important;
  text-align:right!important;
  font-size:clamp(54px,6.4vw,88px)!important;
  line-height:1.04!important;
  letter-spacing:-2.7px!important;
  text-shadow:0 16px 42px rgba(0,0,0,.35)!important;
}
:root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell .home-hero h1 .hero-gold{
  color:var(--next-gold)!important;
  -webkit-text-fill-color:var(--next-gold)!important;
}
:root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell .home-hero h1 .hero-white{
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
}
:root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell .hero-copy>.hero-lead{
  max-width:610px!important;
  margin:16px 0 0!important;
  padding:0!important;
  color:#cfc4d8!important;
  font-size:clamp(16px,1.45vw,20px)!important;
  line-height:1.85!important;
  text-align:right!important;
}
:root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell .hero-actions{
  width:100%;
  justify-content:flex-start!important;
  gap:12px!important;
  margin-top:24px!important;
}
:root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell .hero-primary{
  min-width:190px!important;
  min-height:52px!important;
  border:0!important;
  border-radius:16px!important;
  background:linear-gradient(135deg,var(--next-purple),#7534dc)!important;
  box-shadow:0 14px 34px rgba(116,49,222,.28),inset 0 1px rgba(255,255,255,.18)!important;
}
:root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell .hero-secondary{
  min-height:52px;
  display:inline-flex!important;
  align-items:center;
  gap:8px;
  padding:0 15px!important;
  border:1px solid rgba(255,255,255,.11)!important;
  border-radius:16px!important;
  background:rgba(255,255,255,.035)!important;
  color:#efe8f4!important;
}
:root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell .hero-card-stack{
  display:grid!important;
  place-items:center;
  min-height:380px;
  position:relative;
  perspective:900px;
}
:root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell .hero-card-stack::before{
  content:"";
  position:absolute;
  width:330px;height:330px;
  border-radius:50%;
  background:radial-gradient(circle,rgba(149,74,255,.29),rgba(100,44,191,.08) 52%,transparent 72%);
  filter:blur(10px);
}
:root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell .stack-card{
  position:absolute!important;
  width:min(330px,82%)!important;
  aspect-ratio:1.42!important;
  border-radius:30px!important;
  border:1px solid rgba(255,255,255,.11)!important;
  box-shadow:0 32px 90px rgba(0,0,0,.42)!important;
}
:root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell .stack-card.back{
  transform:translate(-48px,34px) rotate(-9deg)!important;
  background:linear-gradient(135deg,#32164f,#160c27)!important;
}
:root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell .stack-card.mid{
  transform:translate(42px,22px) rotate(7deg)!important;
  background:linear-gradient(135deg,#5f28a8,#26103f)!important;
}
:root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell .stack-card.front{
  display:grid!important;
  place-items:center!important;
  overflow:hidden!important;
  background:
    radial-gradient(circle at 70% 25%,rgba(255,215,102,.14),transparent 11rem),
    linear-gradient(145deg,#4b1f7c,#1d0d34 64%,#10091e)!important;
}
:root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell .stack-card.front::after{
  content:"وقت اللعب";
  position:absolute;
  bottom:21px;
  padding:7px 12px;
  border:1px solid rgba(255,255,255,.1);
  border-radius:999px;
  background:rgba(0,0,0,.20);
  color:#dbcce6;
  font-size:11px;
  font-weight:800;
}
:root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell .stack-card.front img{
  width:72%!important;
  max-height:112px!important;
  object-fit:contain!important;
  filter:drop-shadow(0 10px 28px rgba(0,0,0,.28));
}

/* Inline join — feels like part of the hero, not a separate form */
:root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell .hero-join{
  width:100%!important;
  max-width:610px!important;
  margin:24px 0 0!important;
}
:root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell .hero-join .join-panel{
  padding:10px!important;
  border:1px solid rgba(255,255,255,.08)!important;
  border-radius:19px!important;
  background:rgba(7,4,14,.31)!important;
  box-shadow:none!important;
}
:root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell .hero-join .join-copy{display:none!important}
:root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell .hero-join .join-input-row{
  display:grid!important;
  grid-template-columns:auto minmax(0,1fr) auto!important;
  gap:8px!important;
  align-items:center!important;
}
:root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell .hero-join .join-people{
  width:38px;height:38px;
  display:grid;place-items:center;
  border-radius:12px;
  color:var(--next-gold);
  background:rgba(255,213,104,.08);
}
:root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell .hero-join input{
  min-height:48px!important;
  border:0!important;
  border-radius:13px!important;
  background:rgba(255,255,255,.055)!important;
  color:#fff!important;
  letter-spacing:.13em!important;
  font-weight:900!important;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.07)!important;
}
:root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell .hero-join button{
  min-height:48px!important;
  border-radius:13px!important;
  padding-inline:18px!important;
}
:root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell .hero-join small{
  display:block;
  margin:7px 4px 0;
  color:#a99eb4!important;
  font-size:10px;
}

/* Games section */
:root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell .games-section{
  width:min(1260px,calc(100% - 28px))!important;
  margin:18px auto 0!important;
  padding:0!important;
}
:root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell .games-section::before{
  content:"اختَر جوّكم";
  display:block;
  margin:0 2px 12px;
  color:#eee5f3;
  font-size:clamp(20px,2vw,28px);
  font-weight:950;
}
:root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell .games-grid{
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:14px!important;
}
:root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell .game-card{
  min-height:330px!important;
  position:relative!important;
  overflow:hidden!important;
  border:1px solid rgba(255,255,255,.09)!important;
  border-radius:28px!important;
  background:#160b28!important;
  box-shadow:0 18px 55px rgba(0,0,0,.25)!important;
  transform:translateZ(0);
  transition:transform .22s ease,border-color .22s ease,box-shadow .22s ease!important;
}
:root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell .game-card:hover{
  transform:translateY(-4px)!important;
  border-color:rgba(193,130,255,.30)!important;
  box-shadow:0 24px 65px rgba(0,0,0,.34),0 0 0 1px rgba(155,88,255,.06)!important;
}
:root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell .game-card .game-art{
  position:absolute!important;
  inset:0!important;
  width:100%!important;height:100%!important;
  object-fit:cover!important;
  transition:transform .45s cubic-bezier(.2,.8,.2,1),filter .3s ease!important;
}
:root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell .game-card:hover .game-art{
  transform:scale(1.035)!important;
  filter:saturate(1.05) contrast(1.03)!important;
}
:root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell .game-card .game-shade{
  position:absolute!important;
  inset:0!important;
  background:
    linear-gradient(180deg,rgba(4,2,9,.02) 24%,rgba(7,3,14,.28) 53%,rgba(7,3,14,.92) 100%),
    linear-gradient(90deg,rgba(8,4,14,.52),transparent 64%)!important;
}
:root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell .game-card-inner{
  position:absolute!important;
  inset:0!important;
  display:flex!important;
  align-items:flex-end!important;
  padding:20px!important;
}
:root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell .next-game-copy{
  width:min(70%,410px);
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:5px;
  text-align:right;
  position:relative;
  z-index:2;
}
:root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell .next-game-kicker{
  color:#d7c9e2;
  font-size:11px;
  font-weight:900;
}
:root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell .next-game-title{
  margin:0;
  color:#fff;
  font-size:clamp(26px,2.8vw,39px);
  line-height:1.05;
  font-weight:950;
  letter-spacing:-.8px;
}
:root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell .next-game-desc{
  margin:2px 0 0;
  color:#ddd3e4;
  font-size:12px;
  line-height:1.65;
}
:root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell .next-game-mode{
  display:inline-flex;
  min-height:27px;
  align-items:center;
  margin-top:5px;
  padding:5px 9px;
  border:1px solid rgba(255,255,255,.11);
  border-radius:999px;
  background:rgba(7,3,14,.36);
  color:#fff;
  font-size:10px;
  font-weight:850;
  backdrop-filter:blur(8px);
}
:root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell .game-card[data-game="fbrkha"] .next-game-mode{color:#ffe2f0;border-color:rgba(255,109,172,.24)}
:root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell .game-card[data-game="qadha"] .next-game-mode{color:#fff0ba;border-color:rgba(255,213,104,.25)}
:root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell .game-card[data-game="khaltaha"] .next-game-mode{color:#c8fbff;border-color:rgba(102,231,239,.24)}
:root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell .game-card[data-game="top10"] .next-game-mode{color:#e3d5ff;border-color:rgba(181,139,255,.28)}
:root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell .game-rules-link{
  position:absolute!important;
  top:16px!important;right:16px!important;
  min-height:38px!important;
  padding:7px 10px!important;
  border:1px solid rgba(255,255,255,.11)!important;
  border-radius:12px!important;
  background:rgba(7,4,14,.40)!important;
  color:#f3ebf7!important;
  backdrop-filter:blur(10px);
}
:root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell .game-go{
  position:absolute!important;
  left:18px!important;bottom:18px!important;
  width:52px!important;height:52px!important;
  display:grid!important;place-items:center!important;
  border:1px solid rgba(255,255,255,.12)!important;
  border-radius:17px!important;
  background:linear-gradient(135deg,var(--next-purple),#6f2bd2)!important;
  color:#fff!important;
  font-size:28px!important;
  box-shadow:0 12px 28px rgba(111,43,210,.28)!important;
}
:root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell .game-card .meta{
  display:none!important;
}

/* Secondary home blocks — cleaner, lower visual noise */
:root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell .feature-strip,
:root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell .mood-shell,
:root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell .visual-steps,
:root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell .benefits-grid,
:root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell .modern-community-strip,
:root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell .install-card,
:root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell .resume-card{
  border:1px solid rgba(255,255,255,.075)!important;
  background:linear-gradient(180deg,rgba(27,14,47,.69),rgba(15,8,28,.72))!important;
  box-shadow:0 18px 55px rgba(0,0,0,.19)!important;
  backdrop-filter:blur(12px);
}
:root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell .feature-strip{
  width:min(1260px,calc(100% - 28px))!important;
  margin:14px auto 0!important;
  border-radius:22px!important;
}
:root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell .mood-shell,
:root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell .visual-steps,
:root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell .benefits-grid,
:root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell .modern-community-strip{
  border-radius:28px!important;
}
:root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell .mood-options button{
  border-color:rgba(255,255,255,.085)!important;
  background:rgba(255,255,255,.035)!important;
}
:root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell .mood-options button:hover,
:root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell .mood-options button.selected{
  border-color:rgba(155,88,255,.36)!important;
  background:rgba(155,88,255,.11)!important;
}

/* Account / auth surface */
:root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell #authModal{
  background:rgba(5,2,10,.72)!important;
  backdrop-filter:blur(14px)!important;
}
:root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell #authModal .modal-card{
  width:min(520px,calc(100% - 24px))!important;
  max-height:min(760px,calc(100svh - 28px))!important;
  overflow:auto!important;
  padding:26px!important;
  border:1px solid rgba(255,255,255,.10)!important;
  border-radius:28px!important;
  background:
    radial-gradient(circle at 80% 0,rgba(155,88,255,.18),transparent 17rem),
    linear-gradient(180deg,rgba(31,16,54,.98),rgba(13,7,25,.98))!important;
  box-shadow:0 34px 100px rgba(0,0,0,.56)!important;
}
:root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell .platform-profile-hero{
  padding:14px!important;
  border:1px solid rgba(255,255,255,.075);
  border-radius:20px;
  background:rgba(255,255,255,.035);
}
:root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell .platform-profile-avatar{
  width:70px!important;height:70px!important;
  border-radius:22px!important;
  box-shadow:0 0 0 3px rgba(155,88,255,.18);
}
:root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell .auth-tabs{
  padding:4px!important;
  border:1px solid rgba(255,255,255,.075);
  border-radius:14px!important;
  background:rgba(255,255,255,.035)!important;
}
:root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell .auth-tabs button.active{
  background:linear-gradient(135deg,var(--next-purple),#7130d5)!important;
  color:#fff!important;
}
:root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell #accountAuthForm input{
  min-height:50px!important;
  border:1px solid rgba(255,255,255,.085)!important;
  border-radius:14px!important;
  background:rgba(255,255,255,.045)!important;
  color:#fff!important;
}
:root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell .notification-settings{
  border:1px solid rgba(255,255,255,.075)!important;
  border-radius:18px!important;
  background:rgba(255,255,255,.025)!important;
}

/* Unified game chrome */
:root[data-ui-mode="modern"] body.fbrkh-next-shell[data-game-brand] :is(.q-nav,.k-top,.t10-nav){
  border-color:rgba(255,255,255,.08)!important;
  background:rgba(12,7,23,.88)!important;
  box-shadow:0 12px 40px rgba(0,0,0,.23)!important;
  backdrop-filter:blur(18px) saturate(1.2)!important;
}
:root[data-ui-mode="modern"] body.fbrkh-next-shell[data-game-brand] :is(.q-nav,.k-top,.t10-nav) a,
:root[data-ui-mode="modern"] body.fbrkh-next-shell[data-game-brand] :is(.q-nav,.k-top,.t10-nav) button{
  min-height:44px;
}
:root[data-ui-mode="modern"] body.fbrkh-next-shell[data-game-brand="fbrkha"] .floating-utility-actions{
  gap:7px!important;
}
:root[data-ui-mode="modern"] body.fbrkh-next-shell[data-game-brand="fbrkha"] .floating-utility-actions>*{
  border:1px solid rgba(255,255,255,.09)!important;
  background:rgba(12,7,23,.82)!important;
  backdrop-filter:blur(14px)!important;
}

/* Fbrkha / Khaltaha shared lobby language */
:root[data-ui-mode="modern"] body.fbrkh-next-shell[data-game-brand="fbrkha"] .lobby-panel,
:root[data-ui-mode="modern"] body.fbrkh-next-shell[data-game-brand="fbrkha"] .lobby-join-card,
:root[data-ui-mode="modern"] body.fbrkh-next-shell[data-game-brand="khaltaha"] .lobby-shell{
  border:1px solid rgba(255,255,255,.09)!important;
  border-radius:28px!important;
  background:
    radial-gradient(circle at 80% 0,rgba(155,88,255,.13),transparent 18rem),
    linear-gradient(180deg,rgba(28,14,49,.92),rgba(13,7,25,.93))!important;
  box-shadow:0 24px 70px rgba(0,0,0,.34),inset 0 1px rgba(255,255,255,.035)!important;
}
:root[data-ui-mode="modern"] body.fbrkh-next-shell[data-game-brand="fbrkha"] :is(.room-code,.lobby-code),
:root[data-ui-mode="modern"] body.fbrkh-next-shell[data-game-brand="khaltaha"] .room-code{
  letter-spacing:.14em!important;
  color:#fff7da!important;
  text-shadow:0 0 22px rgba(255,213,104,.18)!important;
}
:root[data-ui-mode="modern"] body.fbrkh-next-shell[data-game-brand="fbrkha"] #qrWrap,
:root[data-ui-mode="modern"] body.fbrkh-next-shell[data-game-brand="khaltaha"] #zoomQr{
  padding:12px!important;
  border:1px solid rgba(255,255,255,.12)!important;
  border-radius:22px!important;
  background:#fff!important;
  box-shadow:0 16px 42px rgba(0,0,0,.28)!important;
}
:root[data-ui-mode="modern"] body.fbrkh-next-shell[data-game-brand="fbrkha"] :is(.player-card,.player-chip,.participant-card),
:root[data-ui-mode="modern"] body.fbrkh-next-shell[data-game-brand="khaltaha"] .player-chip{
  border:1px solid rgba(255,255,255,.08)!important;
  border-radius:16px!important;
  background:rgba(255,255,255,.045)!important;
}
:root[data-ui-mode="modern"] body.fbrkh-next-shell[data-game-brand="fbrkha"] .stage-players{
  border:1px solid rgba(255,255,255,.075)!important;
  border-radius:18px!important;
  background:rgba(13,7,25,.78)!important;
  backdrop-filter:blur(12px);
}

/* Initial game entries feel related without repainting live gameplay */
:root[data-ui-mode="modern"] body.fbrkh-next-shell[data-game-brand="fbrkha"].fbrkha-v2-home .brand-hero,
:root[data-ui-mode="modern"] body.fbrkh-next-shell[data-game-brand="qadha"] .qadha-initial-home,
:root[data-ui-mode="modern"] body.fbrkh-next-shell[data-game-brand="top10"] .top10-initial-shell{
  border:1px solid rgba(255,255,255,.08)!important;
  border-radius:30px!important;
  background:
    radial-gradient(circle at 78% 10%,rgba(155,88,255,.13),transparent 18rem),
    linear-gradient(180deg,rgba(27,14,47,.86),rgba(13,7,25,.85))!important;
  box-shadow:0 24px 70px rgba(0,0,0,.30)!important;
}
:root[data-ui-mode="modern"] body.fbrkh-next-shell[data-game-brand="fbrkha"] .home-action,
:root[data-ui-mode="modern"] body.fbrkh-next-shell[data-game-brand="qadha"] .qadha-initial-home .btn,
:root[data-ui-mode="modern"] body.fbrkh-next-shell[data-game-brand="top10"] .setup-card{
  border-color:rgba(255,255,255,.085)!important;
}

/* Mobile bottom nav */
:root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell .mobile-bottom-nav{
  left:10px!important;right:10px!important;bottom:max(9px,env(safe-area-inset-bottom))!important;
  width:auto!important;
  min-height:64px!important;
  padding:6px!important;
  border:1px solid rgba(255,255,255,.10)!important;
  border-radius:21px!important;
  background:rgba(12,7,23,.92)!important;
  box-shadow:0 20px 50px rgba(0,0,0,.42)!important;
  backdrop-filter:blur(20px)!important;
}

/* Responsive */
@media (max-width:900px){
  :root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell .home-hero{
    min-height:0!important;
    grid-template-columns:1fr!important;
    padding:46px 28px 36px!important;
  }
  :root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell .hero-copy{
    max-width:760px!important;
    align-items:center!important;
    text-align:center!important;
  }
  :root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell .home-hero h1,
  :root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell .hero h1,
  :root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell .hero-copy>.hero-lead{
    text-align:center!important;
    margin-inline:auto!important;
  }
  :root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell .hero-actions{
    justify-content:center!important;
  }
  :root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell .hero-join{
    margin-inline:auto!important;
  }
  :root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell .hero-card-stack{
    min-height:280px!important;
  }
  :root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell .stack-card{
    width:min(300px,76%)!important;
  }
}
@media (max-width:760px){
  :root[data-ui-mode="modern"] body.fbrkh-next-shell{padding-bottom:82px}
  :root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell .home-topbar{
    width:calc(100% - 16px)!important;
    margin-top:8px!important;
    min-height:62px!important;
    border-radius:19px!important;
    padding:7px 9px!important;
  }
  :root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell .home-topbar .brand-mark{
    width:132px!important;
  }
  :root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell .primary-nav{
    top:70px!important;
    left:8px!important;right:8px!important;
    padding:10px!important;
    border-radius:20px!important;
    background:rgba(12,7,23,.98)!important;
    box-shadow:0 26px 70px rgba(0,0,0,.48)!important;
  }
  :root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell .home-hero{
    width:calc(100% - 16px)!important;
    margin-top:8px!important;
    padding:38px 16px 26px!important;
    gap:18px!important;
    border-radius:26px!important;
  }
  :root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell .next-hero-kicker{
    font-size:10px;
    margin-bottom:12px;
  }
  :root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell .home-hero h1,
  :root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell .hero h1{
    max-width:100%!important;
    font-size:clamp(42px,12.4vw,59px)!important;
    line-height:1.07!important;
    letter-spacing:-1.3px!important;
  }
  :root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell .hero-copy>.hero-lead{
    margin-top:10px!important;
    font-size:13px!important;
    line-height:1.7!important;
  }
  :root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell .hero-actions{
    width:100%;
    margin-top:17px!important;
    flex-direction:column!important;
    gap:8px!important;
  }
  :root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell .hero-primary,
  :root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell .hero-secondary{
    width:100%!important;
    justify-content:center!important;
  }
  :root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell .hero-join{
    margin-top:13px!important;
  }
  :root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell .hero-join .join-input-row{
    grid-template-columns:minmax(0,1fr) auto!important;
  }
  :root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell .hero-join .join-people{display:none!important}
  :root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell .hero-card-stack{display:none!important}
  :root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell .games-section{
    width:calc(100% - 16px)!important;
    margin-top:12px!important;
  }
  :root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell .games-section::before{
    margin:0 2px 9px;
    font-size:20px;
  }
  :root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell .games-grid{
    grid-template-columns:1fr!important;
    gap:10px!important;
  }
  :root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell .game-card{
    min-height:248px!important;
    border-radius:22px!important;
  }
  :root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell .game-card-inner{
    padding:15px!important;
  }
  :root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell .next-game-copy{
    width:78%;
    gap:3px;
  }
  :root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell .next-game-title{
    font-size:27px;
  }
  :root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell .next-game-desc{
    font-size:10.5px;
    line-height:1.55;
  }
  :root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell .game-rules-link{
    top:12px!important;right:12px!important;
  }
  :root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell .game-go{
    left:13px!important;bottom:13px!important;
    width:46px!important;height:46px!important;
    border-radius:15px!important;
  }
  :root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell .feature-strip{
    width:calc(100% - 16px)!important;
  }
  :root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell #authModal .modal-card{
    width:calc(100% - 16px)!important;
    padding:20px 16px!important;
    border-radius:23px!important;
  }
}
@media (max-width:380px){
  :root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell .home-hero h1,
  :root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell .hero h1{
    font-size:39px!important;
  }
  :root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell .game-card{min-height:228px!important}
  :root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell .next-game-copy{width:80%}
  :root[data-ui-mode="modern"] .platform-home.fbrkh-next-shell .next-game-desc{display:none}
}

/* Accessibility */
:root[data-ui-mode="modern"].fbrkh-reduced-motion .fbrkh-next-shell *,
:root[data-ui-mode="modern"].a11y-reduced-motion .fbrkh-next-shell *{
  transition:none!important;
  animation:none!important;
  scroll-behavior:auto!important;
}
:root[data-ui-mode="modern"].fbrkh-high-contrast .fbrkh-next-shell{
  --next-line:rgba(255,255,255,.34);
}
