/* AmunRa Casino – main styles */
:root {
  --bg-dark: #331b14;
  --bg-header: #2d1812;
  --bg-mortar: #181006;
  --gold: #c9a227;
  --gold-light: #e8c547;
  --purple: #8b5cf6;
  --purple-light: #a78bfa;
  --white: #f5f5f5;
  --text-muted: #b8a090;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Montserrat', sans-serif;
  background: linear-gradient(180deg, #2d1812 0%, #331b14 30%, #38201a 70%, #2d1812 100%);
  color: var(--white);
  min-height: 100vh;
  line-height: 1.5;
  position: relative;
  overflow-x: hidden;
}
.scroll-shimmer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(ellipse 160% 120% at 50% 0%, rgba(201,162,39,0.22) 0%, transparent 50%), radial-gradient(ellipse 120% 100% at 70% 100%, rgba(180,100,60,0.15) 0%, transparent 45%);
  transition: opacity 0.15s ease;
}
body > .layout { position: relative; z-index: 1; }
a { color: var(--gold-light); text-decoration: none; }
a:hover { color: var(--gold); text-decoration: underline; }

.header {
  background: linear-gradient(135deg, #2d1812 0%, #331b14 100%);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(0,0,0,0.25);
  overflow: hidden;
}
.header::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: var(--header-shimmer, radial-gradient(ellipse 160% 120% at 50% 15%, rgba(201,162,39,0.22) 0%, transparent 50%), radial-gradient(ellipse 120% 100% at 70% 65%, rgba(180,100,60,0.15) 0%, transparent 45%));
  opacity: 0.85;
}
.header > * { position: relative; z-index: 1; }
.logo { font-weight: 700; font-size: 1.5rem; color: var(--gold); display: inline-flex; align-items: center; position: relative; }
.logo img { height: 40px; width: auto; display: block; }
.logo::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 8px;
  pointer-events: none;
  background: var(--header-shimmer, radial-gradient(ellipse 160% 120% at 50% 15%, rgba(201,162,39,0.3) 0%, transparent 50%));
  opacity: 0.9;
  mix-blend-mode: overlay;
}
.header-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 10px 18px; border-radius: 6px; font-weight: 600; font-size: 0.9rem; cursor: pointer; border: none; transition: all 0.2s; }
.btn-primary { background: linear-gradient(135deg, var(--gold), #a67c00); color: #1a0f00; }
.btn-primary:hover { background: linear-gradient(135deg, var(--gold-light), var(--gold)); color: #1a0f00; text-decoration: none; }
.btn-outline { background: transparent; color: var(--gold); border: 1px solid var(--gold); }
.btn-outline:hover { background: rgba(201,162,39,0.15); color: var(--gold); text-decoration: none; }
.btn-play { background: linear-gradient(135deg, var(--gold), #a67c00); color: #1a0f00; }
.btn-play:hover { color: #1a0f00; text-decoration: none; background: linear-gradient(135deg, var(--gold-light), var(--gold)); }

.layout { display: flex; min-height: calc(100vh - 52px); }
.sidebar {
  width: 220px;
  min-width: 220px;
  background: transparent;
  padding: 20px 0;
  border-right: 1px solid rgba(255,255,255,0.06);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 52px;
  align-self: flex-start;
  max-height: calc(100vh - 52px);
  overflow-y: auto;
}
.sidebar-nav { flex: 1; }
.sidebar-nav a {
  display: block;
  padding: 10px 20px;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  border-left: 3px solid transparent;
}
.sidebar-nav a:hover { color: var(--gold); background: rgba(201,162,39,0.08); border-left-color: var(--gold); text-decoration: none; }
.sidebar-lang { padding: 16px 20px; border-top: 1px solid rgba(255,255,255,0.06); }
.sidebar-lang .btn { width: 100%; justify-content: center; }
.btn-bonusz {
  background: linear-gradient(135deg, #d4af37 0%, #c9a227 25%, #b8960c 50%, #c9a227 75%, #e8c547 100%);
  background-size: 200% 100%;
  color: #1a0f00;
  border: none;
  font-weight: 700;
  animation: bonusz-shimmer 2.5s ease-in-out infinite;
  box-shadow: 0 0 12px rgba(201,162,39,0.4);
}
.btn-bonusz:hover { filter: brightness(1.1); }
@keyframes bonusz-shimmer {
  0%, 100% { background-position: 100% 0; box-shadow: 0 0 12px rgba(201,162,39,0.4); }
  50% { background-position: 0 0; box-shadow: 0 0 18px rgba(201,162,39,0.6); }
}

.main { flex: 1; padding: 24px 32px 48px; max-width: 1200px; margin: 0 auto; text-align: center; }
.main h1 { font-size: 1.75rem; color: var(--gold); margin-bottom: 20px; }
.main h2 { font-size: 1.35rem; color: var(--gold); margin: 0 0 16px; }
.main p { color: var(--white); margin-bottom: 12px; }
.main .lead { font-size: 1.05rem; color: var(--text-muted); }
.block-hero .lead,
.block-hero p { max-width: 42em; margin-left: auto; margin-right: auto; }
.hero-text { padding: 0 32px; }

.block {
  padding: 32px 0 40px;
  margin-bottom: 0;
  border: none;
  background: none;
  box-shadow: none;
}
.block-hero {
  padding-left: 0;
  padding-right: 0;
  padding-top: 0;
  overflow: hidden;
}
.hero-banner-wrap {
  width: 100%;
  margin: 0 0 24px 0;
  line-height: 0;
  border-radius: 12px 12px 0 0;
  overflow: hidden;
}
.hero-banner {
  width: 100%;
  max-width: 100%;
  aspect-ratio: 1200 / 400;
  height: auto;
  display: block;
  object-fit: cover;
  object-position: center;
}
.hero-play-now {
  display: inline-block;
  margin: 16px 0 20px;
  padding: 12px 28px;
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 50%, #15803d 100%);
  border-radius: 8px;
  box-shadow: 0 4px 14px rgba(34, 197, 94, 0.4);
  animation: hero-pulse 1.5s ease-in-out infinite;
}
.hero-play-now:hover { filter: brightness(1.1); text-decoration: none; }
.hero-play-now span {
  display: block;
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.05em;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}
@keyframes hero-pulse {
  0%, 100% { box-shadow: 0 4px 14px rgba(34, 197, 94, 0.4); transform: scale(1); opacity: 1; }
  50% { box-shadow: 0 4px 24px rgba(34, 197, 94, 0.7); transform: scale(1.03); opacity: 0.95; }
}
.block h2 {
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(201,162,39,0.2);
  font-weight: 700;
  letter-spacing: 0.02em;
}
.block p:last-child { margin-bottom: 0; }
.block .btn { margin-left: auto; margin-right: auto; }
.block ul.content-list {
  list-style: disc;
  list-style-position: outside;
  margin: 0 0 1em 0;
  margin-right: auto;
  padding-left: 0.95em;
  color: var(--white);
  text-align: left;
}
.block ul.content-list li { margin-bottom: 0.4em; }
.block ul.content-list ul { list-style: circle; margin: 0.25em 0 0 1em; padding-left: 0.35em; text-align: left; }
.block .content-list-wrap { text-align: left; max-width: 42em; margin-left: auto; margin-right: auto; }

.faq-list { list-style: none; }
.faq-item {
  border: none;
  border-bottom: 1px solid rgba(201,162,39,0.15);
  border-radius: 0;
  margin-bottom: 0;
  overflow: hidden;
  background: none;
}
.faq-item summary {
  padding: 16px 0;
  font-weight: 600;
  color: var(--gold);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::before { content: '›'; font-size: 1.2rem; transition: transform 0.2s; }
.faq-item[open] summary::before { transform: rotate(90deg); }
.faq-list .faq-item { display: block; }
.faq-item div { padding: 0 0 20px 28px; color: var(--text-muted); font-size: 0.95rem; line-height: 1.6; text-align: left; }

.step-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin-top: 16px; }
.step-card {
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(201,162,39,0.2);
  border-radius: 10px;
  padding: 20px;
  border-left: 4px solid var(--gold);
}
.step-card .step-num { font-size: 0.8rem; font-weight: 700; color: var(--gold); margin-bottom: 6px; }
.step-card p { margin: 0; font-size: 0.9rem; color: var(--white); text-align: left; }

.games-section { margin-top: 32px; }
.games-section h2 { margin-bottom: 16px; text-align: left; }
.game-grid {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 8px 0 16px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.game-grid::-webkit-scrollbar { height: 8px; }
.game-grid::-webkit-scrollbar-track { background: rgba(0,0,0,0.2); border-radius: 4px; }
.game-grid::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 4px; }
.game-card {
  flex: 0 0 auto;
  width: 180px;
  scroll-snap-align: start;
  background: linear-gradient(180deg, rgba(31,18,9,0.98) 0%, rgba(44,24,16,0.95) 100%);
  border: 2px solid rgba(201,162,39,0.4);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.3), 0 4px 12px rgba(0,0,0,0.4);
}
.game-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(201,162,39,0.2); border-color: rgba(201,162,39,0.6); }
.game-card > a { text-decoration: none; color: inherit; display: block; }
.game-card-img {
  height: 220px;
  background: linear-gradient(135deg, #3d2a1a 0%, #1f1209 100%);
  position: relative;
  overflow: hidden;
}
.game-card-img picture, .game-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.game-card-img .game-card-img-fallback { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 2.5rem; background: linear-gradient(135deg, #3d2a1a 0%, #1f1209 100%); }
.game-card-body { padding: 12px; text-align: center; }
.game-card-title { font-weight: 700; color: var(--white); font-size: 0.85rem; margin-bottom: 8px; line-height: 1.2; text-transform: uppercase; letter-spacing: 0.02em; }
.game-card-meta { font-size: 0.7rem; color: var(--text-muted); margin-bottom: 10px; }
.game-card-meta span { display: block; }
.game-card .btn-play { width: 100%; padding: 10px; font-size: 0.8rem; }

.footer {
  background: var(--bg-header);
  padding: 40px 32px 24px;
  border-top: 1px solid rgba(201,162,39,0.2);
}
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 24px; margin-bottom: 32px; justify-content: center; max-width: 720px; margin-left: auto; margin-right: auto; }
.footer-col h3 { font-size: 0.9rem; color: var(--gold); margin-bottom: 12px; text-transform: uppercase; letter-spacing: 0.05em; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 6px; }
.footer-col a { color: var(--text-muted); font-size: 0.9rem; }
.footer-col a:hover { color: var(--gold); }
.footer-payments { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: center; margin-bottom: 24px; }
.footer-payments img { height: 28px; width: auto; object-fit: contain; filter: brightness(1.1); }
.footer-legal { font-size: 0.8rem; color: var(--text-muted); max-width: 720px; margin-left: auto; margin-right: auto; text-align: center; }
.footer-legal p { margin-bottom: 8px; }
.age-badge { display: inline-block; background: var(--gold); color: #1a0f00; padding: 2px 8px; border-radius: 4px; font-weight: 700; margin-right: 8px; }

.btn-back-top {
  position: fixed;
  right: 24px;
  bottom: 28px;
  z-index: 50;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(44,24,16,0.95) 0%, rgba(38,22,14,0.98) 100%);
  border: 1px solid rgba(201,162,39,0.4);
  color: var(--gold);
  font-size: 1.4rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4), 0 0 0 1px rgba(0,0,0,0.2) inset;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.25s ease, border-color 0.2s, box-shadow 0.2s;
}
.btn-back-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.btn-back-top:hover {
  border-color: var(--gold);
  color: var(--gold-light);
  box-shadow: 0 6px 20px rgba(201,162,39,0.25), 0 0 0 1px rgba(0,0,0,0.2) inset;
}

.block-feed {
  background: linear-gradient(160deg, rgba(38,22,14,0.92) 0%, rgba(28,18,12,0.95) 100%);
  border: 1px solid rgba(201,162,39,0.25);
  border-radius: 14px;
  padding: 24px 28px 28px;
  margin-bottom: 24px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.25), 0 0 0 1px rgba(0,0,0,0.15) inset;
}
.block-feed h2 { margin-top: 0; }
.live-feed { max-height: 300px; overflow-y: auto; overflow-x: hidden; position: relative; padding-right: 4px; }
.live-feed::-webkit-scrollbar { width: 6px; }
.live-feed::-webkit-scrollbar-track { background: rgba(0,0,0,0.2); border-radius: 3px; }
.live-feed::-webkit-scrollbar-thumb { background: rgba(201,162,39,0.4); border-radius: 3px; }
.live-feed-list { list-style: none; }
.live-feed-list li {
  padding: 12px 16px;
  margin-bottom: 8px;
  background: rgba(0,0,0,0.2);
  border-radius: 10px;
  border-left: 4px solid rgba(201,162,39,0.55);
  font-size: 0.9rem;
  animation: feed-in 0.5s ease-out;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
#live-wins .live-feed-list li { border-left-color: rgba(34,197,94,0.6); }
@keyframes feed-in {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}
.live-feed-list .feed-user { color: var(--gold); font-weight: 600; margin-right: 6px; }
.live-feed-list .feed-time { color: var(--text-muted); font-size: 0.75rem; margin-left: 6px; }
.live-wins-list .feed-amount { color: #22c55e; font-weight: 700; }

.content-table { width: 100%; max-width: 560px; margin: 16px auto; border-collapse: collapse; font-size: 0.9rem; text-align: left; }
.content-table th, .content-table td { padding: 12px 16px; border-bottom: 1px solid rgba(201,162,39,0.18); }
.content-table th { background: none; color: var(--gold); font-weight: 600; }
.content-table tr:nth-child(even) { background: rgba(0,0,0,0.08); }

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

@media (max-width: 900px) {
  .main { padding: 20px 24px 40px; }
  .main h1 { font-size: 1.5rem; }
  .main h2 { font-size: 1.2rem; }
}

@media (max-width: 640px) {
  /* Шапка: компактно, кнопки с минимальной зоной нажатия 44px */
  .header { padding: 10px 16px; gap: 10px; }
  .logo img { height: 36px; width: auto; max-width: 120px; object-fit: contain; }
  .header-actions { gap: 8px; flex-shrink: 0; }
  .header .btn { min-height: 44px; padding: 12px 16px; font-size: 0.8rem; }

  .layout { flex-direction: column; min-height: auto; }
  .main {
    padding: 0 0 32px;
    text-align: left;
    max-width: 100%;
  }

  /* Герой: баннер на всю ширину, текст с отступами */
  .block-hero { padding: 0; }
  .hero-banner-wrap {
    margin: 0 0 20px;
    width: 100%;
    border-radius: 0;
    overflow: hidden;
  }
  .hero-banner {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
    vertical-align: top;
  }
  .hero-text {
    padding: 0 16px;
    max-width: 100%;
  }
  .block-hero h1 {
    font-size: 1.25rem;
    margin-bottom: 16px;
    line-height: 1.35;
  }
  .block-hero .hero-play-now {
    display: block;
    width: 100%;
    max-width: 280px;
    margin: 0 auto 18px;
    padding: 14px 20px;
    text-align: center;
    min-height: 48px;
  }
  .block-hero .hero-play-now span { font-size: 1rem; }
  .block-hero .lead,
  .block-hero p { font-size: 0.9375rem; margin-bottom: 12px; }

  /* Контентные блоки */
  .block {
    padding: 28px 16px 32px;
    border-bottom: 1px solid rgba(201,162,39,0.08);
  }
  .block-hero { padding: 0 0 0 0; border-bottom: none; }
  .block:last-of-type { border-bottom: none; }
  .main h2 {
    font-size: 1.125rem;
    margin-bottom: 14px;
    padding-bottom: 10px;
  }
  .block h3 {
    font-size: 1rem !important;
    margin-top: 20px !important;
    margin-bottom: 10px !important;
  }
  .main p { font-size: 0.9375rem; margin-bottom: 12px; line-height: 1.55; }

  /* Карточки игр: горизонтальный скролл, фиксированный размер */
  .games-section { padding-top: 24px; }
  .game-grid {
    margin: 0 -16px;
    padding: 8px 16px 16px;
    gap: 12px;
    scroll-snap-type: x mandatory;
  }
  .game-card {
    width: 160px;
    min-width: 160px;
    scroll-snap-align: start;
  }
  .game-card-img { height: 200px; }
  .game-card-img img { width: 100%; height: 100%; object-fit: cover; }
  .game-card-title { font-size: 0.8125rem; }
  .game-card-meta { font-size: 0.6875rem; }
  .game-card .btn-play { min-height: 44px; padding: 12px; font-size: 0.8rem; }

  /* Лента выигрышей / комментарии */
  .block-feed {
    margin-left: 16px;
    margin-right: 16px;
    padding: 18px 16px 20px;
    border-radius: 12px;
  }
  .live-feed-list li { padding: 12px 14px; font-size: 0.875rem; }

  /* Таблица: горизонтальный скролл */
  .table-scroll { margin: 16px -16px; padding: 0 16px; -webkit-overflow-scrolling: touch; }
  .content-table { font-size: 0.8125rem; min-width: 300px; }
  .content-table th, .content-table td { padding: 10px 12px; }

  /* Списки */
  .block ul.content-list { padding-left: 1.25em; margin-bottom: 16px; }

  /* Футер */
  .footer { padding: 32px 16px 24px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px 16px; margin-bottom: 28px; max-width: 100%; }
  .footer-col h3 { font-size: 0.8125rem; margin-bottom: 10px; }
  .footer-col a { font-size: 0.875rem; }
  .footer-payments { gap: 12px; margin-bottom: 24px; justify-content: center; }
  .footer-payments img { height: 26px; }
  .footer-legal { font-size: 0.75rem; padding: 0; }

  /* Кнопка «наверх»: не перекрывает контент */
  .btn-back-top {
    right: 16px;
    bottom: 24px;
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
    font-size: 1.25rem;
  }

  .step-grid { grid-template-columns: 1fr; gap: 14px; }
  .step-card { padding: 18px; }
}

/* Маленькие экраны */
@media (max-width: 380px) {
  .header { padding: 8px 12px; }
  .logo img { height: 32px; }
  .header .btn { padding: 10px 12px; font-size: 0.75rem; }
  .hero-text { padding: 0 12px; }
  .block-hero h1 { font-size: 1.1rem; }
  .block { padding: 24px 12px 28px; }
  .main h2 { font-size: 1rem; }
  .game-card { width: 140px; min-width: 140px; }
  .game-card-img { height: 175px; }
  .block-feed { margin-left: 12px; margin-right: 12px; padding: 14px 12px; }
  .table-scroll { margin-left: -12px; margin-right: -12px; padding: 0 12px; }
  .btn-back-top { right: 12px; bottom: 20px; width: 44px; height: 44px; min-width: 44px; min-height: 44px; }
}
