/* SmilhY Dice v4.9.5 — coherent premium action bar.
   Presentation-only: existing auth, wallet, support and Supabase handlers preserved. */

/* One tokenized control system: 44px, radius 12px, 8px rhythm. */
.site-header {
  --hdr-control-h: 44px;
  --hdr-control-gap: 8px;
  --hdr-control-radius: 12px;
}
.header-toolcluster {
  display:flex;
  align-items:center;
  justify-content:flex-end;
  flex:0 0 auto;
  min-width:0;
  gap:var(--hdr-control-gap);
  margin-left:auto;
}
.header-toolcluster .community-header-actions,
.header-toolcluster .header-actions {
  display:flex;
  flex:0 0 auto;
  align-items:center;
  margin:0;
  gap:var(--hdr-control-gap);
}
.header-toolcluster .community-header-btn,
.header-toolcluster .wallet-switcher .wallet-trigger,
.header-toolcluster #deposit-button,
.header-toolcluster .notification-btn,
.header-toolcluster #account-button,
.header-toolcluster #signup-button {
  box-sizing:border-box;
  height:var(--hdr-control-h);
  min-height:var(--hdr-control-h);
  max-height:var(--hdr-control-h);
  border-radius:var(--hdr-control-radius);
  position:relative;
  flex-shrink:0;
  font-family:inherit;
  font-weight:750;
  line-height:1.05;
  transform:none;
  letter-spacing:-.01em;
  transition:background .18s ease,border-color .18s ease,box-shadow .18s ease,filter .18s ease;
}
.header-toolcluster .community-header-btn,
.header-toolcluster .notification-btn,
.header-toolcluster #account-button,
.header-toolcluster .wallet-switcher .wallet-trigger {
  border:1px solid rgba(125,167,244,.39);
  background:linear-gradient(145deg,rgba(94,129,200,.20) 0%,rgba(31,54,106,.31) 35%,rgba(9,24,55,.84) 100%);
  box-shadow:inset 0 1px 0 rgba(242,249,255,.18),inset 0 -1px 0 rgba(8,16,45,.4),0 6px 16px rgba(0,0,0,.15);
  color:#f0f7ff;
  backdrop-filter:blur(14px) saturate(1.22);
  -webkit-backdrop-filter:blur(14px) saturate(1.22);
}
.header-toolcluster .community-header-btn::before,
.header-toolcluster .notification-btn::before,
.header-toolcluster #account-button::before,
.header-toolcluster .wallet-switcher .wallet-trigger::before {
  content:"";
  position:absolute;
  pointer-events:none;
  inset:0 10% auto;
  height:1px;
  border-radius:inherit;
  background:linear-gradient(90deg,transparent,rgba(227,249,255,.38),transparent);
}
.header-toolcluster .community-header-btn {
  gap:7px;
  padding:0 12px;
  min-width:93px;
  justify-content:center;
}
.header-toolcluster .community-btn-ico,
.header-toolcluster .community-header-btn.support-pill .community-btn-ico {
  display:grid;
  place-items:center;
  width:19px;
  height:20px;
  line-height:1;
  font-size:18px;
}
.header-toolcluster .community-btn-label {font-size:12px;line-height:1;font-weight:750;}
.header-toolcluster .wallet-switcher .wallet-trigger {
  display:flex;
  align-items:center;
  gap:9px;
  width:191px;
  min-width:191px;
  padding:0 10px;
}
.header-toolcluster .wallet-switcher .wallet-coin {
  flex:0 0 29px;
  width:29px;
  height:29px;
  font-size:15px;
  border-radius:50%;
}
.header-toolcluster .wallet-switcher .wallet-text strong {
  font-size:12px;
  font-weight:800;
  white-space:nowrap;
  line-height:1.1;
}
.header-toolcluster .wallet-switcher .wallet-text small{font-size:9px;line-height:1.2;}
.header-toolcluster .wallet-chevron {font-size:16px;}
.header-toolcluster #deposit-button {
  min-width:103px;
  padding:0 17px;
  font-size:12px;
  border:1px solid rgba(201,255,238,.62);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.54),0 5px 20px rgba(16,247,171,.24),0 0 14px rgba(26,238,173,.14);
}
.header-toolcluster .notification-btn {
  display:grid;
  place-items:center;
  padding:0;
  width:44px;
  min-width:44px;
  border-radius:var(--hdr-control-radius);
  background:linear-gradient(145deg,rgba(60,89,166,.33),rgba(11,29,64,.85));
}
.header-toolcluster .notification-btn svg {width:20px;height:20px;}
.header-toolcluster .notification-dot {top:8px;right:8px;}
.header-toolcluster #account-button {min-width:76px;max-width:155px;padding:0 13px;font-size:12px;overflow:hidden;text-overflow:ellipsis;}
.header-toolcluster #signup-button {min-width:78px;padding:0 13px;font-size:12px;}
.header-toolcluster .community-header-btn:hover,
.header-toolcluster .notification-btn:hover,
.header-toolcluster #account-button:hover,
.header-toolcluster .wallet-switcher .wallet-trigger:hover {
  border-color:rgba(111,242,229,.76);
  background:linear-gradient(145deg,rgba(66,113,171,.34),rgba(14,38,77,.90));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.24),0 0 17px rgba(58,178,239,.18);
}
.header-toolcluster #deposit-button:hover,
.header-toolcluster #signup-button:hover {filter:brightness(1.065);}
.header-toolcluster button:focus-visible {outline:2px solid #79ffe2;outline-offset:3px;}

/* Large monitor: one horizontal line. Desktop nav retains first priority. */
@media (min-width:1850px) {
  .site-header{min-height:76px;gap:12px;padding-left:24px;padding-right:24px;}
  .desktop-nav{min-width:0;margin-left:8px;flex:1;gap:0;}
  .desktop-nav .nav-link{padding-left:11px;padding-right:11px;font-size:clamp(11px,.7vw,14px);}
  .header-toolcluster{margin-left:auto;}
  .guest-community-row{display:none;}
}

/* Typical laptop/desktop: two clearly aligned rows instead of cramped buttons. */
@media (min-width:901px) and (max-width:1849px) {
  .site-header {
    display:grid;
    grid-template-columns:auto minmax(0,1fr);
    grid-template-rows:58px 55px;
    column-gap:12px;
    row-gap:0;
    min-height:113px;
    padding:0 18px;
  }
  .site-header .brand{grid-column:1;grid-row:1;align-self:center;}
  .site-header .desktop-nav {
    grid-column:2;grid-row:1;
    align-self:center;
    margin-left:0;
    min-width:0;
    width:100%;
    justify-content:flex-end;
    flex:0 1 auto;
    gap:0;
  }
  .site-header .desktop-nav .nav-link {padding:10px clamp(6px,.70vw,12px);font-size:clamp(10px,.72vw,13px);}
  .site-header .public-player-stats{display:none!important;}
  .site-header .header-toolcluster {
    grid-column:1/-1;grid-row:2;
    width:100%;
    align-self:center;
    margin:0;
    padding:6px 0 8px;
    min-width:0;
    justify-content:flex-end;
    border-top:1px solid rgba(114,150,230,.16);
  }
  .header-toolcluster .community-header-actions{display:flex!important;}
  .guest-community-row>.community-compact-actions{display:none!important;}
  .guest-community-row:has(>.public-stats-strip[hidden]){display:none!important;}
  .guest-community-row>.public-stats-strip {padding:0;border:0;background:transparent;}
}

/* Narrow desktop: tool sizes remain 44px, adjust *width* and gaps only. */
@media (min-width:901px) and (max-width:1180px) {
  .site-header{padding:0 14px;grid-template-rows:56px 54px;min-height:110px;}
  .header-toolcluster{--hdr-control-gap:6px;}
  .header-toolcluster .community-header-btn{min-width:85px;padding:0 9px;}
  .header-toolcluster .wallet-switcher .wallet-trigger {width:166px;min-width:166px;}
  .header-toolcluster #deposit-button {min-width:90px;padding:0 10px;}
  .header-toolcluster #account-button {min-width:69px;max-width:125px;padding:0 9px;}
  .header-toolcluster #signup-button {min-width:72px;padding:0 9px;}
}

/* Tablet and phone: keep existing accessible mobile menu and wallet flow. */
@media (max-width:900px) {
  .site-header {display:flex;align-items:center;min-height:64px;gap:10px;padding:0 15px;}
  .site-header .desktop-nav{display:none!important;}
  .site-header .header-toolcluster{margin-left:auto;gap:0;}
  .header-toolcluster .community-header-actions{display:none!important;}
  .header-toolcluster .header-actions{gap:8px;}
  .header-toolcluster .desktop-only{display:none!important;}
  .header-toolcluster .mobile-menu-button {
    display:grid;
    place-items:center;
    width:44px;
    height:44px;
    border-radius:12px;
    color:#eaf6ff;
    border:1px solid rgba(125,167,244,.39);
    background:linear-gradient(145deg,rgba(94,129,200,.20),rgba(9,24,55,.84));
    box-shadow:inset 0 1px 0 rgba(242,249,255,.18),0 6px 16px rgba(0,0,0,.15);
  }
  .header-toolcluster #deposit-button{height:44px;min-height:44px;min-width:90px;}
  .header-toolcluster .wallet-switcher .wallet-trigger{height:44px;min-height:44px;width:176px;min-width:176px;}
  .guest-community-row>.community-compact-actions{display:flex!important;}
}
@media (max-width:650px) {
  .site-header {min-height:62px;padding:0 12px;}
  .header-toolcluster .header-actions{gap:7px;}
  .header-toolcluster #deposit-button{min-width:82px;padding:0 11px;font-size:11px;}
  .header-toolcluster .wallet-switcher{display:none!important;}
  .header-toolcluster .mobile-menu-button{width:44px;height:44px;}
}
@media (max-width:359px) {
  .site-header{padding:0 9px;gap:5px;}
  .brand{font-size:17px;}
  .brand-icon.brand-logo{width:25px;height:25px;}
  .header-toolcluster #deposit-button{min-width:76px;padding:0 7px;}
}
@media (prefers-reduced-motion:reduce) {
  .header-toolcluster button{transition:none!important;}
}
