/* ===== Reset & Base ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --color-bg: #0a1628;
  --color-bg-alt: #0f1f38;
  --color-surface: #152a4a;
  --color-surface-light: #1e3a5f;
  --color-gold: #d4a843;
  --color-gold-light: #f0c96e;
  --color-green: #2ecc71;
  --color-text: #e8edf5;
  --color-text-muted: #94a3b8;
  --color-border: rgba(255, 255, 255, 0.08);
  --font-main: "Segoe UI", system-ui, -apple-system, sans-serif;
  --max-width: 1200px;
  --header-height: 64px;
  --radius: 12px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

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

body {
  font-family: var(--font-main);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.7;
  font-size: 16px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

a {
  color: var(--color-gold-light);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--color-gold);
}

ul, ol {
  padding-left: 1.5rem;
}

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 22, 40, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  height: var(--header-height);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.02em;
}

.logo span {
  color: var(--color-gold);
}

.site-nav {
  display: flex;
  gap: 1.75rem;
  list-style: none;
  padding: 0;
}

.site-nav a {
  color: var(--color-text-muted);
  font-size: 0.9375rem;
  font-weight: 500;
}

.site-nav a:hover,
.site-nav a.is-active {
  color: var(--color-gold-light);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--color-text);
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: currentColor;
  margin: 5px 0;
  transition: transform 0.3s;
}

/* ===== Widget ===== */
.widget-section {
  background: var(--color-bg-alt);
  border-bottom: 1px solid var(--color-border);
}

#casino-widget-iframe {
  width: 100%;
  border: none;
  display: block;
  overflow: hidden;
  min-height: 750px;
  height: 750px;
}

/* ===== Layout ===== */
.page-layout {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 2.5rem;
  flex: 1;
}

.page-layout--single {
  grid-template-columns: 1fr;
  max-width: 800px;
}

/* ===== TOC ===== */
.toc {
  position: sticky;
  top: calc(var(--header-height) + 1.5rem);
  align-self: start;
  background: var(--color-surface);
  border-radius: var(--radius);
  padding: 1.25rem;
  border: 1px solid var(--color-border);
  max-height: calc(100vh - var(--header-height) - 3rem);
  overflow-y: auto;
}

.toc__title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-gold);
  margin-bottom: 0.75rem;
  font-weight: 600;
}

.toc ol {
  list-style: none;
  padding: 0;
  counter-reset: toc;
}

.toc li {
  counter-increment: toc;
  margin-bottom: 0.35rem;
}

.toc a {
  display: block;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  padding: 0.25rem 0;
  line-height: 1.4;
}

.toc a:hover {
  color: var(--color-gold-light);
}

/* ===== Hero ===== */
/* ===== Hero intro (above widget) ===== */
.hero--intro {
  margin-bottom: 0;
  padding: 2.5rem 1.25rem 2rem;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg);
}

.hero__inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.hero {
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--color-border);
}

.hero__badge {
  display: inline-block;
  background: rgba(212, 168, 67, 0.15);
  color: var(--color-gold);
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  margin-bottom: 1rem;
  border: 1px solid rgba(212, 168, 67, 0.3);
}

.hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  line-height: 1.25;
  font-weight: 700;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.hero__lead {
  font-size: 1.0625rem;
  color: var(--color-text-muted);
  max-width: 720px;
}

/* ===== Content ===== */
.content section {
  margin-bottom: 2.75rem;
  scroll-margin-top: calc(var(--header-height) + 1rem);
}

.content h2 {
  font-size: clamp(1.25rem, 2.5vw, 1.625rem);
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--color-text);
  letter-spacing: -0.01em;
  padding-left: 0.875rem;
  border-left: 3px solid var(--color-gold);
}

.content h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 1.5rem 0 0.75rem;
  color: var(--color-gold-light);
}

.content p {
  margin-bottom: 1rem;
  color: var(--color-text-muted);
}

.content ul,
.content ol {
  margin-bottom: 1rem;
  color: var(--color-text-muted);
}

.content li {
  margin-bottom: 0.4rem;
}

.content li::marker {
  color: var(--color-gold);
}

/* ===== Tables ===== */
.table-wrap {
  overflow-x: auto;
  margin: 1.25rem 0 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

thead {
  background: var(--color-surface-light);
}

th {
  text-align: left;
  padding: 0.875rem 1rem;
  font-weight: 600;
  color: var(--color-gold-light);
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

td {
  padding: 0.875rem 1rem;
  border-top: 1px solid var(--color-border);
  color: var(--color-text-muted);
}

tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

/* ===== Author Badge ===== */
.author-badge {
  display: flex;
  gap: 1.25rem;
  align-items: center;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin: 2.5rem 0;
}

.author-badge__photo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 20%;
  border: 2px solid var(--color-gold);
  flex-shrink: 0;
  background: var(--color-surface-light);
}

.author-badge__info {
  flex: 1;
}

.author-badge__label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-gold);
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.author-badge__name {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 0.35rem;
}

.author-badge__bio {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  line-height: 1.5;
}

/* ===== FAQ ===== */
.faq-list {
  list-style: none;
  padding: 0;
}

.faq-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
  overflow: hidden;
  background: var(--color-surface);
}

.faq-item summary {
  padding: 1rem 1.25rem;
  cursor: pointer;
  font-weight: 600;
  color: var(--color-text);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  color: var(--color-gold);
  font-size: 1.25rem;
  flex-shrink: 0;
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-item p {
  padding: 0 1.25rem 1rem;
  margin: 0;
}

/* ===== Contact Page ===== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 2rem;
}

.contact-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 2rem;
}

.contact-card h2 {
  font-size: 1.25rem;
  margin-bottom: 1.25rem;
  color: var(--color-gold-light);
  border-left: none;
  padding-left: 0;
}

.contact-item {
  margin-bottom: 1.25rem;
}

.contact-item__label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-gold);
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.contact-item p,
.contact-item a {
  color: var(--color-text-muted);
  font-size: 1rem;
}

.map-wrap {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--color-border);
  aspect-ratio: 4 / 3;
}

.map-wrap iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* ===== 404 ===== */
.error-page {
  text-align: center;
  padding: 4rem 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.error-page__code {
  font-size: clamp(4rem, 12vw, 8rem);
  font-weight: 800;
  color: var(--color-gold);
  line-height: 1;
  margin-bottom: 1rem;
}

.error-page h1 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: 1rem;
}

.error-page p {
  color: var(--color-text-muted);
  margin-bottom: 2rem;
  max-width: 480px;
}

.btn {
  display: inline-block;
  background: var(--color-gold);
  color: var(--color-bg);
  font-weight: 600;
  padding: 0.875rem 2rem;
  border-radius: 999px;
  transition: background 0.2s, transform 0.2s;
}

.btn:hover {
  background: var(--color-gold-light);
  color: var(--color-bg);
  transform: translateY(-1px);
}

/* ===== Footer ===== */
.site-footer {
  background: var(--color-bg-alt);
  border-top: 1px solid var(--color-border);
  padding: 2.5rem 1.25rem;
  margin-top: auto;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.footer-brand p {
  color: var(--color-text-muted);
  font-size: 0.875rem;
  margin-top: 0.5rem;
  max-width: 360px;
}

.footer-contacts h3 {
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-gold);
  margin-bottom: 0.75rem;
}

.footer-contacts p {
  color: var(--color-text-muted);
  font-size: 0.9375rem;
  margin-bottom: 0.35rem;
}

.footer-contacts a {
  color: var(--color-text-muted);
}

.footer-contacts a:hover {
  color: var(--color-gold-light);
}

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

/* ===== Cookie Banner ===== */
#cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding: 1.25rem 1.5rem;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.4);
}

#cookie-banner[hidden] {
  display: none;
}

.cookie-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.cookie-inner p {
  color: var(--color-text-muted);
  font-size: 0.875rem;
  flex: 1;
  min-width: 240px;
}

.cookie-actions {
  display: flex;
  gap: 0.75rem;
  flex-shrink: 0;
}

.cookie-actions button {
  padding: 0.625rem 1.25rem;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background 0.2s;
}

#cookie-accept {
  background: var(--color-gold);
  color: var(--color-bg);
}

#cookie-accept:hover {
  background: var(--color-gold-light);
}

#cookie-decline {
  background: transparent;
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
}

#cookie-decline:hover {
  background: rgba(255, 255, 255, 0.05);
}

/* ===== Responsive ===== */
@media (max-width: 960px) {
  .page-layout {
    grid-template-columns: 1fr;
  }

  .toc {
    position: static;
    max-height: none;
  }

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

  .footer-inner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--color-bg-alt);
    flex-direction: column;
    padding: 1rem 1.25rem 1.5rem;
    gap: 0;
    border-bottom: 1px solid var(--color-border);
    display: none;
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav li {
    border-bottom: 1px solid var(--color-border);
  }

  .site-nav a {
    display: block;
    padding: 0.875rem 0;
  }

  .author-badge {
    flex-direction: column;
    text-align: center;
  }

  .cookie-inner {
    flex-direction: column;
    align-items: stretch;
  }

  .cookie-actions {
    justify-content: stretch;
  }

  .cookie-actions button {
    flex: 1;
  }
}
