/* ============================================================
 * Milyon (milyon.homes) - Core Stylesheet
 * All custom classes use the w4540- prefix.
 * Palette: #191970 | #2D2D2D | #EE82EE | #F0F8FF | #8470FF
 * Mobile-first, root font 62.5%.
 * ============================================================ */

:root {
  --w4540-primary: #191970;     /* midnight blue */
  --w4540-deep: #14142e;        /* darker shade */
  --w4540-dark: #2D2D2D;        /* charcoal */
  --w4540-accent: #EE82EE;      /* violet pink */
  --w4540-slate: #8470FF;       /* slate purple */
  --w4540-light: #F0F8FF;       /* alice blue */
  --w4540-bg: #161635;
  --w4540-card: #1f1f4a;
  --w4540-card-2: #262657;
  --w4540-text: #F0F8FF;
  --w4540-muted: #b9b9d8;
  --w4540-gold: #ffd56b;
  --w4540-radius: 14px;
  --w4540-shadow: 0 6px 22px rgba(0, 0, 0, .35);
  --w4540-maxw: 430px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  padding: 0;
  background: radial-gradient(circle at 50% 0%, #20205c 0%, var(--w4540-bg) 55%, #0f0f24 100%);
  color: var(--w4540-text);
  font-family: "Segoe UI", "Helvetica Neue", Arial, "Noto Sans", system-ui, sans-serif;
  font-size: 1.5rem;
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
}

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

a { color: var(--w4540-accent); text-decoration: none; }
a:hover { color: var(--w4540-light); }

h1, h2, h3, h4 { color: var(--w4540-light); line-height: 1.25; margin: 0 0 .6em; font-weight: 700; }
h1 { font-size: 2.4rem; }
h2 { font-size: 2.1rem; }
h3 { font-size: 1.8rem; }
p { margin: 0 0 1em; }

/* ---------- Layout helpers ---------- */
.w4540-container {
  width: 100%;
  max-width: var(--w4540-maxw);
  margin: 0 auto;
  padding: 0 1.2rem;
}
.w4540-wrapper { width: 100%; max-width: 960px; margin: 0 auto; padding: 0 1.2rem; }
.w4540-grid { display: grid; gap: 1.2rem; }
.w4540-section { padding: 2.4rem 0; }

.w4540-text-center { text-align: center; }
.w4540-mt-1 { margin-top: .5rem; }
.w4540-mt-2 { margin-top: 1rem; }

/* ---------- Promo buttons ---------- */
.w4540-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  padding: 1rem 1.8rem;
  font-size: 1.5rem;
  font-weight: 700;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, filter .2s ease;
  min-height: 44px;
  text-decoration: none;
}
.w4540-btn:active { transform: scale(.96); }
.w4540-btn-primary {
  background: linear-gradient(135deg, var(--w4540-accent), var(--w4540-slate));
  color: #fff;
  box-shadow: 0 6px 16px rgba(238, 130, 238, .35);
}
.w4540-btn-primary:hover { filter: brightness(1.08); color: #fff; }
.w4540-btn-ghost {
  background: rgba(240, 248, 255, .08);
  color: var(--w4540-light);
  border: 1px solid rgba(240, 248, 255, .25);
}
.w4540-btn-ghost:hover { background: rgba(240, 248, 255, .16); color: var(--w4540-light); }
.w4540-btn-gold {
  background: linear-gradient(135deg, var(--w4540-gold), #ffb347);
  color: #2a1a00;
  box-shadow: 0 6px 16px rgba(255, 213, 107, .35);
}

/* Inline text promo link */
.w4540-link-promo {
  color: var(--w4540-accent);
  font-weight: 700;
  border-bottom: 1px dashed rgba(238, 130, 238, .6);
  cursor: pointer;
}
.w4540-link-promo:hover { color: var(--w4540-light); }

/* ---------- Header ---------- */
.w4540-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: linear-gradient(180deg, rgba(20, 20, 46, .98), rgba(20, 20, 46, .88));
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(132, 112, 255, .25);
}
.w4540-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .8rem;
  padding: .8rem 1.2rem;
  max-width: 960px;
  margin: 0 auto;
}
.w4540-brand { display: flex; align-items: center; gap: .6rem; }
.w4540-brand img { width: 32px; height: 32px; border-radius: 8px; }
.w4540-brand-name {
  font-size: 1.9rem;
  font-weight: 800;
  letter-spacing: .5px;
  color: var(--w4540-light);
}
.w4540-brand-name span { color: var(--w4540-accent); }

.w4540-header-actions { display: flex; align-items: center; gap: .6rem; }
.w4540-btn-sm { padding: .65rem 1.2rem; font-size: 1.3rem; }

.w4540-menu-btn {
  background: transparent;
  border: 1px solid rgba(240, 248, 255, .25);
  color: var(--w4540-light);
  width: 40px; height: 40px;
  border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.w4540-menu-btn .bi { font-size: 2rem; }

/* ---------- Mobile slide menu ---------- */
.w4540-menu-backdrop {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, .55);
  opacity: 0; visibility: hidden;
  transition: opacity .25s ease;
  z-index: 9998;
}
.w4540-backdrop-show { opacity: 1; visibility: visible; }

.w4540-mobile-menu {
  position: fixed;
  top: 0; right: -85%;
  width: 80%; max-width: 320px;
  height: 100vh;
  background: linear-gradient(180deg, #1c1c44, #14142e);
  border-left: 1px solid rgba(132, 112, 255, .25);
  z-index: 9999;
  padding: 1.6rem 1.4rem;
  overflow-y: auto;
  transition: right .3s ease;
}
.w4540-menu-open { right: 0; }
.w4540-mobile-menu h4 {
  color: var(--w4540-accent);
  font-size: 1.5rem;
  margin: 1.2rem 0 .6rem;
  letter-spacing: .5px;
  text-transform: uppercase;
}
.w4540-mobile-menu a {
  display: block;
  padding: .8rem 1rem;
  color: var(--w4540-light);
  border-radius: 10px;
  font-size: 1.5rem;
  margin-bottom: .3rem;
  border: 1px solid transparent;
}
.w4540-mobile-menu a:hover, .w4540-mobile-menu a:focus {
  background: rgba(132, 112, 255, .15);
  border-color: rgba(132, 112, 255, .3);
}
.w4540-menu-close {
  background: transparent; border: none; color: var(--w4540-light);
  font-size: 2rem; cursor: pointer; float: right;
}

/* ---------- Hero / Carousel ---------- */
.w4540-hero { padding-top: 1.4rem; }
.w4540-carousel {
  position: relative;
  border-radius: var(--w4540-radius);
  overflow: hidden;
  box-shadow: var(--w4540-shadow);
}
.w4540-slides { position: relative; }
.w4540-slide {
  display: none;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #0c0c20;
}
.w4540-slide img { width: 100%; height: 100%; object-fit: cover; }
.w4540-slide-active { display: block; }
.w4540-carousel-overlay {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 1.2rem;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .75));
  color: #fff;
}
.w4540-carousel-overlay strong { font-size: 1.7rem; }
.w4540-carousel-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(0, 0, 0, .45);
  border: none; color: #fff;
  font-size: 1.8rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.w4540-carousel-arrow:hover { background: rgba(132, 112, 255, .7); }
.w4540-arrow-prev { left: 8px; }
.w4540-arrow-next { right: 8px; }
.w4540-dots {
  position: absolute; bottom: 8px; left: 0; right: 0;
  display: flex; justify-content: center; gap: .5rem;
}
.w4540-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(255, 255, 255, .45);
  border: none; cursor: pointer; padding: 0;
}
.w4540-dot-active { background: var(--w4540-accent); }

.w4540-hero-cta {
  display: flex; gap: .8rem; flex-wrap: wrap;
  margin-top: 1.2rem; justify-content: center;
}

/* ---------- Section headings ---------- */
.w4540-section-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1.2rem; gap: 1rem;
}
.w4540-section-head h2 { margin: 0; font-size: 1.9rem; }
.w4540-section-head .w4540-tag {
  font-size: 1.2rem; color: var(--w4540-slate);
  font-weight: 700; text-transform: uppercase; letter-spacing: 1px;
}
.w4540-section-title { color: var(--w4540-light); }
.w4540-section-title span { color: var(--w4540-accent); }

/* ---------- Game lists ---------- */
.w4540-cat-block { margin-bottom: 2.4rem; }
.w4540-cat-bar {
  display: flex; align-items: center; gap: .8rem;
  padding: .6rem 1rem;
  border-radius: 12px;
  background: linear-gradient(90deg, rgba(132, 112, 255, .25), rgba(238, 130, 238, .12));
  margin-bottom: 1rem;
  border: 1px solid rgba(132, 112, 255, .25);
}
.w4540-cat-bar i, .w4540-cat-bar .material-icons { font-size: 22px; color: var(--w4540-accent); }
.w4540-cat-bar h3 { margin: 0; font-size: 1.7rem; color: var(--w4540-light); }

.w4540-game-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .8rem;
}
.w4540-game-card {
  position: relative;
  background: var(--w4540-card);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid rgba(132, 112, 255, .18);
  transition: transform .15s ease, box-shadow .2s ease, border-color .2s ease;
}
.w4540-game-card:hover, .w4540-game-card:focus {
  transform: translateY(-3px);
  border-color: rgba(238, 130, 238, .55);
  box-shadow: 0 8px 18px rgba(238, 130, 238, .25);
}
.w4540-game-thumb {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #0c0c20;
  overflow: hidden;
}
.w4540-game-thumb img { width: 100%; height: 100%; object-fit: cover; }
.w4540-game-name {
  font-size: 1.2rem;
  padding: .5rem .4rem;
  text-align: center;
  color: var(--w4540-light);
  background: rgba(0, 0, 0, .25);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- Search bar ---------- */
.w4540-search {
  display: flex; align-items: center; gap: .6rem;
  background: var(--w4540-card);
  border: 1px solid rgba(132, 112, 255, .25);
  border-radius: 999px;
  padding: .6rem 1rem;
  margin: 1rem 0 1.6rem;
}
.w4540-search input {
  flex: 1; background: transparent; border: none; outline: none;
  color: var(--w4540-light); font-size: 1.4rem;
}
.w4540-search .material-icons { color: var(--w4540-slate); font-size: 22px; }

/* ---------- Feature / info cards ---------- */
.w4540-card {
  background: var(--w4540-card);
  border-radius: var(--w4540-radius);
  padding: 1.6rem;
  border: 1px solid rgba(132, 112, 255, .2);
  box-shadow: var(--w4540-shadow);
  margin-bottom: 1.2rem;
}
.w4540-card-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--w4540-slate), var(--w4540-accent));
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; margin-bottom: .8rem;
}
.w4540-card-icon i, .w4540-card-icon .material-icons { font-size: 26px; }

.w4540-feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
.w4540-feature {
  background: var(--w4540-card);
  border-radius: 12px;
  padding: 1.2rem;
  border: 1px solid rgba(132, 112, 255, .18);
  text-align: center;
}
.w4540-feature i, .w4540-feature .material-icons {
  font-size: 28px; color: var(--w4540-accent); margin-bottom: .5rem;
}
.w4540-feature h3 { font-size: 1.5rem; margin: .3rem 0; }
.w4540-feature p { font-size: 1.25rem; color: var(--w4540-muted); margin: 0; }

/* ---------- RTP table ---------- */
.w4540-rtp-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .8rem;
}
.w4540-rtp-item {
  background: var(--w4540-card-2);
  border-radius: 10px;
  padding: .8rem;
  border: 1px solid rgba(132, 112, 255, .18);
}
.w4540-rtp-name { font-size: 1.25rem; color: var(--w4540-light); }
.w4540-rtp-value { font-size: 1.7rem; font-weight: 800; color: var(--w4540-gold); }

/* ---------- Winners ticker ---------- */
.w4540-winners {
  background: linear-gradient(135deg, rgba(132, 112, 255, .2), rgba(238, 130, 238, .12));
  border-radius: var(--w4540-radius);
  padding: 1rem 1.2rem;
  border: 1px solid rgba(238, 130, 238, .25);
}
.w4540-winner-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: .5rem 0;
  border-bottom: 1px dashed rgba(240, 248, 255, .12);
  font-size: 1.3rem;
}
.w4540-winner-row:last-child { border-bottom: none; }
.w4540-winner-user { color: var(--w4540-light); }
.w4540-winner-amount { color: var(--w4540-gold); font-weight: 700; }

/* ---------- Testimonials ---------- */
.w4540-review {
  background: var(--w4540-card);
  border-radius: var(--w4540-radius);
  padding: 1.4rem;
  margin-bottom: 1rem;
  border-left: 4px solid var(--w4540-accent);
}
.w4540-review-stars { color: var(--w4540-gold); font-size: 1.3rem; margin-bottom: .4rem; }
.w4540-review p { margin: 0 0 .6rem; font-size: 1.35rem; color: var(--w4540-light); }
.w4540-review-author { font-size: 1.2rem; color: var(--w4540-muted); }

/* ---------- Payment methods ---------- */
.w4540-pay-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .8rem;
}
.w4540-pay-item {
  background: var(--w4540-card);
  border-radius: 10px;
  padding: 1rem .6rem;
  text-align: center;
  border: 1px solid rgba(132, 112, 255, .18);
}
.w4540-pay-item .material-icons, .w4540-pay-item i { font-size: 26px; color: var(--w4540-slate); }
.w4540-pay-item span { display: block; margin-top: .3rem; font-size: 1.15rem; color: var(--w4540-light); }

/* ---------- FAQ ---------- */
.w4540-faq details {
  background: var(--w4540-card);
  border-radius: 10px;
  padding: 1rem 1.2rem;
  margin-bottom: .6rem;
  border: 1px solid rgba(132, 112, 255, .2);
  font-size: 1.4rem;
}
.w4540-faq summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--w4540-light);
  list-style: none;
}
.w4540-faq summary::-webkit-details-marker { display: none; }
.w4540-faq p { color: var(--w4540-muted); margin: .8rem 0 0; }

/* ---------- App download CTA ---------- */
.w4540-app-cta {
  background: linear-gradient(135deg, var(--w4540-primary), var(--w4540-slate));
  border-radius: var(--w4540-radius);
  padding: 1.6rem;
  text-align: center;
  border: 1px solid rgba(238, 130, 238, .3);
}
.w4540-app-cta h3 { color: #fff; margin-bottom: .4rem; }
.w4540-app-cta p { color: var(--w4540-light); }
.w4540-app-buttons { display: flex; gap: .6rem; justify-content: center; flex-wrap: wrap; margin-top: 1rem; }

/* ---------- Prose ---------- */
.w4540-prose { font-size: 1.45rem; color: var(--w4540-muted); line-height: 1.6; }
.w4540-prose h2, .w4540-prose h3 { color: var(--w4540-light); }
.w4540-prose p { margin: 0 0 1em; }
.w4540-prose strong { color: var(--w4540-light); }

/* ---------- Reveal animation ---------- */
.w4540-reveal { opacity: 0; transform: translateY(18px); transition: opacity .5s ease, transform .5s ease; }
.w4540-revealed { opacity: 1; transform: translateY(0); }

/* ---------- Back-to-top ---------- */
.w4540-to-top {
  position: fixed;
  right: 16px; bottom: 96px;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--w4540-slate);
  color: #fff;
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden;
  transition: opacity .25s ease, visibility .25s ease, background .2s ease;
  z-index: 900;
  box-shadow: var(--w4540-shadow);
}
.w4540-to-top-show { opacity: 1; visibility: visible; }
.w4540-to-top:hover { background: var(--w4540-accent); }

/* ---------- Footer ---------- */
.w4540-footer {
  background: linear-gradient(180deg, #15153a, #0d0d22);
  border-top: 1px solid rgba(132, 112, 255, .25);
  padding: 2.4rem 0 8rem;
  margin-top: 2.4rem;
}
.w4540-footer-brand {
  display: flex; align-items: center; gap: .6rem;
  margin-bottom: 1rem;
}
.w4540-footer-brand img { width: 28px; height: 28px; border-radius: 6px; }
.w4540-footer-brand strong { color: var(--w4540-light); font-size: 1.7rem; }
.w4540-footer p { color: var(--w4540-muted); font-size: 1.3rem; }
.w4540-footer-promos {
  display: flex; flex-wrap: wrap; gap: .6rem;
  margin: 1rem 0;
}
.w4540-footer-promos .w4540-btn { flex: 1 1 calc(50% - .6rem); min-width: 140px; }
.w4540-footer-links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .6rem;
  margin: 1.4rem 0;
}
.w4540-footer-links a {
  color: var(--w4540-muted);
  font-size: 1.25rem;
  padding: .4rem .2rem;
}
.w4540-footer-links a:hover { color: var(--w4540-accent); }
.w4540-footer-copy {
  border-top: 1px solid rgba(240, 248, 255, .1);
  padding-top: 1rem;
  margin-top: 1.4rem;
  font-size: 1.15rem;
  color: var(--w4540-muted);
  text-align: center;
}

/* ---------- Bottom mobile navigation ---------- */
.w4540-bottom-nav {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: 64px;
  background: linear-gradient(180deg, rgba(28, 28, 68, .98), rgba(15, 15, 36, .98));
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(132, 112, 255, .3);
  display: flex;
  justify-content: space-around;
  align-items: stretch;
  z-index: 1000;
  padding: 0;
}
.w4540-bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  background: transparent;
  border: none;
  color: var(--w4540-muted);
  text-decoration: none;
  min-width: 60px;
  min-height: 60px;
  padding: 4px 2px;
  font-size: 1.1rem;
  position: relative;
  transition: color .2s ease, transform .15s ease;
}
.w4540-bottom-nav-item i,
.w4540-bottom-nav-item .material-icons {
  font-size: 24px;
}
.w4540-bottom-nav-item:hover,
.w4540-bottom-nav-item:focus {
  color: var(--w4540-accent);
}
.w4540-bottom-nav-item:active { transform: scale(.92); }
.w4540-bottom-nav-item.w4540-active {
  color: var(--w4540-accent);
}
.w4540-bottom-nav-item.w4540-active::before {
  content: "";
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 26px; height: 3px;
  border-radius: 0 0 6px 6px;
  background: var(--w4540-accent);
}
.w4540-bottom-nav-item.w4540-promo i,
.w4540-bottom-nav-item.w4540-promo .material-icons {
  color: var(--w4540-gold);
}

/* ---------- Desktop tweaks ---------- */
@media (min-width: 769px) {
  .w4540-bottom-nav { display: none; }
  .w4540-menu-btn { display: none; }
  .w4540-header-actions .w4540-btn { padding: .8rem 1.6rem; }
  .w4540-game-grid { grid-template-columns: repeat(6, 1fr); }
  .w4540-feature-grid { grid-template-columns: repeat(4, 1fr); }
  .w4540-rtp-grid { grid-template-columns: repeat(4, 1fr); }
  .w4540-pay-grid { grid-template-columns: repeat(6, 1fr); }
  .w4540-container, .w4540-wrapper { max-width: 960px; }
}

/* ---------- Mobile bottom clearance ---------- */
@media (max-width: 768px) {
  main { padding-bottom: 80px; }
}
