:root {
  --ink: #19173d;
  --muted: #6b6b7b;
  --line: #ececf2;
  --bg: #fff;
  --white: #fff;
  --blue: #0a2f8f;
  --hero: #0b2f8c;
  --red: #d6293a;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: Cairo, "Segoe UI", sans-serif;
  background: #fff;
  color: var(--ink);
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; }
.wrap { width: min(1284px, calc(100% - 40px)); margin: 0 auto; }

.site-header {
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-inner {
  height: 88px;
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 1550px;
  margin: 0 auto;
  padding: 0 32px;
  box-shadow: 0 1px 8px rgba(25, 23, 61, .06);
}
.logo { flex-shrink: 0; }
.logo img { height: 52px; width: auto; }
.nav {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 1;
}
.nav-item { position: relative; }
.nav-item > a {
  font-weight: 700;
  font-size: 15px;
  letter-spacing: .02em;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #19173d;
  padding: 8px 0;
  white-space: nowrap;
}
.nav-item.has-dd > a:after {
  content: "";
  width: 0;
  height: 0;
  border: 4px solid transparent;
  border-top-color: #19173d;
  margin-top: 4px;
}
.nav-item.stack > a {
  white-space: normal;
  width: 58px;
  line-height: 1.05;
  text-align: center;
  display: inline-block;
}
.nav-item.stack > a:after { display: none; }
.dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: -12px;
  background: #fff;
  min-width: 240px;
  padding: 12px;
  border-radius: 16px;
  box-shadow: 0 16px 40px rgba(25, 23, 61, .14);
  z-index: 20;
}
.nav-item:hover .dropdown { display: block; }
.dropdown a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  font-weight: 700;
}
.dropdown a:hover { background: #f4f4f8; }
.header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.cart-link {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  position: relative;
  background: #fff;
  box-shadow: 0 4px 14px rgba(25, 23, 61, .12);
}
.cart-count {
  position: absolute;
  top: -3px;
  right: -3px;
  background: var(--red);
  color: #fff;
  border-radius: 99px;
  min-width: 18px;
  height: 18px;
  font-size: 11px;
  display: grid;
  place-items: center;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  cursor: pointer;
  font-weight: 800;
  border-radius: 999px;
  padding: 10px 18px;
}
.btn-ghost { background: transparent; color: #19173d; font-weight: 800; }
.btn-dark { background: #19173d; color: #fff; }
.btn-white { background: #fff; color: #19173d; }
.btn-outline {
  background: #fff;
  color: #19173d;
  border: 2px solid #19173d;
}
.menu-toggle { display: none; }
.mobile-auth { display: none; }

.home-tabs {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 18px 0 0;
  scrollbar-width: none;
}
.home-tabs::-webkit-scrollbar { display: none; }
.home-tab {
  flex: 0 0 auto;
  border: 1px solid #d8d8e2;
  background: #fff;
  color: #19173d;
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: .04em;
  cursor: pointer;
  white-space: nowrap;
}
.home-tab.on {
  background: #19173d;
  border-color: #19173d;
  color: #fff;
}
.tab-panel { display: none; }
.tab-panel.on { display: block; }

.hero-slider {
  position: relative;
  height: 580px;
  overflow: hidden;
  background: #0b2f8c;
}
.hero-slider .slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .6s ease;
}
.hero-slider .slide.on { opacity: 1; z-index: 1; }
.hero-slider img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.hero-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 18px;
  z-index: 2;
  display: flex;
  justify-content: center;
  gap: 8px;
}
.hero-dots button {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 0;
  background: rgba(255,255,255,.45);
  cursor: pointer;
}
.hero-dots button.on { background: #4d90f6; }

.play-btn-block { width: 100%; margin-top: 10px; border-radius: 999px; }
.raffle-total { margin: 8px 0; }
.winners-count { font-size: clamp(42px, 8vw, 72px); margin: 8px 0 24px; font-weight: 900; }
.winners-carousel {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  gap: 12px;
  align-items: center;
}
.winners-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(220px, 1fr);
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding: 4px;
}
.winners-track::-webkit-scrollbar { display: none; }
.winner-slide { scroll-snap-align: start; min-width: 220px; }
.carousel-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid #ddd;
  background: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  color: #19173d;
}
.winner-marquee {
  display: flex;
  gap: 14px;
  overflow: hidden;
  flex-wrap: nowrap;
  animation: marquee 40s linear infinite;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (max-width: 1200px) {
  .nav { display: none; }
  .nav.open {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    position: absolute;
    top: 88px; left: 0; right: 0;
    background: #fff;
    padding: 16px 24px 20px;
    box-shadow: 0 12px 24px rgba(0,0,0,.08);
    z-index: 30;
  }
  .menu-toggle { display: inline-flex; }
  .desk-auth { display: none; }
  .mobile-auth {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 12px 16px 14px;
  }
  .mobile-auth .btn { width: 100%; padding: 12px 14px; }
  .game-grid, .rush-grid, .rapid-grid, .card-grid { grid-template-columns: repeat(2, 1fr); }
  .instant-grid { grid-template-columns: repeat(3, 1fr); }
  .play-layout { grid-template-columns: 1fr; }
  .hero-slider { height: 380px; }
}
@media (max-width: 800px) {
  .game-grid, .rush-grid, .raffle-grid, .rapid-grid, .card-grid, .footer-grid, .instant-grid { grid-template-columns: 1fr; }
  .header-inner { height: 72px; padding: 0 16px; box-shadow: none; border-bottom: 1px solid #ececf2; }
  .hero-slider { height: 220px; }
  .section-head h2 { font-size: 28px; }
  .home-tabs { padding-left: 0; padding-right: 0; }
  .winners-carousel { grid-template-columns: 36px 1fr 36px; }
}
.section { padding: 56px 0; background: #fff; }
.section.alt { background: #f7f7fa; }
.section-head {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 28px;
}
.section-head h2 {
  font-size: 42px;
  margin: 0;
  letter-spacing: -.03em;
  font-weight: 900;
}
.section-head .rule {
  flex: 1;
  height: 3px;
  background: #0b2f8c;
  margin-bottom: 10px;
}
.subhead { margin: -8px 0 24px; color: var(--muted); font-weight: 700; letter-spacing: .04em; }

.game-grid, .rush-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.raffle-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.rapid-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.instant-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.card-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }

.game-card, .rush-card {
  border-radius: 28px;
  overflow: hidden;
  color: #fff;
  min-height: 460px;
  padding: 22px 20px 20px;
  display: flex;
  flex-direction: column;
  position: relative;
}
.game-card .card-art {
  position: absolute;
  right: 0;
  top: 70px;
  width: 46%;
  opacity: .95;
  pointer-events: none;
}
.game-card .card-logo {
  width: 170px;
  height: auto;
  margin: 10px 0 22px;
  position: relative;
  z-index: 1;
}
.day, .muted { opacity: .9; font-weight: 700; }
.prize-kicker { font-size: 13px; letter-spacing: .08em; position: relative; z-index: 1; }
.prize-num { font-size: 36px; font-weight: 900; line-height: 1; position: relative; z-index: 1; }
.prize-extra { font-size: 18px; font-weight: 800; margin-top: 6px; position: relative; z-index: 1; }
.timer {
  display: flex;
  gap: 8px;
  margin: 16px 0 18px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}
.timer div {
  background: rgba(255,255,255,.18);
  border-radius: 14px;
  min-width: 56px;
  text-align: center;
  padding: 8px 6px 6px;
}
.timer b { display: block; font-size: 22px; }
.timer small { font-size: 10px; letter-spacing: .08em; }
.play-btn {
  margin-top: auto;
  align-self: flex-end;
  background: #19173d;
  color: #fff;
  border-radius: 999px;
  padding: 11px 16px;
  font-weight: 800;
  position: relative;
  z-index: 1;
}
.rush-card { min-height: 420px; }
.rush-card .mult { font-size: 52px; font-weight: 900; line-height: 1; margin: 16px 0; }
.rush-card .mult small { font-size: 15px; display: block; font-weight: 700; }

.instant-thumb {
  border-radius: 18px;
  overflow: hidden;
  background: #f3f4f8;
  display: block;
}
.instant-thumb img { width: 100%; height: 160px; object-fit: cover; }
.instant-thumb span {
  display: block;
  padding: 10px 12px 12px;
  font-weight: 800;
  font-size: 13px;
}

.raffle-card { background: #fff; color: #111; border: 1px solid #eee; border-radius: 22px; overflow: hidden; }
.raffle-top { color: #fff; padding: 22px; }
.raffle-body { padding: 18px 22px 22px; }
.progress { height: 8px; background: #ececf2; border-radius: 99px; overflow: hidden; margin: 8px 0 16px; }
.progress span { display: block; height: 100%; background: #19173d; }
.qty-row { display: flex; align-items: center; gap: 8px; margin: 12px 0; }
.qty-row button { width: 34px; height: 34px; border-radius: 50%; border: 1px solid #ddd; background: #fff; cursor: pointer; }
.qty-row input { width: 54px; text-align: center; border: 1px solid #ddd; border-radius: 10px; padding: 8px; }

input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number], textarea, select {
  border: 1px solid #ddd;
  border-radius: 12px;
  padding: 10px 12px;
  width: 100%;
}

.balls { display: flex; gap: 8px; flex-wrap: wrap; }
.ball {
  width: 42px; height: 42px; border-radius: 50%;
  background: #19173d; color: #fff; display: grid; place-items: center; font-weight: 800;
}
.result-card, .info-card {
  background: #fff; color: #111; border: 1px solid #eee; border-radius: 22px; padding: 18px;
}
.winner-photo { width: 100%; height: 220px; object-fit: cover; border-radius: 16px; margin-bottom: 10px; }
.winner-chip { background: #fff; border: 1px solid #eee; border-radius: 16px; padding: 14px 18px; min-width: 170px; flex: 0 0 auto; }
.app-banner { display: block; border-radius: 0; }
.app-banner img { width: 100%; height: auto; }

.page-hero { background: var(--hero); color: #fff; padding: 40px 0; }
.page-hero h1 { margin: 0; font-size: 40px; }
.play-layout { display: grid; grid-template-columns: 360px 1fr; min-height: 720px; }
.play-side { color: #fff; padding: 36px 28px; position: relative; overflow: hidden; }
.play-side .card-logo { width: 200px; margin: 12px 0 24px; }
.play-side .card-art { position: absolute; right: -20px; bottom: 40px; width: 55%; opacity: .35; }
.play-main { background: #fff; padding: 36px 32px; }
.number-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; max-width: 420px; }
.num { width: 54px; height: 54px; border-radius: 50%; border: 0; background: #f1f2f6; font-weight: 800; cursor: pointer; }
.num.on { background: #4d90f6; color: #fff; }
.slots { display: flex; gap: 8px; margin: 16px 0; }
.slot { width: 48px; height: 48px; border-radius: 50%; background: #f1f2f6; display: grid; place-items: center; font-weight: 800; }
.form { max-width: 460px; display: grid; gap: 12px; }
.auth-card {
  max-width: 420px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 24px;
  padding: 32px;
}
.form-alert { background: #ffe8ea; color: #9b111e; padding: 10px 12px; border-radius: 10px; }
.pass-row { display: flex; gap: 8px; }
.pass-row input { flex: 1; }
.check-row { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.account-layout { display: grid; grid-template-columns: 220px 1fr; gap: 28px; }
.account-nav { display: grid; gap: 6px; align-content: start; }
.account-nav a { padding: 12px 14px; border-radius: 12px; background: #f5f5f8; font-weight: 800; }
.account-nav a.on { background: #19173d; color: #fff; }
.account-main h2 { margin-top: 0; }
.admin-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 18px 0 28px; }
.admin-grid .info-card span, .info-card span { display: block; color: var(--muted); font-size: 13px; }
.admin-grid .info-card strong { font-size: 28px; }
.admin-page { background: #f4f5f8; }
.admin-sidebar {
  position: fixed; inset: 0 auto 0 0; width: 250px; background: #19173d; color: #fff;
  padding: 22px 16px; overflow: auto; z-index: 40;
}
.admin-sidebar img { height: 42px; margin-bottom: 10px; filter: brightness(10); }
.admin-sidebar h1 { font-size: 16px; margin: 0 0 18px; }
.admin-sidebar a { display: block; color: #d7d8e8; padding: 10px 12px; border-radius: 10px; font-weight: 700; }
.admin-sidebar a.active, .admin-sidebar a:hover { background: #2a2860; color: #fff; }
.admin-main { margin-left: 250px; min-height: 100vh; }
.admin-topbar {
  background: #fff; padding: 14px 22px; display: flex; justify-content: space-between; align-items: center;
  box-shadow: 0 1px 8px rgba(25,23,61,.06);
}
.admin-panel { padding: 22px; }
.admin-auth-card {
  width: min(430px, calc(100% - 32px)); background: #fff; border-radius: 18px; padding: 32px;
  box-shadow: 0 20px 60px rgba(0,0,0,.12); text-align: center;
}
.admin-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.admin-actions a, .admin-actions button { font-size: 13px; }
@media (max-width: 900px) {
  .account-layout { grid-template-columns: 1fr; }
  .admin-grid { grid-template-columns: 1fr 1fr; }
  .admin-sidebar { transform: translateX(-110%); }
  .admin-sidebar.show { transform: none; }
  .admin-main { margin-left: 0; }
}
.table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 16px; overflow: hidden; }
.table th, .table td { padding: 14px 16px; text-align: left; border-bottom: 1px solid #f0f0f4; }

.site-footer { background: #0b1020; color: #d7d8e0; padding: 48px 0 24px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 30px; }
.site-footer h4 { color: #fff; margin: 0 0 12px; }
.site-footer a { display: block; padding: 4px 0; color: #c9cad3; }
.legal { margin-top: 28px; font-size: 12px; color: #9aa0b3; }

