/* ============================================================
   CRAZY TIME PLAY — Main Stylesheet
   ============================================================
   Тёмная неоновая тема. Картинки уменьшены до 480px
   с ограничением по высоте 320px.
   Мобильное меню (бургер) для экранов < 768px.
   ============================================================ */

/* ---------- ПЕРЕМЕННЫЕ ---------- */
:root {
  --bg: #0a0a0f;
  --bg2: #12121a;
  --card: #1a1a26;
  --accent: #ff2e88;
  --accent2: #7b2ff7;
  --glow: rgba(255, 46, 136, .4);
  --gold: #ffd166;
  --text: #e8e8f0;
  --muted: #9a9ab0;
  --border: #2a2a3a;
  --r: 16px;
  --sh: 0 8px 32px rgba(0, 0, 0, .4);
}

/* ---------- RESET ---------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 16px;
  overflow-x: hidden;
}

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

/* ---------- SKIP LINK (accessibility) ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 12px 20px;
  z-index: 999;
  text-decoration: none;
  border-radius: 0 0 8px 0;
  font-weight: 700;
}
.skip-link:focus {
  left: 0;
}

/* ---------- HEADER ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 15, .9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 14px 24px;
}

.nav-container {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}

.logo {
  font-size: 1.35rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none;
  letter-spacing: -.5px;
  z-index: 101;
}

.nav-links {
  display: flex;
  gap: 20px;
  list-style: none;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: .9rem;
  font-weight: 500;
  transition: color .2s;
}

.nav-links a:hover {
  color: var(--accent);
}

/* ---------- BURGER MENU (mobile) ---------- */
.burger {
  display: none;
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 12px 14px;
  flex-direction: column;
  gap: 5px;
  z-index: 101;
  -webkit-tap-highlight-color: transparent;
  margin-left: auto;
  flex-shrink: 0;
}

.burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  transition: transform .3s, opacity .3s;
}

.burger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.burger.active span:nth-child(2) {
  opacity: 0;
}
.burger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---------- BREADCRUMBS ---------- */
.breadcrumbs {
  max-width: 1240px;
  margin: 0 auto;
  padding: 14px 24px 0;
  font-size: .85rem;
  color: var(--muted);
}

.breadcrumbs ol {
  list-style: none;
  display: flex;
  gap: 8px;
}

.breadcrumbs li:not(:last-child)::after {
  content: "/";
  margin-left: 8px;
  color: var(--border);
}

.breadcrumbs a {
  color: var(--muted);
  text-decoration: none;
  transition: color .2s;
}

.breadcrumbs a:hover {
  color: var(--accent);
}

/* ---------- HERO ---------- */
.hero {
  padding: 80px 24px 56px;
  text-align: center;
  background: radial-gradient(circle at 50% 0%, rgba(123, 47, 247, .15), transparent 60%);
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 20px;
  background: linear-gradient(135deg, #fff 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
}

.hero .lead {
  max-width: 820px;
  margin: 0 auto 16px;
  color: var(--muted);
  font-size: 1.12rem;
  line-height: 1.75;
}

.hero .lead:last-child {
  margin-bottom: 0;
}

/* ---------- CASINO BLOCK ---------- */
.casino-block {
  max-width: 1240px;
  margin: 40px auto;
  padding: 0 24px;
}

.casino-block h2 {
  font-size: 1.75rem;
  margin-bottom: 22px;
  text-align: center;
  color: #fff;
  font-weight: 700;
}

.casino-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}

.casino-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 28px 24px;
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  transition: transform .3s, border-color .3s, box-shadow .3s;
  will-change: transform;
}

.casino-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 12px 40px var(--glow);
}

.casino-card img {
  width: 180px;
  height: 70px;
  object-fit: contain;
}

.casino-card h3 {
  color: #fff;
  font-size: 1.15rem;
  font-weight: 700;
  text-align: center;
}

.casino-card .bonus {
  color: var(--gold);
  font-weight: 600;
  text-align: center;
  font-size: .95rem;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.casino-card .promo {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
  padding: 5px 15px;
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 700;
}

.casino-card .cta-btn {
  margin-top: 6px;
  padding: 11px 30px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
  border-radius: 999px;
  font-weight: 700;
  font-size: .92rem;
  transition: transform .2s;
}

.casino-card:hover .cta-btn {
  transform: scale(1.05);
}

.casino-card .rating {
  font-size: .82rem;
  color: var(--muted);
}

/* ---------- CONTENT WRAPPER ---------- */
.content-wrapper {
  max-width: 880px;
  margin: 0 auto;
  padding: 48px 24px;
}

.content-wrapper h2 {
  font-size: 1.85rem;
  margin: 48px 0 20px;
  color: #fff;
  border-left: 4px solid var(--accent);
  padding-left: 16px;
  font-weight: 700;
  line-height: 1.3;
}

.content-wrapper h3 {
  font-size: 1.3rem;
  margin: 32px 0 14px;
  color: var(--gold);
  font-weight: 600;
}

.content-wrapper p {
  margin-bottom: 18px;
  color: #d0d0e0;
}

.content-wrapper ul,
.content-wrapper ol {
  margin: 16px 0 20px 24px;
  color: #d0d0e0;
}

.content-wrapper li {
  margin-bottom: 8px;
}

.content-wrapper strong {
  color: #fff;
  font-weight: 700;
}

.content-wrapper a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 46, 136, .3);
  transition: border-color .2s;
}

.content-wrapper a:hover {
  border-bottom-color: var(--accent);
}

/* ---------- BYLINE ---------- */
.byline {
  font-size: .85rem;
  color: var(--muted);
  border-left: 3px solid var(--accent);
  padding: 8px 0 8px 14px;
  margin: 0 0 32px;
  line-height: 1.6;
}

.byline strong {
  color: #fff;
}

/* ---------- IMAGES (уменьшено) ---------- */
.content-img {
  width: 100%;
  max-width: 480px;
  height: auto;
  max-height: 320px;
  border-radius: 12px;
  margin: 28px auto;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .35);
  display: block;
  border: 1px solid var(--border);
  transition: transform .3s, box-shadow .3s;
  object-fit: cover;
  aspect-ratio: 16 / 9;
}

.content-img:hover {
  transform: scale(1.02);
  box-shadow: 0 10px 36px rgba(255, 46, 136, .25);
}

.content-figure {
  margin: 28px auto;
  max-width: 480px;
  text-align: center;
}

.content-figure .content-img {
  margin: 0 auto 10px;
}

.content-figure figcaption {
  font-size: .82rem;
  color: var(--muted);
  font-style: italic;
  line-height: 1.5;
  padding: 0 10px;
}

/* ---------- SPEC TABLE ---------- */
.spec-table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  background: var(--card);
  border-radius: var(--r);
  overflow: hidden;
  font-size: .92rem;
}

.spec-table th,
.spec-table td {
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.spec-table th {
  background: linear-gradient(135deg, rgba(255, 46, 136, .15), rgba(123, 47, 247, .15));
  color: var(--accent);
  font-weight: 700;
  text-transform: uppercase;
  font-size: .78rem;
  letter-spacing: 1px;
}

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

.spec-table tr:hover td {
  background: rgba(255, 255, 255, .02);
}

/* ---------- FAQ ---------- */
.faq-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  margin-bottom: 12px;
  overflow: hidden;
}

.faq-question {
  padding: 20px 24px;
  cursor: pointer;
  font-weight: 600;
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  user-select: none;
  transition: background .2s;
}

.faq-question:hover {
  background: rgba(255, 46, 136, .05);
}

.faq-question:focus {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.faq-question::after {
  content: "+";
  font-size: 1.5rem;
  color: var(--accent);
  flex-shrink: 0;
  transition: transform .3s;
}

.faq-item.open .faq-question::after {
  content: "−";
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height .4s ease, padding .3s;
  padding: 0 24px;
  color: var(--muted);
}

.faq-item.open .faq-answer {
  max-height: 800px;
  padding: 0 24px 20px;
}

/* ---------- FOOTER ---------- */
.site-footer {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 48px 24px 24px;
  margin-top: 80px;
}

.footer-grid {
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 32px;
}

.footer-col h4 {
  font-size: .78rem;
  margin-bottom: 16px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 700;
}

.footer-col ul {
  list-style: none;
}

.footer-col a {
  color: var(--muted);
  text-decoration: none;
  font-size: .9rem;
  display: block;
  padding: 6px 0;
  transition: color .2s;
}

.footer-col a:hover {
  color: var(--accent);
}

.footer-bottom {
  max-width: 1240px;
  margin: 40px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--muted);
  font-size: .85rem;
}

.disclaimer {
  font-size: .78rem;
  color: #6a6a80;
  max-width: 900px;
  margin: 14px auto 0;
  line-height: 1.6;
}

/* ---------- SCREEN READER ONLY ---------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- ANIMATIONS ---------- */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-up {
  animation: fadeUp .6s ease both;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 768px) {
  .burger {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--bg2);
    flex-direction: column;
    padding: 20px 24px 28px;
    gap: 4px;
    border-bottom: 1px solid var(--border);
    transform: translateY(-120%);
    transition: transform .35s ease;
    z-index: 99;
    box-shadow: 0 20px 40px rgba(0, 0, 0, .4);
  }

  .nav-links.open {
    transform: translateY(0);
  }

  .nav-links li {
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, .04);
  }

  .nav-links li:last-child {
    border-bottom: 0;
  }

  .nav-links a {
    display: block;
    padding: 14px 4px;
    font-size: 1rem;
    color: var(--text);
  }

  .nav-links a:active {
    color: var(--accent);
  }

  .hero {
    padding: 48px 16px 40px;
  }

  .content-wrapper {
    padding: 32px 16px;
  }

  .content-wrapper h2 {
    font-size: 1.5rem;
  }

  .content-wrapper h3 {
    font-size: 1.15rem;
  }

  .casino-grid {
    grid-template-columns: 1fr;
  }

  .spec-table {
    font-size: .82rem;
  }

  .spec-table th,
  .spec-table td {
    padding: 10px 12px;
  }

  .content-img,
  .content-figure {
    max-width: 100%;
    max-height: 260px;
    border-radius: 10px;
    margin: 20px auto;
  }

  .casino-card img {
    width: 150px;
    height: 60px;
  }
}

@media (max-width: 480px) {
  .logo {
    font-size: 1.1rem;
  }

  .hero h1 {
    font-size: 1.6rem;
  }

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

  .casino-card {
    padding: 20px 16px;
  }

  .casino-card h3 {
    font-size: 1rem;
  }

  .casino-card .bonus {
    font-size: .85rem;
  }

  .content-wrapper h2 {
    font-size: 1.3rem;
    padding-left: 12px;
  }

  .content-img,
  .content-figure {
    max-height: 220px;
    border-radius: 8px;
    margin: 16px auto;
  }
}

/* ---------- REDUCED MOTION ---------- */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
  html {
    scroll-behavior: auto;
  }
}

/* ---------- PRINT ---------- */
@media print {
  .site-header,
  .casino-block,
  .site-footer,
  .faq-question::after,
  .burger {
    display: none;
  }
  body {
    background: #fff;
    color: #000;
  }
  .content-wrapper a {
    color: #000;
    border-bottom: 1px solid #000;
  }
  .content-img {
    box-shadow: none;
    border: 1px solid #ccc;
  }
}
