:root {
  --bg: #08050d;
  --panel: #110b1a;
  --panel2: #191025;
  --line: #49315f;
  --pink: #ff168f;
  --pink2: #9c20ff;
  --text: #fffaf0;
  --muted: #bcb3ce;
  --gold: #ffd34e;
  --violet: #5c18b9;
  --ms-shadow: 0 20px 58px rgba(0, 0, 0, .42);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: #08050d; }
body {
  margin: 0;
  min-width: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 22% -8%, rgba(183, 18, 151, .21), transparent 31rem),
    radial-gradient(circle at 80% 8%, rgba(88, 23, 180, .2), transparent 34rem),
    linear-gradient(180deg, #08050d, #0d0715 58%, #07040c);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  overflow-x: hidden;
}
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.site-header,
.site-header * { box-sizing: border-box; }
.site-header {
  position: sticky;
  top: 0;
  z-index: 70;
  width: 100%;
  min-height: 76px;
  margin: 0;
  padding: 9px clamp(18px, 2.5vw, 44px);
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 32px);
  border-bottom: 1px solid #f62d9e;
  background: rgba(9, 5, 15, .94);
  box-shadow: 0 9px 32px rgba(0, 0, 0, .45), 0 1px 18px rgba(255, 27, 151, .18);
  backdrop-filter: blur(18px);
}
.site-header .brand { position: relative; display: flex; width: clamp(190px, 15vw, 210px); height: 66px; flex: 0 0 auto; overflow: hidden; }
.site-header .brand img { position: absolute; top: 50%; left: 0; display: block; width: min(100%, 200px); max-width: none; height: auto; transform: translateY(-50%); filter: drop-shadow(0 0 12px rgba(255, 22, 143, .22)); }
.desktop-nav { display: flex; align-items: center; gap: 5px; margin-right: auto; }
.desktop-nav button,
.desktop-nav a {
  min-height: 44px;
  padding: 0 15px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 22px;
  background: transparent;
  color: #eee9f7;
  text-decoration: none;
  font-weight: 780;
  cursor: pointer;
}
.desktop-nav button:hover,
.desktop-nav a:hover,
.desktop-nav button.active { border-color: #d632bd; background: linear-gradient(110deg, rgba(150, 27, 207, .34), rgba(255, 24, 140, .18)); color: #fff; }
.header-actions { display: flex; align-items: center; gap: 10px; margin-left: 0; }
.login-button,
.register-button,
.balance-button,
.deposit-button,
.profile-button {
  min-height: 45px;
  padding: 0 18px;
  border: 1px solid #5d4774;
  border-radius: 13px;
  color: #fff;
  font-weight: 850;
  cursor: pointer;
}
.login-button { background: #17101f; }
.register-button { background: linear-gradient(115deg, #ff1f65, #d80055); border-color: #ff5f91; box-shadow: 0 0 20px rgba(255, 17, 102, .25); }
.deposit-button { display: inline-flex; align-items: center; gap: 7px; background: linear-gradient(115deg, #ff245f, #d1004d); border-color: #ff5e8c; }
.balance-button { display: grid; grid-template-columns: auto auto; align-items: center; gap: 7px; background: #120d1d; color: var(--gold); }
.balance-button span { color: #bdb5cd; font-size: 10px; text-transform: uppercase; }
.profile-button { display: flex; align-items: center; gap: 9px; background: #17101f; }
.profile-button span { display: grid; place-items: center; width: 29px; height: 29px; border-radius: 50%; background: #eee8ff; color: #241739; }
.profile-button b { white-space: nowrap; }
.hidden { display: none !important; }

main { width: min(1640px, calc(100% - 36px)); max-width: none; margin: 20px auto 0; padding: 0 0 52px; }
.ms-hero {
  position: relative;
  min-height: clamp(310px, 28vw, 450px);
  padding: clamp(32px, 4vw, 68px);
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(330px, .92fr) 185px;
  align-items: center;
  gap: 24px;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid #a52283;
  border-radius: 24px;
  background:
    radial-gradient(circle at 62% 50%, rgba(255, 23, 95, .32), transparent 26%),
    radial-gradient(circle at 78% 20%, rgba(170, 20, 255, .3), transparent 32%),
    linear-gradient(105deg, #210819 0%, #11071c 42%, #310837 72%, #160819 100%);
  box-shadow: var(--ms-shadow), inset 0 0 80px rgba(255, 26, 130, .08);
}
.ms-hero::before,
.ms-hero::after { content: ""; position: absolute; z-index: -1; border: 2px solid rgba(255, 194, 55, .22); border-radius: 50%; transform: rotate(-17deg); }
.ms-hero::before { width: 520px; height: 160px; right: 19%; bottom: -45px; box-shadow: 0 0 25px rgba(255, 24, 141, .22); }
.ms-hero::after { width: 330px; height: 330px; right: 28%; top: -108px; border-color: rgba(231, 42, 195, .18); }
.ms-hero-copy { min-width: 0; }
.ms-hero-copy > p { margin: 0 0 8px; color: #ffcc43; font-size: clamp(11px, 1vw, 15px); font-weight: 900; letter-spacing: .22em; text-transform: uppercase; }
.ms-hero-copy h1 { max-width: 700px; margin: 0; font-size: clamp(36px, 4.4vw, 74px); line-height: .92; letter-spacing: -.045em; text-transform: uppercase; text-shadow: 0 6px 30px #000; }
.ms-hero-copy h1 strong { display: block; color: var(--gold); font-size: 1.13em; text-shadow: 0 2px 0 #8f4b00, 0 0 28px rgba(255, 174, 31, .35); }
.ms-hero-copy h2 { margin: 9px 0 22px; font-size: clamp(19px, 2vw, 32px); font-style: italic; letter-spacing: .07em; text-transform: uppercase; }
.ms-hero-copy ul { margin: 0 0 26px; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 21px; list-style: none; color: #e5dceb; font-weight: 800; text-transform: uppercase; }
.ms-hero-copy li::before { content: "◆"; margin-right: 7px; color: var(--gold); }
.hero-cta { min-height: 50px; padding: 0 28px; border: 1px solid #fff0a2; border-radius: 13px; background: linear-gradient(180deg, #ffe55e, #f7a800); color: #351500; font-weight: 950; text-transform: uppercase; box-shadow: 0 0 26px rgba(255, 190, 38, .27); cursor: pointer; }
.hero-cta:hover { filter: brightness(1.08); transform: translateY(-1px); }
.ms-hero-mark { min-width: 0; display: grid; place-items: center; text-align: center; }
.ms-hero-mark img { width: min(100%, 570px); max-height: 255px; object-fit: contain; filter: drop-shadow(0 18px 24px rgba(0, 0, 0, .55)); }
.ms-hero-mark span { margin-top: -12px; color: #e6d9ef; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.ms-hero-values { align-self: stretch; padding: 24px 17px; display: grid; align-content: center; gap: 17px; border: 1px solid #56336d; border-radius: 18px; background: rgba(10, 6, 15, .72); box-shadow: inset 0 0 20px rgba(255, 18, 141, .08); }
.ms-hero-values span { display: block; font-weight: 900; text-transform: uppercase; }

.ms-rooms,
.ms-live,
.ms-service { margin-top: 22px; padding: 20px; border: 1px solid #30203f; border-radius: 20px; background: linear-gradient(145deg, rgba(23, 13, 33, .96), rgba(10, 7, 16, .96)); box-shadow: 0 16px 46px rgba(0, 0, 0, .25); }
.ms-section-heading { margin-bottom: 16px; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.ms-section-heading > div { display: flex; align-items: center; gap: 13px; }
.ms-section-heading > div > span { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; background: linear-gradient(135deg, #ffdf47, #f08b00); color: #4d2000; font-size: 23px; }
.ms-section-heading h2 { margin: 0; font-size: clamp(20px, 2vw, 28px); text-transform: uppercase; }
.ms-section-heading p { margin: 3px 0 0; color: var(--muted); }
.ms-section-heading small { color: #5cffb1; font-weight: 850; }
.ms-room-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; }
.ms-room-card { position: relative; min-width: 0; min-height: 180px; padding: 19px; display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-end; overflow: hidden; border: 1px solid #70408f; border-radius: 18px; color: #fff; text-decoration: none; box-shadow: inset 0 0 42px rgba(255, 255, 255, .03); transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.ms-room-card::after { content: ""; position: absolute; inset: 0; z-index: 0; background: linear-gradient(180deg, transparent 30%, rgba(4, 2, 8, .92)); pointer-events: none; }
.ms-room-card > * { position: relative; z-index: 1; }
.ms-room-card img { align-self: center; width: 86%; height: 88px; margin: auto 0 10px; object-fit: contain; filter: drop-shadow(0 6px 12px rgba(0, 0, 0, .65)); }
.ms-room-card span { margin-bottom: 8px; padding: 4px 8px; border-radius: 7px; background: rgba(7, 4, 12, .7); color: #ddd4e8; font-size: 10px; font-weight: 900; text-transform: uppercase; }
.ms-room-card strong { align-self: stretch; min-height: 38px; display: grid; place-items: center; border: 1px solid currentColor; border-radius: 10px; background: rgba(5, 3, 9, .58); text-transform: uppercase; }
.ms-room-card:hover { transform: translateY(-3px); border-color: var(--gold); box-shadow: 0 12px 30px rgba(0, 0, 0, .38), 0 0 28px rgba(255, 25, 143, .16); }
.ms-room-card.celu { background: radial-gradient(circle at 50% 20%, #7b175e, transparent 55%), #2a0629; color: #ff5fbd; }
.ms-room-card.ganamos { background: radial-gradient(circle at 50% 20%, #4725ac, transparent 55%), #17093d; color: #bd82ff; }
.ms-room-card.tio { background: radial-gradient(circle at 50% 20%, #9a2108, transparent 55%), #310b07; color: #ff6d32; }
.ms-room-card.betados { background: radial-gradient(circle at 50% 20%, #6622a9, transparent 55%), #1c0a35; color: #b96dff; }

.ms-live-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 11px; }
.ms-live-grid button { min-height: 130px; padding: 17px 12px; display: grid; place-items: center; align-content: center; gap: 4px; border: 1px solid #3b2850; border-radius: 15px; background: radial-gradient(circle at 50% 10%, rgba(255, 36, 151, .15), transparent 52%), #100a18; color: #fff; cursor: pointer; }
.ms-live-grid button:hover { border-color: var(--gold); background-color: #1a0c22; }
.ms-live-grid button > span { color: var(--gold); font-size: 31px; line-height: 1; }
.ms-live-grid button strong { font-size: 14px; }
.ms-live-grid button small { color: var(--muted); }

.provider-rail { margin: 22px 0 0; border-color: #30203f; background: #100a18; }
.provider-all { border-color: #e45bb8; background: #2b0c29; color: #ffd94c; }
.provider-tab.active .provider-logo,
.provider-tab:hover .provider-logo { border-color: var(--pink); box-shadow: 0 0 18px rgba(255, 24, 143, .2); }
.games-section { margin-top: 22px; padding: 22px; border: 1px solid #30203f; border-radius: 20px; background: rgba(12, 7, 18, .78); }
.section-heading h2 { color: #fff; }
.pink-bar { background: linear-gradient(#ffd84a, #ff168f); }
.search-box { border-color: #49315f; background: #100a18; }
.category-chip.active,
.category-chip:hover { border-color: #ff3aac; background: #451047; }
.games-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 14px; }
.game-card { min-width: 0; overflow: hidden; border: 1px solid #342544; border-radius: 14px; background: #120c19; }
.game-card > img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.game-card-info { padding: 10px; }
.game-card:hover { border-color: #ff36a8; box-shadow: 0 0 25px rgba(255, 21, 147, .17); }
.play-overlay { background: rgba(173, 24, 151, .72); }
.primary-submit { background: linear-gradient(110deg, #ff2a7c, #9d25f5); color: #fff; }

.ms-service { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.ms-service article { min-width: 0; padding: 18px; display: flex; gap: 14px; border: 1px solid #2d203a; border-radius: 14px; background: #100a18; }
.ms-service article > span { font-size: 27px; }
.ms-service strong { display: block; }
.ms-service p { margin: 4px 0; color: var(--muted); font-size: 13px; }
.ms-service button { padding: 7px 12px; border: 1px solid #e6ad36; border-radius: 9px; background: transparent; color: #ffd24a; font-weight: 800; cursor: pointer; }

footer { width: 100%; margin: 0; padding: 25px clamp(18px, 3vw, 48px) calc(25px + env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 25px; border-top: 1px solid #332142; background: #08050d; color: #938ba0; }
footer > img { width: 180px; height: 58px; object-fit: contain; }
footer p { margin: 0 auto 0 0; }
footer nav { display: flex; align-items: center; gap: 13px; }
footer a, footer button { border: 0; background: transparent; color: #c6bdd3; text-decoration: none; }

.modal-backdrop { z-index: 140; }
.modal { z-index: 150; border-color: #613878; background: #171021; box-shadow: 0 25px 80px #000a, 0 0 35px rgba(235, 39, 175, .16); }
.auth-dialog { width: min(560px, calc(100vw - 28px)); max-height: calc(100dvh - 28px); padding: 0; overflow-x: hidden; overflow-y: auto; border-radius: 24px; }
.multisala-auth-banner { min-height: 155px; display: grid; place-items: center; border-bottom: 1px solid #4b2a60; background: radial-gradient(circle, rgba(255, 28, 142, .24), transparent 52%), linear-gradient(130deg, #260a2a, #12081d); }
.multisala-auth-banner img { width: min(360px, 75%); max-height: 128px; object-fit: contain; filter: drop-shadow(0 10px 18px #000); }
.auth-dialog .auth-panel { padding: 28px 42px 34px; }
.auth-mode-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 0 0 22px; padding: 5px; border: 1px solid #4b3460; border-radius: 13px; background: #0f0916; }
.auth-mode-tab { min-height: 44px; border: 0; border-radius: 9px; background: transparent; color: #d9cee3; font: inherit; font-weight: 900; cursor: pointer; }
.auth-mode-tab.active { background: linear-gradient(110deg, #ff286f, #a320e9); color: #fff; }
.input-shell { border-color: #4b3460; background: #0f0a15; }
.auth-switch button { color: #ff6abc; }

.mobile-bottom-nav { border-top-color: #56346a; background: rgba(12, 7, 18, .96); }
.mobile-bottom-nav button.active { color: #ffd746; }
.multisala-actions { z-index: 130; }

@media (max-width: 1280px) {
  .desktop-nav button, .desktop-nav a { padding-inline: 10px; font-size: 13px; }
  .header-actions { gap: 6px; }
  .login-button, .register-button, .balance-button, .deposit-button, .profile-button { padding-inline: 12px; }
  .ms-hero { grid-template-columns: 1.1fr .9fr; }
  .ms-hero-values { display: none; }
  .games-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

@media (max-width: 980px) {
  .desktop-nav { display: none; }
  .site-header .brand { margin-right: auto; }
  .ms-room-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ms-live-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .games-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  body { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  .site-header { min-height: 62px; padding: 6px 10px; gap: 7px; }
  .site-header .brand { width: min(39vw, 160px); }
  .site-header .brand { height: 46px; }
  .site-header .brand img { width: 100%; }
  .hamburger { display: grid; flex: 0 0 38px; }
  .header-actions { margin-left: auto; }
  .deposit-button, .balance-button, .profile-button b { display: none !important; }
  .login-button, .register-button { min-height: 38px; padding: 0 10px; font-size: 10px; border-radius: 10px; }
  .profile-button { width: 38px; min-height: 38px; padding: 3px; border-radius: 50%; }
  main { width: calc(100% - 18px); margin-top: 10px; padding-bottom: 20px; }
  .ms-hero { min-height: 0; padding: 24px 18px; grid-template-columns: 1fr; gap: 13px; border-radius: 17px; }
  .ms-hero-copy { text-align: center; }
  .ms-hero-copy h1 { font-size: clamp(30px, 10vw, 48px); }
  .ms-hero-copy h2 { margin-bottom: 15px; font-size: 18px; }
  .ms-hero-copy ul { justify-content: center; margin-bottom: 17px; font-size: 10px; }
  .ms-hero-mark { grid-row: 1; }
  .ms-hero-mark img { width: min(82vw, 390px); max-height: 135px; }
  .ms-hero-mark span { display: none; }
  .ms-rooms, .ms-live, .ms-service, .games-section { margin-top: 11px; padding: 12px; border-radius: 16px; }
  .ms-section-heading { align-items: flex-start; }
  .ms-section-heading > div > span { width: 34px; height: 34px; font-size: 18px; }
  .ms-section-heading h2 { font-size: 17px; }
  .ms-section-heading p { font-size: 11px; }
  .ms-room-grid { gap: 8px; }
  .ms-room-card { min-height: 136px; padding: 11px; border-radius: 13px; }
  .ms-room-card img { width: 94%; height: 61px; margin-bottom: 6px; }
  .ms-room-card strong { min-height: 31px; font-size: 10px; }
  .ms-room-card span { font-size: 8px; }
  .ms-live-grid { gap: 7px; }
  .ms-live-grid button { min-height: 99px; padding: 10px 6px; border-radius: 12px; }
  .ms-live-grid button > span { font-size: 24px; }
  .ms-live-grid button strong { font-size: 11px; }
  .ms-live-grid button small { font-size: 8px; }
  .provider-rail { margin-top: 11px; }
  .games-section { padding: 12px 8px; }
  .games-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .game-card { border-radius: 11px; }
  .game-card-info { padding: 7px; }
  .game-card-info strong { font-size: 11px; }
  .game-card-info span { font-size: 8px; }
  .ms-service { grid-template-columns: 1fr; gap: 8px; }
  footer { display: none; }
  .auth-dialog { top: 50%; bottom: auto; transform: translate(-50%, -50%); width: min(540px, calc(100vw - 18px)); max-height: calc(100dvh - 18px); border-radius: 18px; }
  .multisala-auth-banner { min-height: 104px; }
  .multisala-auth-banner img { max-height: 90px; }
  .auth-dialog .auth-panel { padding: 20px 16px 25px; }
}

@media (max-width: 420px) {
  .site-header .brand { width: 113px; }
  .site-header .login-button, .site-header .register-button { min-width: 0; padding-inline: 7px; font-size: 9px; }
  .ms-hero { padding: 18px 13px 22px; }
  .ms-hero-copy h1 { font-size: 33px; }
  .hero-cta { width: 100%; }
  .ms-room-grid { grid-template-columns: 1fr 1fr; }
  .games-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
