/* =====================================================================
   WinHelper Bot — own look on top of styles.css.
   1xbet-style navy & blue: solid blue app bars, white ID field,
   games as list rows, docked full-width tab bar.
   Loaded after styles.css, so equal selectors here win.
   ===================================================================== */

:root {
  --bg: #0a1f3d;
  --bg-deep: #071630;
  --panel: rgba(16, 48, 90, 0.9);
  --panel-border: rgba(120, 170, 235, 0.2);
  --text: #f3f8ff;
  --muted: #9fb6d3;
  --accent: #4c9dff;
  --accent-strong: #1f66b8;

  --wh-header-top: #2069bd;
  --wh-header-bottom: #174f92;
  --wh-surface: #10305a;
  --wh-surface-deep: #0d2748;
  --wh-tile: #14407a;
  --wh-line: rgba(120, 170, 235, 0.2);
  --wh-blue: #2f8cff;
  --wh-blue-deep: #1f6fd6;
  --wh-sky: #9fd0ff;
  --wh-green: #46d36a;
}

body {
  color: var(--text);
  background:
    radial-gradient(120% 55% at 50% -12%, rgba(38, 104, 190, 0.55) 0%, transparent 62%),
    linear-gradient(180deg, #0c2547 0%, #0a1f3d 46%, #071630 100%);
  background-attachment: fixed;
}

/* faint blueprint grid, same as on the bot posters */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.12;
  background-image:
    linear-gradient(rgba(140, 190, 255, 0.5) 1px, transparent 1px),
    linear-gradient(90deg, rgba(140, 190, 255, 0.5) 1px, transparent 1px);
  background-size: 28px 28px;
  -webkit-mask-image: radial-gradient(80% 60% at 50% 30%, #000 20%, transparent 80%);
  mask-image: radial-gradient(80% 60% at 50% 30%, #000 20%, transparent 80%);
}

/* Roboto everywhere on the app screens (game screens keep their fonts) */
#login-view,
#login-view *,
#menu-view,
#menu-view *,
.home-subview,
.home-subview *,
.app-tabbar,
.app-tabbar * {
  font-family: "Roboto", "Manrope", sans-serif;
}

@keyframes wh-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(70, 211, 106, 0.45); }
  50% { box-shadow: 0 0 0 5px rgba(70, 211, 106, 0); }
}

/* ---------------------------------------------------------------------
   Login: app bar -> giveaway banner -> ID card -> wins ticker
   --------------------------------------------------------------------- */
.login-card.wh-login {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 0 0 18px;
  border: 1px solid var(--wh-line);
  border-radius: 22px;
  background: linear-gradient(180deg, #0f2b52 0%, #0b2142 100%);
  box-shadow: 0 24px 60px rgba(2, 10, 24, 0.55);
}

body.is-telegram-mini-app .login-card.wh-login {
  padding-top: 0;
}

.wh-login .login-card__glow,
.wh-login #brand-eyebrow {
  display: none;
}

.wh-appbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  background: linear-gradient(180deg, var(--wh-header-top), var(--wh-header-bottom));
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 20px rgba(3, 14, 32, 0.35);
}

body.is-telegram-mini-app .wh-appbar {
  padding-top: calc(var(--mini-app-header-clearance) + 14px);
}

.wh-appbar__logo {
  display: block;
  width: 38px;
  height: 38px;
  filter: drop-shadow(0 4px 10px rgba(2, 18, 52, 0.45));
}

.wh-appbar__brand {
  color: #ffffff;
  font-size: 1.22rem;
  font-weight: 900;
  letter-spacing: -0.01em;
}

.wh-appbar__brand b {
  color: var(--wh-sky);
  font-weight: 900;
}

.wh-appbar__live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.wh-appbar__live i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--wh-green);
  animation: wh-pulse 1.6s ease-in-out infinite;
}

.wh-login .giveaway-panel {
  gap: 0;
  margin: 0 14px;
  padding: 0;
  border: 1px solid var(--wh-line);
  border-radius: 18px;
  background: var(--wh-surface-deep);
  box-shadow: none;
  overflow: hidden;
}

.wh-login .giveaway-panel__media,
.wh-login .giveaway-panel__image {
  border-radius: 0;
}

.wh-login .giveaway-panel__content {
  padding: 12px 14px 14px;
}

.wh-login .giveaway-panel__kicker {
  color: var(--wh-sky);
  letter-spacing: 0.12em;
}

.wh-login .giveaway-panel__note,
.wh-login .giveaway-panel__timer-shell {
  border-color: rgba(120, 170, 235, 0.22);
  background: var(--wh-surface);
  color: #d9ecff;
}

.wh-login .giveaway-timer__item {
  border: 1px solid rgba(120, 170, 235, 0.28);
  border-radius: 10px;
  background: var(--wh-tile);
}

.wh-login .giveaway-timer__value {
  color: #ffffff;
}

.wh-login .login-form {
  margin: 0 14px;
  padding: 16px;
  border: 1px solid var(--wh-line);
  border-radius: 18px;
  background: var(--wh-surface);
}

.wh-login .field-label {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 500;
}

.wh-login .input-shell {
  border-radius: 12px;
  box-shadow: none;
}

.wh-login .id-input {
  padding: 15px 16px;
  border: 2px solid transparent;
  border-radius: 12px;
  background: #ffffff;
  color: #0a1f3d;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.wh-login .id-input::placeholder {
  color: #8aa0bd;
}

.wh-login .id-input:focus {
  border-color: var(--wh-blue);
  box-shadow: 0 0 0 4px rgba(47, 140, 255, 0.25);
}

.wh-login .submit-button {
  min-height: 52px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, #3d9bff, #1a62d1);
  color: #ffffff;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.32),
    0 12px 26px rgba(26, 98, 209, 0.45);
}

.wh-login .submit-button:disabled {
  background: #23497a;
  color: rgba(255, 255, 255, 0.5);
  box-shadow: none;
}

.wh-login .wins-marquee {
  margin: 0 14px;
  border: 0;
  border-radius: 14px;
  background: var(--wh-surface-deep);
}

.wh-login .telegram-browser-warning,
.wh-login .status-panel {
  margin-left: 14px;
  margin-right: 14px;
}

/* ---------------------------------------------------------------------
   Home: blue app bar, one stat strip, games as list rows
   --------------------------------------------------------------------- */
#menu-view.menu-shell--v2 {
  padding: 0 0 calc(var(--mini-app-safe-bottom) + 96px);
  border: 1px solid var(--wh-line);
  border-radius: 22px;
  background: linear-gradient(180deg, #0f2b52 0%, #0a1f3d 100%);
}

body.is-telegram-mini-app #menu-view.menu-shell--v2 {
  padding-top: 0;
}

#menu-view .home-hero {
  margin: 0;
  padding: 16px 18px 18px;
  border: 0;
  border-radius: 0;
  background: linear-gradient(180deg, var(--wh-header-top), var(--wh-header-bottom));
  box-shadow: 0 8px 20px rgba(3, 14, 32, 0.35);
}

body.is-telegram-mini-app #menu-view .home-hero {
  padding-top: calc(var(--mini-app-header-clearance) + 12px);
}

#menu-view .home-hero::before,
#menu-view .home-hero::after,
#menu-view .home-hero__glow,
#menu-view .home-hero__emblem {
  display: none;
}

#menu-view .home-hero__logo {
  display: block;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 0;
  background: none;
  filter: drop-shadow(0 4px 10px rgba(2, 18, 52, 0.45));
}

#menu-view .home-hero__brandname {
  color: #ffffff;
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: -0.01em;
  text-transform: none;
}

#menu-view .home-hero__brandname b {
  color: var(--wh-sky);
  font-weight: 900;
}

#menu-view .home-id-chip {
  border: 0;
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

#menu-view .home-status,
#menu-view .home-status__text {
  color: #d9ecff;
}

#menu-view .home-status__dot {
  background: var(--wh-green);
  box-shadow: none;
  animation: wh-pulse 1.6s ease-in-out infinite;
}

#menu-view .home-logout {
  border: 0;
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

#menu-view .home-stats {
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin: 14px 14px 0;
  border: 1px solid var(--wh-line);
  border-radius: 16px;
  background: var(--wh-surface);
  overflow: hidden;
}

#menu-view .home-stat {
  padding: 12px 14px;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
}

#menu-view .home-stat + .home-stat {
  border-left: 1px solid var(--wh-line);
}

#menu-view .home-stat__spark {
  display: none;
}

#menu-view .home-stat__icon {
  border: 0;
  background: rgba(47, 140, 255, 0.18);
  color: var(--wh-sky);
}

#menu-view .home-stat__value {
  color: #ffffff;
}

#menu-view .games-grid {
  grid-template-columns: 1fr;
  gap: 10px;
  margin: 14px 14px 0;
}

#menu-view .game-card,
#menu-view .game-card__inner {
  min-height: 100px;
}

#menu-view .game-card {
  border: 1px solid var(--wh-line);
  border-radius: 16px;
  background: var(--wh-surface);
  box-shadow: none;
}

#menu-view .game-card:hover {
  transform: none;
  border-color: rgba(120, 170, 235, 0.42);
}

#menu-view .game-card__face--front {
  flex-direction: row;
  align-items: center;
  gap: 10px;
  padding: 12px 12px 12px 122px;
  background: var(--wh-surface);
}

#menu-view .game-card__face--front::after {
  display: none;
}

/* the cover art becomes a thumbnail on the left */
#menu-view .games-grid .game-card__bg {
  inset: 10px auto 10px 10px;
  width: 100px;
  border-radius: 12px;
  opacity: 1;
  filter: none;
  box-shadow:
    0 0 0 1px rgba(159, 208, 255, 0.22),
    0 6px 14px rgba(2, 12, 32, 0.45);
}

#menu-view .game-card__body {
  flex: 1;
  min-width: 0;
  gap: 4px;
}

#menu-view .game-card__badge {
  border-color: rgba(70, 211, 106, 0.42);
  border-radius: 6px;
  background: rgba(70, 211, 106, 0.14);
  color: #6be488;
}

#menu-view .game-card .game-card__body .game-card__title {
  font-size: 1.06rem;
  font-weight: 700;
  text-shadow: none;
}

#menu-view .game-card__acc-label {
  color: var(--muted);
  text-shadow: none;
}

#menu-view .game-card__accuracy {
  color: var(--wh-sky);
  text-shadow: none;
}

#menu-view .game-card__open {
  flex: none;
  width: auto;
  margin: 0;
  padding: 10px 15px;
  border-radius: 999px;
  background: linear-gradient(180deg, #3d9bff, #1a62d1);
  color: #ffffff;
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.3),
    0 8px 18px rgba(26, 98, 209, 0.4);
}

#menu-view .games-grid .game-card__lock-badge {
  top: 14px;
  right: auto;
  left: 14px;
}

/* ---------------------------------------------------------------------
   Sub-screens and the docked tab bar
   --------------------------------------------------------------------- */
.home-subview {
  border: 1px solid var(--wh-line);
  border-radius: 22px;
  background: linear-gradient(180deg, #0f2b52 0%, #0a1f3d 100%);
}

.app-tabbar {
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  transform: none;
  gap: 0;
  padding: 6px 8px calc(var(--mini-app-safe-bottom) + 8px);
  border: 0;
  border-top: 1px solid var(--wh-line);
  border-radius: 0;
  background: var(--wh-surface-deep);
  box-shadow: 0 -10px 26px rgba(3, 12, 28, 0.45);
}

.app-tabbar.is-sliding {
  scale: 1;
}

.app-tab {
  position: relative;
  border: 0;
  border-radius: 0;
  background: none;
  color: var(--muted);
}

.app-tab:hover {
  transform: none;
}

.app-tab.is-active {
  border: 0;
  background: none;
  box-shadow: none;
  color: #ffffff;
  transform: none;
}

.app-tab.is-active .app-tab__icon {
  color: var(--accent);
}

.app-tab.is-active::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 28%;
  right: 28%;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: var(--wh-blue);
}
