/* PHUKET188 — black, gold & luxury red */
*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --gold: #d4af37;
  --gold-bright: #f0c75a;
  --red: #8b0000;
  --red-dark: #5c0000;
  --red-btn: #c41e3a;
  --bg-page: #0a0a0a;
  --bg-section: #111111;
  --bg-section-alt: #141414;
  --bg-divider: #0d0d0d;
  --text: #f5f0e1;
  --muted: #b8a880;
  --line: #2a2218;
  --footer-bg: #080808;
  --footer-text: #f5f0e1;
  --footer-muted: #9a8a6a;
  --float-bg: #1a1410;
  --max: 640px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Leelawadee UI", "Segoe UI", Tahoma, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg-page);
  padding-bottom: 88px;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ── Header ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.65rem 1rem;
  background: var(--bg-section);
  color: var(--text);
  border-bottom: 1px solid var(--line);
}

.header-logo-link {
  flex: 1;
  min-width: 0;
  line-height: 0;
}

.header-logo {
  width: auto;
  height: 26px;
  max-width: 110px;
  object-fit: contain;
  object-position: left center;
}

.status-badge {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.65rem;
  border: 1.5px solid var(--gold);
  border-radius: 999px;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--gold-bright);
  white-space: nowrap;
}

.status-live {
  color: var(--gold-bright);
  animation: live-glow 2.5s ease-in-out infinite;
}

@keyframes live-glow {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.72; }
}

/* ── Announcement ticker ── */
.announcement-bar {
  background: var(--bg-section-alt);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.announcement-inner {
  max-width: var(--max);
  margin: 0 auto;
  overflow: hidden;
}

.announcement-track {
  display: flex;
  width: max-content;
  animation: announcement-scroll 28s linear infinite;
}

.announcement-text {
  flex-shrink: 0;
  margin: 0;
  padding: 0.55rem 1.5rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gold-bright);
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.announcement-text::before {
  content: "📢 ";
}

@keyframes announcement-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ── Hero: banner + CTA buttons ── */
.hero {
  max-width: var(--max);
  margin: 0 auto;
  background: var(--bg-page);
}

.banner {
  position: relative;
  width: 100%;
  overflow: hidden;
  line-height: 0;
}

.banner-img {
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 1;
  object-fit: cover;
}

.banner-actions {
  display: flex;
  gap: 0.65rem;
  padding: 0.85rem 1rem 1rem;
  background: var(--bg-page);
}

.btn-register,
.btn-login {
  position: relative;
  flex: 1;
  display: block;
  padding: 0.85rem 0.75rem;
  font-size: 0.95rem;
  font-weight: 700;
  text-align: center;
  border-radius: 999px;
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-text {
  position: relative;
  z-index: 1;
}

.btn-register {
  color: #0a0a0a;
  background: linear-gradient(120deg, #f0c75a, #d4af37, #8b0000, #d4af37);
  background-size: 200% 200%;
  animation: btn-gradient 4s ease infinite;
  box-shadow: 0 4px 18px rgba(212, 175, 55, 0.45), 0 0 24px rgba(139, 0, 0, 0.35);
}

.btn-register::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 30%,
    rgba(255, 255, 255, 0.45) 50%,
    transparent 70%
  );
  transform: translateX(-120%);
  animation: btn-shimmer 2.8s ease-in-out infinite;
}

.btn-register:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 28px rgba(212, 175, 55, 0.55), 0 0 36px rgba(139, 0, 0, 0.4);
}

.btn-login {
  color: var(--gold-bright);
  background: #111111;
  border: 2px solid transparent;
  background-image: linear-gradient(#111111, #111111), linear-gradient(120deg, #8b0000, #d4af37, #8b0000);
  background-origin: border-box;
  background-clip: padding-box, border-box;
  background-size: auto, 200% 200%;
  animation: btn-border-glow 4s ease infinite;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
}

.btn-login::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 20px rgba(212, 175, 55, 0.12);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.btn-login:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 24px rgba(212, 175, 55, 0.18), 0 0 20px rgba(139, 0, 0, 0.35);
}

.btn-login:hover::after {
  opacity: 1;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  padding: 0 1rem 1rem;
  background: var(--bg-page);
}

.feature-section-title {
  margin: 0;
  padding: 0.2rem 1rem 0.65rem;
  font-size: 1rem;
  line-height: 1.35;
  color: var(--text);
}

.feature-card {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.7rem 0.75rem;
  background: var(--bg-section);
  border: 1px solid var(--line);
  border-radius: 12px;
  min-height: 64px;
}

.feature-icon {
  width: 2rem;
  height: 2rem;
  object-fit: contain;
  flex-shrink: 0;
}

.feature-card h3 {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.35;
  color: var(--text);
}

@keyframes btn-gradient {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes btn-shimmer {
  0% { transform: translateX(-120%); }
  60%, 100% { transform: translateX(120%); }
}

@keyframes btn-border-glow {
  0%, 100% { background-position: 0% 50%, 0% 50%; }
  50% { background-position: 0% 50%, 100% 50%; }
}

@media (prefers-reduced-motion: reduce) {
  .btn-register,
  .btn-login,
  .floating-bar {
    animation: none;
  }

  .btn-register::before,
  .floating-bar::before {
    animation: none;
    display: none;
  }

  .status-live {
    animation: none;
  }

  .announcement-track {
    animation: none;
  }
}

/* ── Menu / Games list ── */
.menu {
  max-width: var(--max);
  margin: 0 auto;
  background: var(--bg-page);
}

.menu-grid {
  display: flex;
  flex-direction: column;
  border-bottom: 8px solid var(--bg-divider);
}

.menu-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto repeat(3, minmax(0, 1fr));
  border-top: 8px solid var(--bg-divider);
}

.menu-row:first-child {
  border-top: none;
}

.menu-category {
  display: grid;
  grid-template-rows: subgrid;
  grid-row: 1 / -1;
  background: var(--bg-section);
  min-width: 0;
}

.menu-category:first-child {
  border-right: 1px solid var(--line);
}

.menu-category-title {
  margin: 0;
  padding: 0.75rem 0.65rem 0.6rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  line-height: 1.35;
  align-self: end;
  min-height: 2.85rem;
}

.menu-list {
  display: contents;
  list-style: none;
  margin: 0;
  padding: 0;
}

.menu-item {
  display: flex;
  align-items: stretch;
  min-height: 100%;
  border-top: 1px solid var(--line);
  background: var(--bg-section-alt);
}

.menu-item-link {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem;
  width: 100%;
  padding: 0.85rem 0.75rem;
  color: inherit;
}

.menu-item-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.menu-item-info h3 {
  margin: 0 0 0.25rem;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.25;
}

.menu-item-info p {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.8em;
}

.menu-item-rtp {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.35rem;
  margin-top: auto;
  padding-top: 0.45rem;
  width: 100%;
}

.rtp-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--gold-bright);
  line-height: 1.2;
  text-shadow: 0 0 12px rgba(212, 175, 55, 0.35);
}

.rtp-bar {
  height: 7px;
  width: 100%;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.35);
}

.rtp-fill {
  display: block;
  height: 100%;
  width: calc(var(--rtp) * 1%);
  max-width: 100%;
  background: linear-gradient(90deg, #8b0000, #d4af37, #f0c75a);
  border-radius: 4px;
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.55);
}

.menu-item-link:hover .menu-item-thumb {
  transform: scale(1.04);
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.35);
}

.menu-item-thumb {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
  background: var(--bg-divider);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.menu-item-link:hover .menu-item-info h3 {
  color: var(--gold-bright);
}

/* Fallback when subgrid is unsupported */
@supports not (grid-template-rows: subgrid) {
  .menu-row {
    grid-template-rows: none;
    align-items: stretch;
  }

  .menu-category {
    display: flex;
    flex-direction: column;
    grid-row: auto;
  }

  .menu-list {
    display: flex;
    flex-direction: column;
    flex: 1;
  }

  .menu-item {
    flex: 1;
  }
}

/* ── Story content ── */
.style_story {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2rem 1rem 2.5rem;
  background: var(--bg-section);
  border-top: 8px solid var(--bg-divider);
}

.style_story h1 {
  margin: 0 0 1rem;
  font-size: 1.5rem;
  line-height: 1.3;
}

.style_story h2 {
  margin: 1.75rem 0 0.75rem;
  font-size: 1.15rem;
}

.style_story p {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.style_story ul {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.style_story li {
  margin-bottom: 0.35rem;
}

/* ── Footer ── */
.site-footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  padding: 1.5rem 1rem 1.5rem;
}

.footer-trust {
  max-width: var(--max);
  margin: 0 auto 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #2a2f3d;
}

.footer-trust img {
  width: 100%;
  height: auto;
  margin-bottom: 0.85rem;
  display: block;
}

.footer-trust img:last-child {
  margin-bottom: 0;
}

.footer-block {
  max-width: var(--max);
  margin: 0 auto 1.5rem;
}

.footer-block h2 {
  margin: 0 0 0.75rem;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.footer-block p,
.footer-block address {
  margin: 0;
  font-style: normal;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--footer-muted);
}

.footer-block a {
  color: var(--footer-muted);
}

.footer-block a:hover {
  color: #f5f0e1;
}

.footer-social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid #444;
  border-radius: 50%;
  color: #f5f0e1;
  overflow: hidden;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.footer-social img {
  width: 1.35rem;
  height: 1.35rem;
  object-fit: contain;
  display: block;
}

.footer-social:hover {
  border-color: var(--gold);
  transform: scale(1.06);
}

.footer-socials {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.footer-bottom {
  max-width: var(--max);
  margin: 0 auto;
  padding-top: 1.25rem;
  border-top: 1px solid #333;
  font-size: 0.8rem;
  color: var(--footer-muted);
}

.footer-bottom p {
  margin: 0.35rem 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin-top: 0.75rem;
}

/* ── Floating bar ── */
.floating-bar-wrap {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 30;
  padding: 0 10px 10px;
  pointer-events: none;
}

.floating-bar {
  pointer-events: auto;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.95rem 1.25rem;
  color: #f5f0e1;
  font-size: 0.95rem;
  font-weight: 700;
  text-align: center;
  border-radius: 999px;
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(120deg, #f0c75a, #d4af37, #8b0000, #d4af37);
  background-size: 200% 200%;
  animation: btn-gradient 4s ease infinite;
  box-shadow: 0 4px 24px rgba(212, 175, 55, 0.45), 0 0 28px rgba(139, 0, 0, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.floating-bar::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 30%,
    rgba(255, 255, 255, 0.4) 50%,
    transparent 70%
  );
  transform: translateX(-120%);
  animation: btn-shimmer 2.8s ease-in-out infinite;
}

.floating-bar:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(79, 172, 254, 0.55), 0 0 36px rgba(139, 92, 246, 0.35);
}

.floating-bar .btn-text {
  position: relative;
  z-index: 1;
}

@media (min-width: 641px) {
  body {
    background: var(--bg-page);
  }

  .site-header,
  .announcement-bar .announcement-inner,
  .hero,
  .menu,
  .style_story,
  .site-footer .footer-trust,
  .site-footer .footer-block,
  .site-footer .footer-bottom {
    max-width: var(--max);
    margin-left: auto;
    margin-right: auto;
  }

  .site-header {
    border-radius: 0;
  }

  .menu,
  .style_story {
    background: var(--bg-section);
  }
}

@media (max-width: 520px) {
  .feature-section-title {
    padding: 0.15rem 0.75rem 0.55rem;
    font-size: 0.84rem;
  }

  .feature-grid {
    gap: 0.5rem;
    padding: 0 0.75rem 0.85rem;
  }

  .feature-card {
    padding: 0.58rem 0.55rem;
    min-height: 58px;
  }

  .feature-icon {
    width: 1.75rem;
    height: 1.75rem;
  }

  .feature-card h3 {
    font-size: 0.68rem;
    line-height: 1.3;
  }

  .menu-category-title {
    font-size: 0.58rem;
    padding: 0.55rem 0.4rem 0.45rem;
    min-height: 2.5rem;
    letter-spacing: 0.02em;
    line-height: 1.3;
  }

  .menu-item-link {
    padding: 0.6rem 0.4rem;
    gap: 0.4rem;
  }

  .menu-item-info h3 {
    font-size: 0.75rem;
  }

  .menu-item-info p {
    font-size: 0.65rem;
    margin-bottom: 0.25rem;
    line-height: 1.35;
    min-height: 2.7em;
  }

  .menu-item-rtp {
    padding-top: 0.3rem;
    gap: 0.25rem;
  }

  .rtp-label {
    font-size: 0.65rem;
  }

  .rtp-bar {
    height: 5px;
  }

  .menu-item-thumb {
    width: 48px;
    height: 48px;
    border-radius: 6px;
  }
}
