/*
 * 49bdt Layout Stylesheet
 * All classes use wd38b- prefix for namespace isolation
 * Color palette: #3CB371 #DDA0DD #273746 #8FBC8F #CD5C5C
 */

/* CSS Variables */
:root {
  --wd38b-primary: #3CB371;
  --wd38b-secondary: #DDA0DD;
  --wd38b-bg: #273746;
  --wd38b-bg-light: #2f4557;
  --wd38b-bg-card: #1e2d3a;
  --wd38b-accent: #8FBC8F;
  --wd38b-danger: #CD5C5C;
  --wd38b-text: #e8f0e8;
  --wd38b-text-muted: #a0b8a0;
  --wd38b-text-dark: #273746;
  --wd38b-border: #3a5a4a;
  --wd38b-radius: 0.8rem;
  --wd38b-radius-sm: 0.4rem;
  --wd38b-shadow: 0 2px 8px rgba(0,0,0,0.25);
  font-size: 62.5%;
}

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

body {
  font-family: 'Segoe UI', 'Noto Sans Bengali', Tahoma, sans-serif;
  background: var(--wd38b-bg);
  color: var(--wd38b-text);
  font-size: 1.5rem;
  line-height: 1.5rem;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

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

a:hover {
  color: var(--wd38b-secondary);
}

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

/* Container */
.wd38b-container {
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  padding: 0 1rem;
}

.wd38b-wrapper {
  width: 100%;
  overflow: hidden;
}

/* Header */
.wd38b-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: linear-gradient(135deg, #1a2b38 0%, #273746 100%);
  border-bottom: 2px solid var(--wd38b-primary);
  padding: 0.6rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 430px;
  margin: 0 auto;
}

.wd38b-header-left {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.wd38b-logo {
  width: 28px;
  height: 28px;
  border-radius: 50%;
}

.wd38b-site-name {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--wd38b-primary);
  letter-spacing: 0.5px;
}

.wd38b-header-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.wd38b-header-btn {
  padding: 0.5rem 1rem;
  border-radius: var(--wd38b-radius-sm);
  font-size: 1.2rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: transform 0.15s, box-shadow 0.15s;
  min-height: 32px;
}

.wd38b-header-btn:active {
  transform: scale(0.95);
}

.wd38b-btn-register {
  background: var(--wd38b-primary);
  color: #fff;
}

.wd38b-btn-login {
  background: transparent;
  color: var(--wd38b-primary);
  border: 1.5px solid var(--wd38b-primary);
}

.wd38b-menu-toggle {
  background: none;
  border: none;
  color: var(--wd38b-text);
  font-size: 2rem;
  cursor: pointer;
  padding: 0.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Mobile Menu */
.wd38b-mobile-menu {
  position: fixed;
  top: 0;
  right: -280px;
  width: 260px;
  height: 100vh;
  background: linear-gradient(180deg, #1a2b38 0%, #0f1c28 100%);
  z-index: 9999;
  transition: right 0.3s ease;
  padding: 2rem 1.5rem;
  overflow-y: auto;
}

.wd38b-menu-active {
  right: 0;
}

.wd38b-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--wd38b-border);
}

.wd38b-menu-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--wd38b-primary);
}

.wd38b-menu-close {
  background: none;
  border: none;
  color: var(--wd38b-text);
  font-size: 2.2rem;
  cursor: pointer;
}

.wd38b-menu-nav {
  list-style: none;
}

.wd38b-menu-nav li {
  margin-bottom: 0.3rem;
}

.wd38b-menu-nav a {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1rem;
  color: var(--wd38b-text);
  font-size: 1.4rem;
  border-radius: var(--wd38b-radius-sm);
  transition: background 0.2s, color 0.2s;
}

.wd38b-menu-nav a:hover {
  background: var(--wd38b-bg-light);
  color: var(--wd38b-primary);
}

.wd38b-menu-nav .material-icons {
  font-size: 20px;
}

/* Overlay */
.wd38b-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  z-index: 9998;
  display: none;
}

.wd38b-overlay-active {
  display: block;
}

/* Main Content */
.wd38b-main {
  padding-top: 56px;
  min-height: 100vh;
}

@media (max-width: 768px) {
  .wd38b-main {
    padding-bottom: 72px;
  }
}

/* Carousel */
.wd38b-carousel {
  position: relative;
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 0 0 var(--wd38b-radius) var(--wd38b-radius);
}

.wd38b-slide {
  display: none;
  width: 100%;
  cursor: pointer;
}

.wd38b-slide img {
  width: 100%;
  height: auto;
  aspect-ratio: 430/200;
  object-fit: cover;
}

.wd38b-slide-active {
  display: block;
}

/* Section titles */
.wd38b-section-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--wd38b-primary);
  margin: 1.5rem 0 1rem;
  padding-left: 0.8rem;
  border-left: 3px solid var(--wd38b-danger);
}

.wd38b-subtitle {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--wd38b-secondary);
  margin: 1.2rem 0 0.6rem;
}

/* Game Grid */
.wd38b-game-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.6rem;
  padding: 0.5rem 0;
}

.wd38b-game-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: transform 0.15s;
  text-align: center;
}

.wd38b-game-item:active {
  transform: scale(0.95);
}

.wd38b-game-img {
  width: 72px;
  height: 72px;
  border-radius: var(--wd38b-radius-sm);
  object-fit: cover;
  border: 1.5px solid var(--wd38b-border);
  margin-bottom: 0.3rem;
}

.wd38b-game-name {
  font-size: 1.1rem;
  color: var(--wd38b-text);
  line-height: 1.3;
  max-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Content cards */
.wd38b-card {
  background: var(--wd38b-bg-card);
  border-radius: var(--wd38b-radius);
  padding: 1.2rem;
  margin: 0.8rem 0;
  border: 1px solid var(--wd38b-border);
}

.wd38b-card-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--wd38b-primary);
  margin-bottom: 0.6rem;
}

.wd38b-card p {
  font-size: 1.3rem;
  line-height: 2.1rem;
  color: var(--wd38b-text-muted);
  margin-bottom: 0.5rem;
}

/* Promo link styles */
.wd38b-promo-btn {
  display: inline-block;
  background: linear-gradient(135deg, var(--wd38b-primary) 0%, #2e8b57 100%);
  color: #fff;
  font-size: 1.4rem;
  font-weight: 700;
  padding: 1rem 2rem;
  border-radius: var(--wd38b-radius);
  cursor: pointer;
  border: none;
  text-align: center;
  transition: transform 0.15s, box-shadow 0.2s;
  width: 100%;
}

.wd38b-promo-btn:active {
  transform: scale(0.97);
}

.wd38b-promo-text {
  color: var(--wd38b-primary);
  font-weight: 700;
  cursor: pointer;
  transition: color 0.2s;
}

.wd38b-promo-text:hover {
  color: var(--wd38b-secondary);
}

/* Footer */
.wd38b-footer {
  background: linear-gradient(180deg, #1a2b38 0%, #0f1c28 100%);
  padding: 2rem 1rem 1.5rem;
  margin-top: 2rem;
  border-top: 2px solid var(--wd38b-primary);
}

.wd38b-footer-brand {
  text-align: center;
  margin-bottom: 1.2rem;
}

.wd38b-footer-brand p {
  font-size: 1.2rem;
  color: var(--wd38b-text-muted);
  line-height: 2rem;
}

.wd38b-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin: 1rem 0;
}

.wd38b-footer-link {
  background: var(--wd38b-bg-light);
  color: var(--wd38b-text);
  padding: 0.5rem 1rem;
  border-radius: var(--wd38b-radius-sm);
  font-size: 1.2rem;
  transition: background 0.2s;
  cursor: pointer;
}

.wd38b-footer-link:hover {
  background: var(--wd38b-primary);
  color: #fff;
}

.wd38b-footer-copy {
  text-align: center;
  font-size: 1.1rem;
  color: var(--wd38b-text-muted);
  margin-top: 1rem;
}

/* Bottom Navigation */
.wd38b-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: linear-gradient(180deg, #1a2b38 0%, #0f1c28 100%);
  border-top: 1.5px solid var(--wd38b-primary);
  display: flex;
  justify-content: space-around;
  align-items: center;
  height: 60px;
  max-width: 430px;
  margin: 0 auto;
}

.wd38b-nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 60px;
  min-height: 56px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--wd38b-text-muted);
  transition: color 0.2s, transform 0.15s;
  padding: 0.3rem;
}

.wd38b-nav-btn:active {
  transform: scale(0.92);
}

.wd38b-nav-btn-active {
  color: var(--wd38b-primary);
}

.wd38b-nav-btn span {
  font-size: 1rem;
  margin-top: 0.2rem;
}

.wd38b-nav-icon {
  font-size: 22px;
}

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

/* FAQ styles */
.wd38b-faq-item {
  margin-bottom: 0.8rem;
  border-bottom: 1px solid var(--wd38b-border);
  padding-bottom: 0.8rem;
}

.wd38b-faq-q {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--wd38b-secondary);
  margin-bottom: 0.4rem;
}

.wd38b-faq-a {
  font-size: 1.3rem;
  color: var(--wd38b-text-muted);
  line-height: 2rem;
}

/* Winners table */
.wd38b-winners-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.4rem;
  font-size: 1.2rem;
}

.wd38b-winners-grid div {
  padding: 0.5rem;
  text-align: center;
  background: var(--wd38b-bg-light);
  border-radius: var(--wd38b-radius-sm);
}

.wd38b-winners-header {
  color: var(--wd38b-primary);
  font-weight: 700;
}

/* Payment icons row */
.wd38b-payment-row {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 0.8rem 0;
}

.wd38b-payment-item {
  background: var(--wd38b-bg-light);
  border-radius: var(--wd38b-radius-sm);
  padding: 0.6rem 1rem;
  font-size: 1.2rem;
  color: var(--wd38b-text);
  border: 1px solid var(--wd38b-border);
}

/* Content paragraph */
.wd38b-content p {
  font-size: 1.3rem;
  line-height: 2.1rem;
  color: var(--wd38b-text-muted);
  margin-bottom: 0.8rem;
}

.wd38b-content h2 {
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--wd38b-primary);
  margin: 1.5rem 0 0.6rem;
}

.wd38b-content h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--wd38b-secondary);
  margin: 1rem 0 0.5rem;
}

.wd38b-content ul {
  padding-left: 1.5rem;
  margin-bottom: 0.8rem;
}

.wd38b-content li {
  font-size: 1.3rem;
  line-height: 2.1rem;
  color: var(--wd38b-text-muted);
}

/* CTA Section */
.wd38b-cta {
  text-align: center;
  padding: 1.5rem 1rem;
  margin: 1rem 0;
  background: linear-gradient(135deg, rgba(60,179,113,0.15) 0%, rgba(221,160,221,0.1) 100%);
  border-radius: var(--wd38b-radius);
  border: 1px solid var(--wd38b-primary);
}

.wd38b-cta-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--wd38b-primary);
  margin-bottom: 0.5rem;
}

.wd38b-cta p {
  font-size: 1.3rem;
  color: var(--wd38b-text-muted);
  margin-bottom: 1rem;
}

/* RTP bar */
.wd38b-rtp-bar {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.5rem;
}

.wd38b-rtp-label {
  font-size: 1.2rem;
  color: var(--wd38b-text-muted);
  min-width: 90px;
}

.wd38b-rtp-track {
  flex: 1;
  height: 8px;
  background: var(--wd38b-bg-light);
  border-radius: 4px;
  overflow: hidden;
}

.wd38b-rtp-fill {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--wd38b-primary), var(--wd38b-secondary));
}

.wd38b-rtp-value {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--wd38b-primary);
  min-width: 40px;
}

/* Testimonial card */
.wd38b-testimonial {
  background: var(--wd38b-bg-card);
  border-radius: var(--wd38b-radius);
  padding: 1rem;
  margin: 0.5rem 0;
  border-left: 3px solid var(--wd38b-secondary);
}

.wd38b-testimonial-text {
  font-size: 1.2rem;
  color: var(--wd38b-text-muted);
  font-style: italic;
  line-height: 1.9rem;
}

.wd38b-testimonial-author {
  font-size: 1.1rem;
  color: var(--wd38b-primary);
  margin-top: 0.4rem;
}

/* Responsive helpers */
@media (min-width: 431px) {
  .wd38b-header {
    left: 50%;
    transform: translateX(-50%);
  }
  .wd38b-bottom-nav {
    left: 50%;
    transform: translateX(-50%);
  }
}
