/**
 * 7555 BDT Layout Stylesheet
 * All classes use prefix: w81d4-
 * Color palette: #0A0A0A | #DDA0DD | #9932CC | #BA55D3
 * Mobile-first design, max-width: 430px
 */

/* CSS Variables */
:root {
  --w81d4-bg-primary: #0A0A0A;
  --w81d4-bg-secondary: #1A1A2E;
  --w81d4-bg-card: #16213E;
  --w81d4-text-primary: #DDA0DD;
  --w81d4-text-secondary: #E8D5E8;
  --w81d4-accent: #9932CC;
  --w81d4-accent-light: #BA55D3;
  --w81d4-accent-glow: rgba(186, 85, 211, 0.3);
  --w81d4-gradient: linear-gradient(135deg, #9932CC, #BA55D3);
  --w81d4-gradient-dark: linear-gradient(180deg, #0A0A0A, #1A1A2E);
  --w81d4-radius: 12px;
  --w81d4-radius-sm: 8px;
  --w81d4-shadow: 0 4px 20px rgba(153, 50, 204, 0.2);
  --w81d4-transition: all 0.3s ease;
  font-size: 62.5%;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--w81d4-bg-primary);
  color: var(--w81d4-text-secondary);
  line-height: 1.5rem;
  font-size: 1.4rem;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  max-width: 430px;
  margin: 0 auto;
}

a { color: var(--w81d4-accent-light); text-decoration: none; }
a:hover { color: var(--w81d4-text-primary); }
img { max-width: 100%; height: auto; display: block; }

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

/* Header */
.w81d4-header {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 1000;
  border-bottom: 1px solid rgba(153, 50, 204, 0.3);
  padding: 0.8rem 1rem;
}

.w81d4-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 44px;
}

.w81d4-logo-area {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
}

.w81d4-logo-img {
  width: 28px;
  height: 28px;
  border-radius: 6px;
}

.w81d4-logo-text {
  font-size: 1.6rem;
  font-weight: 700;
  background: var(--w81d4-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

.w81d4-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.2rem;
  border-radius: var(--w81d4-radius-sm);
  font-size: 1.3rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--w81d4-transition);
  min-height: 36px;
  text-align: center;
}

.w81d4-btn-register {
  background: var(--w81d4-gradient);
  color: #fff;
  box-shadow: 0 2px 10px var(--w81d4-accent-glow);
}

.w81d4-btn-register:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 15px var(--w81d4-accent-glow);
}

.w81d4-btn-login {
  background: transparent;
  color: var(--w81d4-accent-light);
  border: 1px solid var(--w81d4-accent);
}

.w81d4-btn-login:hover {
  background: rgba(153, 50, 204, 0.15);
}

.w81d4-menu-toggle {
  background: none;
  border: none;
  color: var(--w81d4-text-primary);
  font-size: 2rem;
  cursor: pointer;
  padding: 0.4rem;
  line-height: 1;
}

/* Mobile Menu */
.w81d4-mobile-menu {
  position: fixed;
  top: 0;
  right: -280px;
  width: 280px;
  height: 100%;
  background: var(--w81d4-bg-secondary);
  z-index: 9999;
  transition: right 0.3s ease;
  padding: 2rem 1.5rem;
  overflow-y: auto;
}

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

.w81d4-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 9998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.w81d4-overlay-active {
  opacity: 1;
  pointer-events: auto;
}

.w81d4-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(153, 50, 204, 0.3);
}

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

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

.w81d4-menu-links {
  list-style: none;
}

.w81d4-menu-links li {
  margin-bottom: 0.8rem;
}

.w81d4-menu-links a {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1rem;
  color: var(--w81d4-text-secondary);
  border-radius: var(--w81d4-radius-sm);
  transition: var(--w81d4-transition);
  font-size: 1.4rem;
}

.w81d4-menu-links a:hover {
  background: rgba(153, 50, 204, 0.15);
  color: var(--w81d4-text-primary);
}

.w81d4-menu-links .material-icons,
.w81d4-menu-links .fas,
.w81d4-menu-links .bi {
  font-size: 2rem;
  color: var(--w81d4-accent-light);
}

/* Main content area */
.w81d4-main {
  padding-top: 68px;
  min-height: 100vh;
}

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

/* Carousel */
.w81d4-carousel {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: var(--w81d4-radius);
  margin-bottom: 1.5rem;
}

.w81d4-carousel-inner {
  position: relative;
  width: 100%;
  aspect-ratio: 16/7;
}

.w81d4-carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity var(--w81d4-transition);
  cursor: pointer;
}

.w81d4-slide-active {
  opacity: 1;
}

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

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

.w81d4-carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: var(--w81d4-transition);
}

.w81d4-dot-active {
  background: var(--w81d4-accent-light);
  width: 20px;
  border-radius: 4px;
}

/* Section styles */
.w81d4-section {
  padding: 1.5rem 0;
}

.w81d4-section-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--w81d4-text-primary);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--w81d4-accent);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.w81d4-section-title .fas,
.w81d4-section-title .material-icons,
.w81d4-section-title .bi {
  color: var(--w81d4-accent-light);
}

/* Category heading */
.w81d4-cat-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--w81d4-text-primary);
  margin: 1.5rem 0 1rem;
  padding: 0.6rem 1rem;
  background: linear-gradient(90deg, rgba(153, 50, 204, 0.3), transparent);
  border-left: 3px solid var(--w81d4-accent-light);
  border-radius: 0 var(--w81d4-radius-sm) var(--w81d4-radius-sm) 0;
}

/* Game grid */
.w81d4-game-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.w81d4-game-item {
  text-align: center;
  cursor: pointer;
  transition: var(--w81d4-transition);
  border-radius: var(--w81d4-radius-sm);
  padding: 0.5rem;
}

.w81d4-game-item:hover {
  background: rgba(153, 50, 204, 0.15);
  transform: translateY(-2px);
}

.w81d4-game-img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--w81d4-radius-sm);
  object-fit: cover;
  border: 1px solid rgba(153, 50, 204, 0.2);
  margin-bottom: 0.3rem;
}

.w81d4-game-name {
  font-size: 1.1rem;
  color: var(--w81d4-text-secondary);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Cards */
.w81d4-card {
  background: var(--w81d4-bg-card);
  border-radius: var(--w81d4-radius);
  padding: 1.2rem;
  margin-bottom: 1rem;
  border: 1px solid rgba(153, 50, 204, 0.15);
  transition: var(--w81d4-transition);
}

.w81d4-card:hover {
  border-color: rgba(153, 50, 204, 0.4);
  box-shadow: var(--w81d4-shadow);
}

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

.w81d4-card-text {
  font-size: 1.3rem;
  line-height: 1.6;
  color: var(--w81d4-text-secondary);
}

/* Promo CTA */
.w81d4-cta {
  text-align: center;
  padding: 2rem 1rem;
  margin: 1.5rem 0;
  background: var(--w81d4-gradient-dark);
  border-radius: var(--w81d4-radius);
  border: 1px solid var(--w81d4-accent);
}

.w81d4-cta-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--w81d4-text-primary);
  margin-bottom: 0.8rem;
}

.w81d4-cta-text {
  font-size: 1.3rem;
  color: var(--w81d4-text-secondary);
  margin-bottom: 1.2rem;
}

.w81d4-cta .w81d4-btn {
  font-size: 1.5rem;
  padding: 1rem 2.5rem;
}

/* Promo text link */
.w81d4-promo-link {
  color: var(--w81d4-accent-light);
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  transition: var(--w81d4-transition);
}

.w81d4-promo-link:hover {
  color: var(--w81d4-text-primary);
}

/* Footer */
.w81d4-footer {
  background: var(--w81d4-bg-secondary);
  padding: 2rem 1rem 1rem;
  margin-top: 2rem;
  border-top: 1px solid rgba(153, 50, 204, 0.2);
}

@media (max-width: 768px) {
  .w81d4-footer {
    padding-bottom: 80px;
  }
}

.w81d4-footer-brand {
  text-align: center;
  margin-bottom: 1.5rem;
}

.w81d4-footer-brand p {
  font-size: 1.2rem;
  color: var(--w81d4-text-secondary);
  line-height: 1.6;
  margin-top: 0.5rem;
}

.w81d4-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem;
  margin-bottom: 1.5rem;
}

.w81d4-footer-links a {
  padding: 0.4rem 1rem;
  background: rgba(153, 50, 204, 0.15);
  border-radius: var(--w81d4-radius-sm);
  font-size: 1.2rem;
  color: var(--w81d4-text-primary);
  transition: var(--w81d4-transition);
}

.w81d4-footer-links a:hover {
  background: rgba(153, 50, 204, 0.35);
}

.w81d4-footer-copyright {
  text-align: center;
  font-size: 1.1rem;
  color: rgba(221, 160, 221, 0.5);
  padding-top: 1rem;
  border-top: 1px solid rgba(153, 50, 204, 0.1);
}

/* Bottom Navigation */
.w81d4-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  height: 60px;
  background: var(--w81d4-bg-secondary);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 1000;
  border-top: 1px solid rgba(153, 50, 204, 0.3);
  box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.3);
}

@media (min-width: 769px) {
  .w81d4-bottom-nav { display: none; }
}

.w81d4-bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 60px;
  min-height: 56px;
  cursor: pointer;
  transition: var(--w81d4-transition);
  color: rgba(221, 160, 221, 0.6);
  background: none;
  border: none;
  padding: 0.4rem;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.w81d4-bottom-nav-item:active {
  transform: scale(0.92);
}

.w81d4-bottom-nav-item .material-icons,
.w81d4-bottom-nav-item .fas,
.w81d4-bottom-nav-item .far,
.w81d4-bottom-nav-item .bi,
.w81d4-bottom-nav-item ion-icon {
  font-size: 22px;
  margin-bottom: 2px;
}

.w81d4-bottom-nav-label {
  font-size: 1rem;
  white-space: nowrap;
}

.w81d4-nav-active {
  color: var(--w81d4-accent-light) !important;
}

.w81d4-nav-active .material-icons,
.w81d4-nav-active .fas,
.w81d4-nav-active .far,
.w81d4-nav-active .bi {
  text-shadow: 0 0 8px var(--w81d4-accent-glow);
}

/* Winners table */
.w81d4-winners-table {
  width: 100%;
  border-collapse: collapse;
}

.w81d4-winners-table th {
  background: rgba(153, 50, 204, 0.2);
  padding: 0.6rem;
  font-size: 1.2rem;
  color: var(--w81d4-text-primary);
  text-align: left;
  font-weight: 600;
}

.w81d4-winners-table td {
  padding: 0.5rem 0.6rem;
  font-size: 1.2rem;
  border-bottom: 1px solid rgba(153, 50, 204, 0.1);
}

/* Testimonials */
.w81d4-testimonial {
  background: var(--w81d4-bg-card);
  border-radius: var(--w81d4-radius);
  padding: 1rem;
  margin-bottom: 0.8rem;
  border-left: 3px solid var(--w81d4-accent-light);
}

.w81d4-testimonial-name {
  font-weight: 700;
  color: var(--w81d4-text-primary);
  font-size: 1.3rem;
}

.w81d4-testimonial-stars {
  color: #FFD700;
  font-size: 1.2rem;
}

.w81d4-testimonial-text {
  font-size: 1.2rem;
  margin-top: 0.4rem;
  line-height: 1.5;
}

/* Payment methods */
.w81d4-payment-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  justify-content: center;
}

.w81d4-payment-item {
  background: var(--w81d4-bg-card);
  border: 1px solid rgba(153, 50, 204, 0.2);
  border-radius: var(--w81d4-radius-sm);
  padding: 0.8rem 1.2rem;
  font-size: 1.2rem;
  color: var(--w81d4-text-secondary);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* App download */
.w81d4-app-banner {
  text-align: center;
  padding: 1.5rem;
  background: linear-gradient(135deg, rgba(153, 50, 204, 0.2), rgba(186, 85, 211, 0.1));
  border-radius: var(--w81d4-radius);
  border: 1px solid rgba(153, 50, 204, 0.3);
  margin: 1rem 0;
}

.w81d4-app-banner h3 {
  font-size: 1.6rem;
  color: var(--w81d4-text-primary);
  margin-bottom: 0.8rem;
}

.w81d4-app-banner p {
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

/* Utility classes */
.w81d4-text-center { text-align: center; }
.w81d4-text-bold { font-weight: 700; }
.w81d4-mb-1 { margin-bottom: 0.8rem; }
.w81d4-mb-2 { margin-bottom: 1.6rem; }
.w81d4-mt-1 { margin-top: 0.8rem; }
.w81d4-mt-2 { margin-top: 1.6rem; }

/* Content text styling */
.w81d4-content-text {
  font-size: 1.3rem;
  line-height: 1.8;
  color: var(--w81d4-text-secondary);
}

.w81d4-content-text h2 {
  font-size: 1.7rem;
  color: var(--w81d4-text-primary);
  margin: 1.5rem 0 0.8rem;
}

.w81d4-content-text h3 {
  font-size: 1.5rem;
  color: var(--w81d4-text-primary);
  margin: 1.2rem 0 0.6rem;
}

.w81d4-content-text p {
  margin-bottom: 0.8rem;
}

.w81d4-content-text ul,
.w81d4-content-text ol {
  padding-left: 1.5rem;
  margin-bottom: 0.8rem;
}

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

/* Help page FAQ styles */
.w81d4-faq-item {
  background: var(--w81d4-bg-card);
  border-radius: var(--w81d4-radius-sm);
  padding: 1rem;
  margin-bottom: 0.8rem;
  border: 1px solid rgba(153, 50, 204, 0.15);
}

.w81d4-faq-q {
  font-weight: 700;
  color: var(--w81d4-text-primary);
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
}

.w81d4-faq-a {
  font-size: 1.2rem;
  line-height: 1.6;
  color: var(--w81d4-text-secondary);
}

/* Responsive fine-tuning */
@media (max-width: 360px) {
  .w81d4-game-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .w81d4-header-actions .w81d4-btn {
    padding: 0.5rem 0.8rem;
    font-size: 1.2rem;
  }
}

/* Desktop adjustments */
@media (min-width: 769px) {
  body {
    max-width: 430px;
    margin: 0 auto;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
  }
}
