/* ============================================================
   cwon.click - layout-a409.css
   All custom classes use the sa40- prefix.
   Color palette: #FAF0E6 | #E0FFFF | #3A3A3A | #FF69B4 | #D2691E
   Mobile-first design, max-width 430px, root font 62.5%.
   ============================================================ */

:root {
  --sa40-bg: #3A3A3A;
  --sa40-bg-deep: #2A2A2A;
  --sa40-bg-soft: #4A4A4A;
  --sa40-text: #FAF0E6;
  --sa40-cyan: #E0FFFF;
  --sa40-pink: #FF69B4;
  --sa40-choco: #D2691E;
  --sa40-gold: #F2C94C;
  --sa40-shadow: 0 4px 18px rgba(0, 0, 0, 0.45);
  --sa40-radius: 14px;
  --sa40-radius-sm: 8px;
  --sa40-font: "Segoe UI", "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

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

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

body {
  font-family: var(--sa40-font);
  background: linear-gradient(160deg, #2A2A2A 0%, #3A3A3A 55%, #2A2A2A 100%);
  color: var(--sa40-text);
  line-height: 1.5rem;
  font-size: 1.4rem;
  overflow-x: hidden;
  min-height: 100vh;
}

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

a {
  color: var(--sa40-cyan);
  text-decoration: none;
}

/* ==================== Layout containers ==================== */
.sa40-container {
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  padding: 0 1.2rem;
}

.sa40-wrapper {
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  background: rgba(42, 42, 42, 0.6);
  min-height: 100vh;
  position: relative;
}

/* ==================== Header ==================== */
.sa40-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: linear-gradient(90deg, #2A2A2A 0%, #3A3A3A 50%, #2A2A2A 100%);
  border-bottom: 2px solid var(--sa40-choco);
  box-shadow: var(--sa40-shadow);
}

.sa40-header-inner {
  max-width: 430px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1rem;
  gap: 0.6rem;
}

.sa40-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
}

.sa40-logo img {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  border: 1px solid var(--sa40-pink);
}

.sa40-logo .sa40-logo-text {
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--sa40-cyan);
  letter-spacing: 0.5px;
  text-shadow: 0 1px 4px rgba(255, 105, 180, 0.4);
}

.sa40-logo .sa40-logo-text span {
  color: var(--sa40-pink);
}

.sa40-header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sa40-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: none;
  border-radius: var(--sa40-radius-sm);
  font-weight: 700;
  font-size: 1.25rem;
  padding: 0.6rem 1rem;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
  min-height: 38px;
  line-height: 1;
}

.sa40-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.1);
}

.sa40-btn:active {
  transform: scale(0.96);
}

.sa40-btn-register {
  background: linear-gradient(135deg, var(--sa40-pink) 0%, #ff8fc7 100%);
  color: #fff;
  box-shadow: 0 3px 10px rgba(255, 105, 180, 0.45);
}

.sa40-btn-login {
  background: linear-gradient(135deg, var(--sa40-choco) 0%, #e88b3f 100%);
  color: #fff;
  box-shadow: 0 3px 10px rgba(210, 105, 30, 0.45);
}

.sa40-btn-ghost {
  background: transparent;
  color: var(--sa40-cyan);
  border: 1px solid var(--sa40-cyan);
}

.sa40-menu-toggle {
  background: transparent;
  border: 1px solid var(--sa40-choco);
  color: var(--sa40-choco);
  width: 36px;
  height: 36px;
  border-radius: 8px;
  font-size: 1.6rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* ==================== Mobile slide menu ==================== */
.sa40-mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 78%;
  max-width: 320px;
  height: 100vh;
  background: linear-gradient(180deg, #2A2A2A 0%, #1f1f1f 100%);
  z-index: 9999;
  padding: 5rem 1.5rem 2rem;
  transition: right 0.3s ease;
  overflow-y: auto;
  border-left: 2px solid var(--sa40-pink);
  box-shadow: -6px 0 24px rgba(0, 0, 0, 0.6);
}

.sa40-mobile-menu.sa40-open {
  right: 0;
}

.sa40-menu-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--sa40-choco);
  color: #fff;
  border: none;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  font-size: 1.6rem;
  cursor: pointer;
}

.sa40-mobile-menu h3 {
  color: var(--sa40-cyan);
  font-size: 1.5rem;
  margin-bottom: 1rem;
  border-bottom: 1px dashed var(--sa40-choco);
  padding-bottom: 0.5rem;
}

.sa40-mobile-menu a {
  display: block;
  padding: 0.9rem 1rem;
  color: var(--sa40-text);
  border-radius: 8px;
  margin-bottom: 0.5rem;
  background: rgba(255, 105, 180, 0.08);
  border-left: 3px solid var(--sa40-pink);
  transition: background 0.2s ease;
}

.sa40-mobile-menu a:hover {
  background: rgba(210, 105, 30, 0.25);
}

.sa40-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 9998;
  display: none;
}

.sa40-overlay.sa40-open {
  display: block;
}

/* ==================== Main content ==================== */
.sa40-main {
  padding-top: 5.4rem;
  padding-bottom: 80px;
  max-width: 430px;
  margin: 0 auto;
}

.sa40-section {
  padding: 1.6rem 1.2rem;
  margin-bottom: 1rem;
}

.sa40-section-title {
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--sa40-cyan);
  margin-bottom: 0.8rem;
  padding-left: 0.8rem;
  border-left: 4px solid var(--sa40-pink);
  line-height: 1.4;
}

.sa40-section-title span {
  color: var(--sa40-pink);
}

.sa40-section-intro {
  color: #d7cfc4;
  font-size: 1.3rem;
  margin-bottom: 1rem;
  line-height: 1.6;
}

/* ==================== Hero carousel ==================== */
.sa40-hero {
  position: relative;
  border-radius: var(--sa40-radius);
  overflow: hidden;
  margin: 1rem 0;
  box-shadow: var(--sa40-shadow);
}

.sa40-carousel {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
}

.sa40-carousel-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.5s ease;
}

.sa40-slide {
  min-width: 100%;
  height: 100%;
  position: relative;
  cursor: pointer;
}

.sa40-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sa40-slide .sa40-slide-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.75) 0%, transparent 100%);
  padding: 1.4rem 1rem 0.8rem;
  color: #fff;
  font-size: 1.35rem;
  font-weight: 700;
}

.sa40-slide .sa40-slide-caption span {
  color: var(--sa40-pink);
}

.sa40-carousel-dots {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 5;
}

.sa40-carousel-dots .sa40-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
}

.sa40-carousel-dots .sa40-dot.sa40-active {
  background: var(--sa40-pink);
  width: 18px;
  border-radius: 4px;
}

/* ==================== Game grid ==================== */
.sa40-game-block {
  margin-bottom: 1.2rem;
  background: rgba(74, 74, 74, 0.35);
  border-radius: var(--sa40-radius);
  padding: 1rem 0.8rem 1.2rem;
  border: 1px solid rgba(210, 105, 30, 0.25);
}

.sa40-game-block-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--sa40-gold);
  margin-bottom: 0.8rem;
  padding: 0 0.4rem;
}

.sa40-game-block-title .sa40-cat-icon {
  color: var(--sa40-pink);
  font-size: 1.6rem;
}

.sa40-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.7rem;
}

.sa40-card {
  background: linear-gradient(160deg, #4a4a4a 0%, #2f2f2f 100%);
  border-radius: var(--sa40-radius-sm);
  padding: 0.5rem;
  text-align: center;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border: 1px solid rgba(255, 105, 180, 0.18);
}

.sa40-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 14px rgba(255, 105, 180, 0.35);
  border-color: var(--sa40-pink);
}

.sa40-card:active {
  transform: scale(0.95);
}

.sa40-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 0.4rem;
}

.sa40-card-name {
  font-size: 1.05rem;
  color: var(--sa40-text);
  font-weight: 600;
  line-height: 1.3;
  min-height: 2.8rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sa40-card-tag {
  display: inline-block;
  font-size: 0.9rem;
  color: var(--sa40-choco);
  background: rgba(210, 105, 30, 0.15);
  border-radius: 4px;
  padding: 0.1rem 0.4rem;
  margin-top: 0.3rem;
}

/* ==================== Generic cards / info ==================== */
.sa40-info-card {
  background: linear-gradient(160deg, rgba(74, 74, 74, 0.6) 0%, rgba(42, 42, 42, 0.6) 100%);
  border: 1px solid rgba(224, 255, 255, 0.15);
  border-radius: var(--sa40-radius);
  padding: 1.2rem;
  margin-bottom: 1rem;
}

.sa40-info-card h3 {
  color: var(--sa40-cyan);
  font-size: 1.5rem;
  margin-bottom: 0.6rem;
}

.sa40-info-card p {
  color: #d7cfc4;
  font-size: 1.3rem;
  line-height: 1.6;
  margin-bottom: 0.6rem;
}

.sa40-info-card ul {
  padding-left: 1.4rem;
  color: #d7cfc4;
  font-size: 1.3rem;
  line-height: 1.7;
}

.sa40-info-card ul li {
  margin-bottom: 0.3rem;
}

.sa40-text-link {
  color: var(--sa40-pink);
  font-weight: 700;
  border-bottom: 1px dashed var(--sa40-pink);
  cursor: pointer;
}

.sa40-play-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 1rem 0;
}

.sa40-promo-text {
  display: inline-block;
  color: var(--sa40-pink);
  font-weight: 700;
  cursor: pointer;
  border-bottom: 1px dashed var(--sa40-pink);
}

/* ==================== RTP table ==================== */
.sa40-rtp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1.2rem;
  margin-top: 0.6rem;
}

.sa40-rtp-table th,
.sa40-rtp-table td {
  padding: 0.6rem 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  text-align: left;
}

.sa40-rtp-table th {
  color: var(--sa40-cyan);
  background: rgba(210, 105, 30, 0.18);
}

.sa40-rtp-table td.sa40-rtp-val {
  color: var(--sa40-pink);
  font-weight: 700;
}

/* ==================== Winners / testimonials ==================== */
.sa40-winner-list,
.sa40-testi-list {
  display: grid;
  gap: 0.6rem;
}

.sa40-winner-item,
.sa40-testi-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  background: rgba(74, 74, 74, 0.4);
  padding: 0.7rem 0.9rem;
  border-radius: 10px;
  border-left: 3px solid var(--sa40-gold);
}

.sa40-winner-avatar,
.sa40-testi-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--sa40-pink), var(--sa40-choco));
  color: #fff;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sa40-winner-info span,
.sa40-testi-info span {
  display: block;
}

.sa40-winner-name {
  color: var(--sa40-cyan);
  font-weight: 700;
  font-size: 1.25rem;
}

.sa40-winner-amount {
  color: var(--sa40-pink);
  font-weight: 800;
  font-size: 1.3rem;
}

.sa40-winner-game {
  color: #b8b0a5;
  font-size: 1.1rem;
}

.sa40-testi-name {
  color: var(--sa40-cyan);
  font-weight: 700;
  font-size: 1.25rem;
}

.sa40-testi-text {
  color: #d7cfc4;
  font-size: 1.2rem;
  line-height: 1.5;
}

/* ==================== Payment / features grid ==================== */
.sa40-feature-grid,
.sa40-pay-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.6rem;
  margin: 0.8rem 0;
}

.sa40-feature-item,
.sa40-pay-item {
  background: rgba(74, 74, 74, 0.5);
  border-radius: 10px;
  padding: 0.8rem 0.4rem;
  text-align: center;
  border: 1px solid rgba(255, 105, 180, 0.2);
}

.sa40-feature-item .sa40-feat-icon,
.sa40-pay-item .sa40-pay-icon {
  font-size: 2.2rem;
  color: var(--sa40-pink);
  margin-bottom: 0.3rem;
}

.sa40-feature-item .sa40-feat-label,
.sa40-pay-item .sa40-pay-label {
  font-size: 1rem;
  color: var(--sa40-text);
}

/* ==================== Achievements / tricks ==================== */
.sa40-achv-row {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  background: rgba(74, 74, 74, 0.4);
  padding: 0.7rem 0.9rem;
  border-radius: 10px;
  margin-bottom: 0.5rem;
  border-left: 3px solid var(--sa40-pink);
}

.sa40-achv-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--sa40-choco);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.6rem;
}

.sa40-achv-text strong {
  color: var(--sa40-cyan);
  font-size: 1.25rem;
}

.sa40-achv-text small {
  display: block;
  color: #b8b0a5;
  font-size: 1.1rem;
}

/* ==================== App download CTA ==================== */
.sa40-app-cta {
  background: linear-gradient(135deg, rgba(255, 105, 180, 0.18) 0%, rgba(210, 105, 30, 0.18) 100%);
  border: 1px solid var(--sa40-pink);
  border-radius: var(--sa40-radius);
  padding: 1.2rem;
  text-align: center;
  margin: 1rem 0;
}

.sa40-app-cta h3 {
  color: var(--sa40-cyan);
  font-size: 1.6rem;
  margin-bottom: 0.5rem;
}

.sa40-app-cta p {
  color: #d7cfc4;
  font-size: 1.25rem;
  margin-bottom: 0.9rem;
}

.sa40-app-buttons {
  display: flex;
  gap: 0.6rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ==================== Footer ==================== */
.sa40-footer {
  background: #1f1f1f;
  border-top: 2px solid var(--sa40-choco);
  padding: 1.6rem 1.2rem 2rem;
  max-width: 430px;
  margin: 0 auto;
}

.sa40-footer-brand {
  color: #d7cfc4;
  font-size: 1.2rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.sa40-footer-brand strong {
  color: var(--sa40-pink);
}

.sa40-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.8rem;
  margin-bottom: 1rem;
}

.sa40-footer-links a {
  font-size: 1.15rem;
  color: var(--sa40-cyan);
  border-bottom: 1px dotted rgba(224, 255, 255, 0.4);
  padding-bottom: 1px;
}

.sa40-footer-links a:hover {
  color: var(--sa40-pink);
}

.sa40-footer-promo {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.sa40-footer-copy {
  color: #8a8278;
  font-size: 1.1rem;
  text-align: center;
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
  padding-top: 0.8rem;
}

/* ==================== Mobile bottom nav ==================== */
.sa40-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: 62px;
  background: linear-gradient(180deg, #3A3A3A 0%, #1f1f1f 100%);
  border-top: 2px solid var(--sa40-pink);
  display: flex;
  justify-content: space-around;
  align-items: center;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.5);
}

.sa40-bottom-nav .sa40-nav-btn {
  flex: 1;
  min-width: 60px;
  min-height: 60px;
  background: transparent;
  border: none;
  color: var(--sa40-text);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  cursor: pointer;
  position: relative;
  transition: color 0.2s ease, transform 0.2s ease;
}

.sa40-bottom-nav .sa40-nav-btn .sa40-nav-icon {
  font-size: 22px;
  line-height: 1;
}

.sa40-bottom-nav .sa40-nav-btn .sa40-nav-label {
  font-size: 10px;
  line-height: 1.2;
  letter-spacing: 0.2px;
}

.sa40-bottom-nav .sa40-nav-btn:hover {
  color: var(--sa40-pink);
}

.sa40-bottom-nav .sa40-nav-btn:active {
  transform: scale(0.9);
}

.sa40-bottom-nav .sa40-nav-btn.sa40-active {
  color: var(--sa40-pink);
}

.sa40-bottom-nav .sa40-nav-btn.sa40-active::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 26px;
  height: 3px;
  background: var(--sa40-pink);
  border-radius: 0 0 4px 4px;
}

.sa40-nav-btn .sa40-nav-badge {
  position: absolute;
  top: 4px;
  right: 16px;
  background: var(--sa40-choco);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ==================== Desktop ==================== */
@media (min-width: 769px) {
  .sa40-bottom-nav {
    display: none;
  }

  .sa40-main {
    padding-bottom: 2rem;
  }
}

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

@media (max-width: 380px) {
  .sa40-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .sa40-feature-grid,
  .sa40-pay-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .sa40-logo .sa40-logo-text {
    font-size: 1.4rem;
  }
}
