/* PinCo — уникальная сетка, mobile-first */
:root {
  --bg-dark: #0d1117;
  --bg-panel: #161b22;
  --bg-card: #1a1e24;
  --text: #e6edf3;
  --text-muted: #8b949e;
  --accent: #ff2400;
  --accent-teal: #04cfaa;
  --border: #30363d;
  --radius: 8px;
  --sidebar-w: 220px;
  --header-h: 56px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg-dark);
  color: var(--text);
  line-height: 1.5;
  overflow-x: hidden;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
  padding-bottom: env(safe-area-inset-bottom);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.page-wrap {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.content-wrapper {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

/* Sidebar — скрыт на мобильных, показывается по кнопке */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  width: var(--sidebar-w);
  height: 100vh;
  background: var(--bg-panel);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform 0.25s ease;
  overflow-y: auto;
}

.sidebar.open {
  transform: translateX(0);
}

.sidebar-overlay {
  position: fixed;
  inset: 0;
  z-index: 99;
  background: rgba(0, 0, 0, 0.6);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.sidebar-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

.sidebar-logo {
  padding: 16px;
  flex-shrink: 0;
}

.sidebar-logo img {
  width: 120px;
  height: auto;
}

.sidebar-nav {
  flex: 1;
  padding: 12px 0;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 12px 16px;
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: color 0.2s, background 0.2s;
}

.sidebar-link:hover,
.sidebar-link.active {
  color: var(--text);
  background: rgba(255, 36, 0, 0.08);
}

.sidebar-link.active {
  color: var(--accent);
}

.sidebar-hr {
  margin: 8px 16px;
  border: none;
  border-top: 1px solid var(--border);
}

.sidebar-bottom {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
}

.lang-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  width: 100%;
  padding: 10px 16px;
  margin-top: 8px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.9rem;
  cursor: pointer;
  border-radius: var(--radius);
}

.lang-btn .arrow {
  font-size: 0.7rem;
  opacity: 0.8;
}

/* Иконки сайдбара — простые символы/псевдоэлементы */
.icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  background: currentColor;
  opacity: 0.7;
  border-radius: 2px;
}

.icon-gear { border-radius: 50%; border: 2px solid currentColor; background: transparent; }
.icon-cards { border-radius: 2px; clip-path: polygon(0 0, 100% 0, 100% 70%, 0 70%); }
.icon-crash { border-radius: 50%; }
.icon-tv { border-radius: 2px; }
.icon-chip { border-radius: 50%; width: 18px; height: 18px; }
.icon-stopwatch { width: 16px; height: 16px; border: 2px solid currentColor; border-radius: 50%; background: transparent; }
.icon-live { border-radius: 50%; border: 2px solid currentColor; background: transparent; }
.icon-gamepad { border-radius: 4px; }
.icon-jersey { border-radius: 2px; }
.icon-coin { border-radius: 50%; width: 18px; height: 18px; }
.icon-gift { border-radius: 2px; }
.icon-crown { border-radius: 2px; }
.icon-user { border-radius: 50%; }
.icon-chat { border-radius: 50%; }
.icon-bell,
.icon-trophy { width: 18px; height: 18px; }

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border);
  min-height: var(--header-h);
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

.header-logo {
  flex-shrink: 0;
}

.header-logo img {
  width: 100px;
  height: auto;
}

.header-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.header-link:hover {
  color: var(--text);
}

.header-promo {
  flex: 1;
  min-width: 180px;
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.balance {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 16px;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: opacity 0.2s, background 0.2s;
}

.btn:hover {
  opacity: 0.9;
}

.btn-cashier,
.btn-reg {
  background: var(--accent);
  color: #fff;
}

.btn-login {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--accent);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  padding: 12px 24px;
  font-size: 1rem;
}

/* Main */
.main {
  flex: 1;
  padding: 16px;
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}

/* Banners */
.banners {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 24px;
}

.banner {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 2.4 / 1;
  min-height: 140px;
  background: var(--bg-card);
}

.banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.banner-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 16px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
  color: #fff;
  display: flex;
  justify-content: center;
}

.banner-content h2 {
  margin: 0 0 6px;
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.banner-1 .banner-content { color: #fff; }
.banner-2 .banner-content { color: #fff; }

.banner-cta {
  display: inline-block;
  padding: 6px 14px;
  background: var(--accent);
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 600;
}

/* Hero */
.hero {
  text-align: center;
  margin-bottom: 24px;
}

.hero-title {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text);
}

.hero-sub {
  margin: 0 0 20px;
  font-size: 0.95rem;
  color: var(--text-muted);
  font-weight: 400;
}

.hero-cats {
  display: flex;
  flex-wrap: nowrap;
  gap: 0;
  justify-content: center;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  padding: 8px 0 4px;
  margin: 0 -8px;
}

.hero-cats::-webkit-scrollbar {
  height: 4px;
}

.hero-cats::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}

.hero-cat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  min-width: 88px;
  padding: 12px 8px;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 500;
  transition: color 0.2s, background 0.2s;
  border-radius: var(--radius);
}

.hero-cat:hover,
.hero-cat:focus {
  color: var(--text);
  background: rgba(255, 36, 0, 0.08);
}

.hero-cat-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
}

.hero-cat-jackpot { background: linear-gradient(135deg, var(--bg-card) 0%, #2a1a0a 100%); }
.hero-cat-crash { background: linear-gradient(135deg, var(--bg-card) 0%, #1a2a2a 100%); }
.hero-cat-bonus { background: linear-gradient(135deg, var(--bg-card) 0%, #2a2a1a 100%); }
.hero-cat-classic { background: linear-gradient(135deg, var(--bg-card) 0%, #1a1a2a 100%); }
.hero-cat-megaways { background: linear-gradient(135deg, var(--bg-card) 0%, #2a1a2a 100%); }
.hero-cat-pinup { background: linear-gradient(135deg, var(--bg-card) 0%, #1a2a1a 100%); }

/* Games Grid */
.games-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 32px;
}

.game-card {
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  background: var(--bg-card);
  transition: transform 0.2s;
  aspect-ratio: 1.3 / 1;
}

.game-card:hover {
  transform: translateY(-4px);
  z-index: 1;
}

.game-card-img {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.game-title {
  background: rgba(0,0,0,0.7);
  color: #fff;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.8rem;
  margin-bottom: 8px;
  opacity: 0;
  transition: opacity 0.2s;
}

.game-card:hover .game-title {
  opacity: 1;
}


/* Live wins strip */
.live-wins {
  margin-bottom: 24px;
}

.section-title {
  margin: 0 0 10px;
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
}

.wins-scroll {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow-x: auto;
  border: 1px solid var(--border);
}

.win-item {
  flex-shrink: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.win-item strong {
  color: var(--accent-teal);
  margin-left: 4px;
}

.wins-close {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0 4px;
}

/* Thematic */
.thematic {
  margin-bottom: 40px;
}

.thematic-title {
  margin: 0 0 4px;
  font-size: 1.5rem;
  font-weight: 800;
  text-transform: uppercase;
  text-align: center;
  letter-spacing: 0.03em;
}

.thematic-sub {
  margin: 0 0 20px;
  font-size: 0.95rem;
  color: var(--text-muted);
  text-align: center;
}

.thematic-sub::after {
  content: "";
  display: block;
  width: 40px;
  height: 2px;
  margin: 8px auto 0;
  background: var(--accent-teal);
}

.thematic-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.thematic-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 12px;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: border-color 0.2s, transform 0.2s;
}

.thematic-card:hover {
  border-color: var(--accent-teal);
  transform: translateY(-2px);
}

.card-icon {
  width: 64px;
  height: 64px;
  margin-bottom: 12px;
  border-radius: var(--radius);
  background: var(--bg-panel);
}

.card-icon-roulette {
  background: linear-gradient(135deg, #1a472a 0%, #2d5a3d 50%, #0d2818 100%);
  border-radius: 50%;
  box-shadow: inset 0 0 0 3px rgba(255,255,255,0.1);
}

.card-icon-rocket {
  background: linear-gradient(180deg, #2a2a3a 0%, #1a1a2e 100%);
  border-radius: 4px;
  box-shadow: 0 -8px 0 -4px #4a9eff;
}

.card-icon-vr {
  background: linear-gradient(145deg, #1a1a1a 0%, #2a1520 100%);
  border-radius: 8px;
  box-shadow: inset 0 0 20px rgba(0,255,100,0.15);
}

.card-icon-keyboard {
  background: linear-gradient(145deg, #252530 0%, #1a1a22 100%);
  border-radius: 4px;
  box-shadow: 0 2px 0 #0acf83;
}

.card-label {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text);
}

/* Intro */
.intro {
  max-width: 720px;
  margin: 0 auto 32px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.intro.bottom {
  margin-bottom: 40px;
}

/* Info table */
.info-table {
  margin-bottom: 40px;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
}

.info-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.info-table tr {
  border-bottom: 1px solid var(--border);
}

.info-table tr:last-child {
  border-bottom: none;
}

.info-table td {
  padding: 14px 16px;
  vertical-align: top;
}

.info-table td:first-child {
  font-weight: 600;
  color: var(--text);
  width: 40%;
  min-width: 160px;
}

.info-table td:last-child {
  color: var(--text-muted);
}

.t-icon {
  display: inline-block;
  width: 18px;
  height: 18px;
  margin-right: 8px;
  vertical-align: middle;
  background: var(--text-muted);
  border-radius: 2px;
  opacity: 0.8;
}

.t-globe { border-radius: 50%; }
.t-party,
.t-gift { border-radius: 2px; }
.t-tag { width: 14px; height: 14px; }
.t-mobile { border-radius: 4px; }
.t-card,
.t-wallet { border-radius: 2px; }
.t-coin { border-radius: 50%; width: 16px; height: 16px; }
.t-chat { border-radius: 50%; }
.t-people { border-radius: 50%; }
.t-lang { border-radius: 2px; }
.t-briefcase { border-radius: 2px; }
.t-cards { border-radius: 2px; }
.t-chip { border-radius: 50%; width: 16px; height: 16px; }

.info-cta {
  padding: 20px 16px;
  text-align: center;
  border-top: 1px solid var(--border);
}

/* Content blocks */
.content-block {
  max-width: 800px;
  margin: 0 auto 36px;
}

.content-block h2 {
  margin: 0 0 12px;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent);
}

.content-block p {
  margin: 0 0 12px;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.content-block p:last-of-type {
  margin-bottom: 0;
}

.content-cta {
  margin-top: 20px;
  text-align: center;
}

.content-block.graphics h2 {
  border-bottom-color: var(--accent);
}

.platforms {
  margin-top: 24px;
  padding: 24px;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.platforms h3 {
  margin: 0 0 6px;
  font-size: 1.2rem;
  font-weight: 800;
  text-transform: uppercase;
  text-align: center;
  letter-spacing: 0.03em;
}

.platforms-sub {
  margin: 0 0 20px;
  font-size: 0.9rem;
  color: var(--text-muted);
  text-align: center;
}

.platforms-visual {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.device {
  background: #252530;
  border-radius: 8px;
  padding: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

.device .screen {
  background: var(--bg-dark);
  border-radius: 4px;
  border: 1px solid var(--border);
}

.laptop .screen {
  width: 280px;
  height: 160px;
}

.phone .screen {
  width: 120px;
  height: 200px;
}

.platforms-download {
  text-align: center;
}

/* Footer */
.footer {
  margin-top: auto;
  padding: 28px 16px 20px;
  background: var(--bg-panel);
  border-top: 1px solid var(--border);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 20px;
  margin-bottom: 20px;
}

.footer-nav a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  color: #58a6ff;
}

.footer-nav a:hover {
  text-decoration: underline;
}

.f-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  background: var(--text-muted);
  border-radius: 2px;
}

.f-check { background: var(--accent-teal); border-radius: 2px; }
.f-gift,
.f-phone { background: var(--accent); opacity: 0.9; border-radius: 2px; }

.footer-copy,
.footer-update {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
}

.footer-update {
  margin-top: 4px;
}

/* Menu toggle — мобильный, зона нажатия 44px */
.menu-toggle {
  position: fixed;
  top: max(12px, env(safe-area-inset-top));
  left: max(12px, env(safe-area-inset-left));
  z-index: 101;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  min-width: 44px;
  min-height: 44px;
  padding: 12px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.2s;
}

.menu-toggle span {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
  transition: transform 0.25s, opacity 0.25s;
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* Desktop: показываем сайдбар по умолчанию, скрываем бургер */
@media (min-width: 992px) {
  .page-wrap {
    flex-direction: row;
  }

  .sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    transform: none;
    flex-shrink: 0;
    border-right: 1px solid var(--border);
  }

  .sidebar-overlay {
    display: none;
  }

  .menu-toggle {
    display: none;
  }

  .main {
    padding: 24px 32px;
  }

  .header-inner {
    padding-left: 24px;
  }

  .banners {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 32px;
  }

  .banner {
    aspect-ratio: 2.2 / 1;
    min-height: 180px;
  }

  .banner-content h2 {
    font-size: 1.35rem;
  }

  .hero-title {
    font-size: 2.25rem;
  }

  .hero-sub {
    font-size: 1rem;
  }

  .hero-cats {
    flex-wrap: wrap;
    justify-content: center;
    overflow-x: visible;
    gap: 8px;
  }

  .hero-cat {
    min-width: 100px;
  }

  .games-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
  }

  .thematic-cards {
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
  }

  .thematic-card {
    padding: 24px 16px;
  }

  .card-icon {
    width: 80px;
    height: 80px;
  }

  .card-label {
    font-size: 0.85rem;
  }

  .info-table td:first-child {
    width: 28%;
  }

  .footer-nav {
    gap: 24px;
  }
}

/* Планшеты */
@media (min-width: 768px) and (max-width: 991px) {
  .header-promo {
    order: 3;
    width: 100%;
    text-align: center;
  }

  .games-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .thematic-cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .laptop .screen {
    width: 320px;
    height: 180px;
  }
}

/* Очень маленькие экраны — телефоны */
@media (max-width: 480px) {
  .header-inner {
    padding: 10px 12px 10px 56px;
    gap: 8px;
  }

  .header-logo img {
    width: 80px;
  }

  .header-promo {
    display: none;
  }

  .header-link span:not(.icon) {
    display: none;
  }

  .header-link {
    font-size: 0;
    gap: 0;
  }

  .header-actions {
    flex: 1;
    justify-content: flex-end;
  }

  .main {
    padding: 12px 10px 20px;
  }

  .banner {
    min-height: 120px;
  }

  .banner-cta {
    padding: 8px 14px;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
  }

  .hero-title {
    font-size: 1.4rem;
  }

  .hero-sub {
    font-size: 0.875rem;
    margin-bottom: 14px;
  }

  .hero-cat {
    min-width: 76px;
    padding: 10px 6px;
    font-size: 0.7rem;
  }

  .hero-cat-icon {
    width: 36px;
    height: 36px;
  }

  .games-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .thematic-title {
    font-size: 1.2rem;
  }

  .thematic-card {
    padding: 16px 10px;
    min-height: 100px;
  }

  .content-block h2 {
    font-size: 1.15rem;
  }

  .footer {
    padding: 20px 10px 16px;
    padding-bottom: calc(20px + env(safe-area-inset-bottom));
  }

  .footer-nav a {
    min-height: 44px;
    padding: 8px 12px;
    align-items: center;
  }

  .info-table td {
    padding: 12px 10px;
    font-size: 0.85rem;
  }

  .info-table td:first-child {
    min-width: 0;
  }
}
