/* ── MafiaCasino Template ── */

:root {
  --primary:        #d1002a;
  --primary-light:  #ff365e;
  --primary-dim:    rgba(209, 0, 42, 0.15);
  --accent:         #c8a84b;

  --bg-body:        #0e1117;
  --bg-sidebar:     #141821;
  --bg-header:      #141821;
  --bg-card:        #1a2030;
  --bg-card2:       #1e2640;

  --text-primary:   #ffffff;
  --text-secondary: #c8cfe0;
  --text-muted:     #6b7a99;
  --border:         rgba(255, 255, 255, 0.08);

  --sidebar-w:      64px;
  --sidebar-open-w: 240px;
  --header-h:       60px;
  --thumb-radius:   10px;
  --trans:          0.2s ease;
  --font-main:      'Sofia Sans', 'Barlow', 'Arial', sans-serif;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }
body { font-family: var(--font-main); background: var(--bg-body); color: var(--text-primary); min-height: 100vh; overflow-x: hidden; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { display: block; max-width: 100%; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }

/* ── SIDEBAR OVERLAY ── */
.sidebar-overlay {
  display: none; position: fixed; inset: var(--header-h) 0 0 0;
  background: rgba(0,0,0,0.7); z-index: 190;
}
.sidebar-overlay.active { display: block; }

/* ── SIDEBAR ── */
.sidebar {
  position: fixed; top: var(--header-h); left: 0;
  width: var(--sidebar-w); height: calc(100vh - var(--header-h));
  z-index: 200; background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column; align-items: center;
  padding: 10px 0; overflow-y: auto; overflow-x: hidden;
  transition: width var(--trans);
}
.sidebar::-webkit-scrollbar { width: 0; }
.sidebar.open { width: var(--sidebar-open-w); align-items: flex-start; }
.sidebar.open .sidebar__nav { width: 100%; }
.sidebar.open .sidebar__item { flex-direction: row; padding: 11px 16px; justify-content: flex-start; gap: 12px; }
.sidebar.open .sidebar__label { opacity: 1; width: auto; overflow: visible; font-size: 0.85rem; }

/* Nav */
.sidebar__nav { display: flex; flex-direction: column; gap: 2px; width: 100%; padding: 0 6px; }
.sidebar__item {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 100%; padding: 10px 4px; gap: 4px;
  color: var(--text-muted); border-radius: 8px; position: relative;
  transition: color var(--trans), background var(--trans);
}
.sidebar__item:hover { color: var(--text-secondary); background: rgba(255,255,255,0.05); }
.sidebar__item.active { color: var(--primary-light); }
.sidebar__item.active::before {
  content: ''; position: absolute; left: -6px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 22px; background: var(--primary); border-radius: 0 3px 3px 0;
}
.sidebar__icon { width: 24px; height: 24px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.sidebar__icon svg { width: 100%; height: 100%; }
.sidebar__label {
  font-size: 9px; font-weight: 600; letter-spacing: 0.04em;
  text-transform: uppercase; line-height: 1; text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 52px; opacity: 1;
  transition: opacity var(--trans);
}
.sidebar.open .sidebar__label { max-width: none; font-size: 0.85rem; text-transform: none; letter-spacing: 0; }
.sidebar__divider { width: 80%; height: 1px; background: var(--border); margin: 6px auto; }

/* ── HEADER ── */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 300;
  height: var(--header-h); background: var(--bg-header);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; padding: 0 16px; gap: 12px;
}
.header__burger {
  display: flex; flex-direction: column; gap: 5px;
  width: 36px; height: 36px; padding: 6px;
  background: rgba(255,255,255,0.05); border: 1px solid var(--border);
  border-radius: 8px; cursor: pointer; flex-shrink: 0;
}
.header__burger span { display: block; width: 100%; height: 2px; background: var(--text-secondary); border-radius: 2px; transition: transform var(--trans), opacity var(--trans); }
.header__burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.header__burger.open span:nth-child(2) { opacity: 0; }
.header__burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.header__logo { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.header__logo-img { height: 32px; width: auto; }
.header__logo-text { font-size: 1.05rem; font-weight: 800; color: var(--text-primary); letter-spacing: 0.06em; text-transform: uppercase; }
.header__spacer { flex: 1; }
.btn-login {
  display: inline-flex; align-items: center; padding: 0 16px; height: 36px;
  font-family: var(--font-main); font-size: 0.82rem; font-weight: 600;
  color: var(--text-secondary); background: transparent;
  border: 1px solid var(--border); border-radius: 8px; white-space: nowrap;
  transition: border-color var(--trans), background var(--trans);
}
.btn-login:hover { border-color: rgba(255,255,255,0.25); background: rgba(255,255,255,0.05); }
.btn-signup {
  display: inline-flex; align-items: center; padding: 0 18px; height: 36px;
  font-family: var(--font-main); font-size: 0.82rem; font-weight: 700;
  color: #fff; background: var(--primary);
  border-radius: 8px; white-space: nowrap; border: none;
  transition: background var(--trans);
}
.btn-signup:hover { background: var(--primary-light); }

/* ── MAIN WRAP ── */
.main-wrap {
  margin-left: var(--sidebar-w); margin-top: var(--header-h);
  display: flex; flex-direction: column; min-height: calc(100vh - var(--header-h));
  transition: margin-left var(--trans);
}
.sidebar.open ~ .main-wrap { margin-left: var(--sidebar-open-w); }

/* ── HERO — VIDEO BANNER ── */
.hero {
  position: relative; width: 100%; overflow: hidden;
  min-height: 320px; max-height: 480px;
  display: flex; align-items: flex-end;
  background: #060a10;
}
.hero__video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center top;
  pointer-events: none;
}
.hero__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(14,17,23,0.85) 0%, rgba(14,17,23,0.4) 50%, rgba(14,17,23,0) 100%);
}
.hero__content {
  position: relative; z-index: 2;
  padding: 32px 28px; display: flex; flex-direction: column; gap: 10px;
  max-width: 520px;
}
.hero__tag {
  display: inline-flex; align-items: center; padding: 4px 12px;
  background: var(--primary-dim); border: 1px solid rgba(209,0,42,0.5);
  border-radius: 20px; font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--primary-light);
  align-self: flex-start;
}
.hero__h1 {
  font-size: clamp(1.2rem, 2.8vw, 2rem); font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.03em;
  color: var(--text-primary); line-height: 1.15;
}
.hero__amount {
  font-size: clamp(2rem, 4.5vw, 3rem); font-weight: 900;
  color: var(--accent); text-transform: uppercase;
  letter-spacing: 0.04em; line-height: 1;
}
.hero__spins { font-size: 0.9rem; font-weight: 600; color: var(--text-secondary); }
.hero__btn {
  display: inline-flex; align-items: center; align-self: flex-start;
  padding: 11px 28px; background: var(--primary);
  color: #fff; font-size: 0.9rem; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  border-radius: 8px; margin-top: 4px; cursor: pointer;
  transition: background var(--trans);
}
.hero__btn:hover { background: var(--primary-light); }

/* ── PROMO STRIP ── */
.promo-strip {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 10px; padding: 14px 16px;
}
.promo-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 10px; padding: 16px; display: flex; flex-direction: column;
  gap: 6px; position: relative; overflow: hidden;
  transition: border-color var(--trans);
}
.promo-card:hover { border-color: rgba(209,0,42,0.4); }
.promo-card__tag { font-size: 0.65rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--primary-light); }
.promo-card__title { font-size: 1.4rem; font-weight: 900; color: var(--text-primary); line-height: 1.1; }
.promo-card__sub { font-size: 0.75rem; color: var(--text-muted); }
.promo-card__btn {
  display: inline-flex; align-items: center; align-self: flex-start;
  padding: 7px 16px; background: var(--primary); color: #fff;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.05em;
  text-transform: uppercase; border-radius: 6px; margin-top: 6px;
  transition: background var(--trans);
}
.promo-card__btn:hover { background: var(--primary-light); }

/* ── CATEGORY TABS ── */
.game-cats {
  display: flex; gap: 6px; padding: 8px 16px;
  overflow-x: auto; scrollbar-width: none; flex-shrink: 0;
}
.game-cats::-webkit-scrollbar { display: none; }
.cats-tab {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: 20px;
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text-muted); font-size: 0.78rem; font-weight: 600;
  white-space: nowrap; cursor: pointer;
  transition: color var(--trans), border-color var(--trans), background var(--trans);
}
.cats-tab:hover { color: var(--text-secondary); border-color: rgba(255,255,255,0.2); }
.cats-tab.active { color: var(--primary-light); border-color: var(--primary); background: var(--primary-dim); }

/* ── CONTENT WRAP ── */
.content-wrap { flex: 1; padding: 0 16px 16px; }

/* Section header */
.section-hd {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px; margin-top: 28px; padding: 4px 0;
}
.section-hd:first-child { margin-top: 8px; }
.section-hd__title {
  font-size: 1rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--text-primary);
  display: flex; align-items: center; gap: 10px;
}
.section-hd__title::before {
  content: ''; display: block; width: 3px; height: 18px;
  background: var(--primary); border-radius: 2px;
}
.section-hd__link {
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--text-muted);
  transition: color var(--trans);
}
.section-hd__link:hover { color: var(--primary-light); }

/* ── GAME GRID ── */
.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
}
.game-thumb {
  position: relative; border-radius: var(--thumb-radius);
  overflow: hidden; background: var(--bg-card);
  cursor: pointer; display: block;
}
.game-thumb__img-wrap { position: relative; overflow: hidden; }
.game-thumb__img-wrap img {
  width: 100%; aspect-ratio: 3/4; object-fit: cover;
  display: block; transition: transform 0.35s ease;
}
.game-thumb:hover .game-thumb__img-wrap img { transform: scale(1.06); }
.game-thumb__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, transparent 55%);
  display: flex; align-items: flex-end; justify-content: center;
  padding: 10px; opacity: 0; transition: opacity var(--trans);
}
.game-thumb:hover .game-thumb__overlay { opacity: 1; }
.game-thumb__play {
  display: block; width: 100%; text-align: center;
  padding: 7px 4px; background: var(--primary);
  color: #fff; font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.05em; text-transform: uppercase; border-radius: 6px;
}
.game-thumb__badge {
  position: absolute; top: 8px; left: 8px; z-index: 1;
  padding: 2px 7px; font-size: 0.58rem; font-weight: 700;
  letter-spacing: 0.07em; text-transform: uppercase;
  border-radius: 4px; line-height: 1.5;
}
.badge-new  { background: #00c3ff; color: #000; }
.badge-hot  { background: var(--primary); color: #fff; }
.badge-jack { background: var(--accent); color: #000; }

/* ── SEO CONTENT ── */
.seo-wrap { padding: 24px 16px 32px; }
.seo-content {
  max-width: 900px; margin: 0 auto;
  color: var(--text-muted); font-size: 0.85rem; line-height: 1.7;
}
.seo-content h2 { font-size: 1.05rem; font-weight: 700; color: var(--text-secondary); margin: 20px 0 8px; text-transform: uppercase; letter-spacing: 0.04em; }
.seo-content h3 { font-size: 0.92rem; font-weight: 700; color: var(--text-secondary); margin: 0; cursor: pointer; padding: 13px 0; border-bottom: 1px solid var(--border); transition: color var(--trans); }
.seo-content h3::after { content: ' ▸'; font-size: 0.7rem; opacity: 0.6; }
.seo-content h3.faq-open { color: var(--primary-light); }
.seo-content h3.faq-open::after { content: ' ▾'; }
.seo-content h3 + p { display: none; padding: 12px 0 4px; }
.seo-content h3.faq-open + p { display: block; }
.seo-content p { margin-bottom: 10px; }
.seo-content a { color: var(--primary-light); text-decoration: underline; }
.seo-content a:hover { opacity: 0.8; }
.seo-content ul, .seo-content ol { padding-left: 18px; margin-bottom: 12px; }
.seo-content li { margin-bottom: 5px; }
.seo-content table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 0.85rem; }
.seo-content th, .seo-content td { border: 1px solid rgba(255,255,255,0.15); padding: 10px 14px; text-align: left; vertical-align: top; }
.seo-content th { font-weight: 700; color: var(--text-secondary); background: rgba(255,255,255,0.07); }
.seo-content tr:nth-child(even) td { background: rgba(255,255,255,0.03); }

/* ── FOOTER ── */
.footer {
  background: var(--bg-sidebar); border-top: 1px solid var(--border);
  padding: 36px 16px 20px;
}
.footer__top {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 24px; margin-bottom: 28px;
}
.footer__col-title { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-secondary); margin-bottom: 12px; }
.footer__links { display: flex; flex-direction: column; gap: 8px; }
.footer__links a { font-size: 0.82rem; color: var(--text-muted); transition: color var(--trans); }
.footer__links a:hover { color: var(--primary-light); }
.footer__logo-wrap { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.footer__logo-img { height: 28px; width: auto; }
.footer__logo-text { font-size: 0.95rem; font-weight: 800; color: var(--text-primary); letter-spacing: 0.06em; text-transform: uppercase; }
.footer__desc { font-size: 0.78rem; color: var(--text-muted); line-height: 1.55; max-width: 240px; }
.footer__divider { border: none; border-top: 1px solid var(--border); margin: 22px 0 18px; }
.footer__bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 14px; }
.footer__license { font-size: 0.75rem; color: var(--text-muted); line-height: 1.5; max-width: 520px; }
.footer__copy { margin-top: 14px; text-align: center; font-size: 0.75rem; color: rgba(107,122,153,0.6); }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .sidebar { top: 0; height: 100vh; transform: translateX(-100%); transition: transform var(--trans); width: var(--sidebar-open-w); }
  .sidebar.open { transform: translateX(0); width: var(--sidebar-open-w); align-items: flex-start; }
  .sidebar.open ~ .main-wrap { margin-left: 0; }
  .main-wrap { margin-left: 0 !important; }
  .promo-strip { grid-template-columns: repeat(2, 1fr); }
  .hero { min-height: 240px; }
}
@media (max-width: 640px) {
  .game-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
  .promo-strip { grid-template-columns: 1fr; gap: 8px; }
  .footer__top { grid-template-columns: repeat(2, 1fr); }
  .hero__content { padding: 20px 16px; }
  .hero__amount { font-size: 1.8rem; }
}
@media (max-width: 400px) {
  .game-grid { grid-template-columns: repeat(2, 1fr); gap: 6px; }
}
