/**
 * Taya365 Original APK - Core Stylesheet
 * All classes use w5d31- prefix for namespace isolation
 * Color palette: #3A3A3A | #8B008B | #8A2BE2 | #000080 | #DDA0DD
 * Mobile-first design, max-width 430px
 */

:root {
  --w5d31-primary: #8B008B;
  --w5d31-accent: #8A2BE2;
  --w5d31-bg-dark: #000080;
  --w5d31-bg-mid: #3A3A3A;
  --w5d31-light: #DDA0DD;
  --w5d31-bg: #1a0a2e;
  --w5d31-card-bg: #2a1a3e;
  --w5d31-text: #f0e6ff;
  --w5d31-text-dim: #c0b0d0;
  --w5d31-gold: #ffd700;
  --w5d31-radius: 10px;
}

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

html {
  font-size: 62.5%;
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', 'Roboto', Arial, sans-serif;
  background: var(--w5d31-bg);
  color: var(--w5d31-text);
  line-height: 1.5rem;
  font-size: 1.4rem;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--w5d31-light); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--w5d31-gold); }
img { max-width: 100%; height: auto; display: block; }

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

/* === Header === */
.w5d31-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: linear-gradient(135deg, var(--w5d31-bg-mid), var(--w5d31-bg-dark));
  border-bottom: 2px solid var(--w5d31-primary);
  padding: 0.8rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

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

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

.w5d31-site-name {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--w5d31-gold);
  white-space: nowrap;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.w5d31-btn-register, .w5d31-btn-login {
  padding: 0.5rem 1.2rem;
  border-radius: 20px;
  font-size: 1.2rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  white-space: nowrap;
}

.w5d31-btn-register {
  background: linear-gradient(135deg, var(--w5d31-primary), var(--w5d31-accent));
  color: #fff;
  box-shadow: 0 2px 8px rgba(139, 0, 139, 0.4);
}

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

.w5d31-btn-register:hover, .w5d31-btn-login:hover {
  transform: scale(1.05);
}

.w5d31-menu-toggle {
  background: none;
  border: none;
  color: var(--w5d31-light);
  font-size: 2rem;
  cursor: pointer;
  padding: 0.4rem;
  margin-left: 0.4rem;
  line-height: 1;
}

/* === Mobile Menu === */
.w5d31-menu-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 9998;
}

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

.w5d31-mobile-menu {
  position: fixed;
  top: 0;
  right: -280px;
  width: 280px;
  height: 100vh;
  background: linear-gradient(180deg, #2a1a3e, #1a0a2e);
  z-index: 9999;
  transition: right 0.3s ease;
  padding: 2rem 1.5rem;
  overflow-y: auto;
}

.w5d31-menu-active { right: 0 !important; }

.w5d31-mobile-menu .w5d31-menu-close {
  background: none;
  border: none;
  color: var(--w5d31-light);
  font-size: 2.4rem;
  cursor: pointer;
  float: right;
  margin-bottom: 1rem;
}

.w5d31-mobile-menu ul {
  list-style: none;
  clear: both;
}

.w5d31-mobile-menu ul li a {
  display: block;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(221, 160, 221, 0.15);
  font-size: 1.4rem;
  color: var(--w5d31-text);
}

/* === Carousel === */
.w5d31-carousel {
  position: relative;
  overflow: hidden;
  border-radius: var(--w5d31-radius);
  margin-top: 0.8rem;
}

.w5d31-slide {
  display: none;
  width: 100%;
  cursor: pointer;
  border-radius: var(--w5d31-radius);
}

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

.w5d31-slide img {
  width: 100%;
  border-radius: var(--w5d31-radius);
  aspect-ratio: 430 / 200;
  object-fit: cover;
}

/* === Main Content === */
.w5d31-main {
  padding-top: 64px;
  padding-bottom: 2rem;
}

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

/* === Section Headings === */
.w5d31-section-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--w5d31-gold);
  margin: 2rem 0 1rem;
  padding-left: 0.8rem;
  border-left: 4px solid var(--w5d31-accent);
}

.w5d31-section-subtitle {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--w5d31-light);
  margin: 1.5rem 0 0.8rem;
}

/* === Game Grid === */
.w5d31-category-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--w5d31-accent);
  margin: 1.5rem 0 0.8rem;
  padding: 0.5rem 0.8rem;
  background: rgba(138, 43, 226, 0.15);
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

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

.w5d31-game-item {
  text-align: center;
  cursor: pointer;
  transition: transform 0.2s;
  border-radius: 8px;
  padding: 0.5rem;
  background: var(--w5d31-card-bg);
}

.w5d31-game-item:hover {
  transform: scale(1.05);
}

.w5d31-game-item img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 8px;
  object-fit: cover;
  margin-bottom: 0.3rem;
}

.w5d31-game-item span {
  font-size: 1rem;
  color: var(--w5d31-text-dim);
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* === Content Cards === */
.w5d31-card {
  background: var(--w5d31-card-bg);
  border-radius: var(--w5d31-radius);
  padding: 1.5rem;
  margin: 1rem 0;
  border: 1px solid rgba(138, 43, 226, 0.2);
}

.w5d31-card p {
  font-size: 1.3rem;
  line-height: 1.8rem;
  color: var(--w5d31-text-dim);
  margin-bottom: 0.8rem;
}

/* === Promo Link Styles === */
.w5d31-promo-btn {
  display: inline-block;
  background: linear-gradient(135deg, var(--w5d31-primary), var(--w5d31-accent));
  color: #fff;
  font-weight: 700;
  font-size: 1.4rem;
  padding: 0.8rem 2rem;
  border-radius: 25px;
  cursor: pointer;
  border: none;
  text-align: center;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 3px 12px rgba(139, 0, 139, 0.35);
}

.w5d31-promo-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 5px 20px rgba(139, 0, 139, 0.5);
}

.w5d31-promo-link {
  color: var(--w5d31-gold);
  font-weight: 700;
  cursor: pointer;
  border-bottom: 1px dashed var(--w5d31-gold);
}

.w5d31-promo-link:hover {
  color: #fff;
}

/* === Footer === */
.w5d31-footer {
  background: linear-gradient(180deg, var(--w5d31-bg-mid), #1a1a1a);
  padding: 2rem 1rem;
  margin-top: 2rem;
  border-top: 2px solid var(--w5d31-primary);
}

.w5d31-footer-brand {
  font-size: 1.3rem;
  color: var(--w5d31-text-dim);
  line-height: 1.7rem;
  margin-bottom: 1.5rem;
}

.w5d31-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-bottom: 1.5rem;
}

.w5d31-footer-links a {
  font-size: 1.2rem;
  padding: 0.3rem 0.8rem;
  background: rgba(138, 43, 226, 0.15);
  border-radius: 15px;
  color: var(--w5d31-light);
}

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

/* === Bottom Navigation (Mobile Only) === */
.w5d31-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: linear-gradient(180deg, #2a1a3e, #1a0a2e);
  border-top: 2px solid var(--w5d31-primary);
  display: flex;
  justify-content: space-around;
  align-items: center;
  height: 60px;
  padding: 0 0.3rem;
  box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.5);
}

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

.w5d31-bottom-nav-btn:hover,
.w5d31-bottom-nav-btn.w5d31-btn-active {
  color: var(--w5d31-gold);
  transform: scale(1.08);
}

.w5d31-bottom-nav-btn .w5d31-nav-icon {
  font-size: 22px;
  margin-bottom: 0.2rem;
}

.w5d31-bottom-nav-btn .w5d31-nav-label {
  font-size: 1rem;
  font-weight: 600;
}

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

/* === Responsive Utilities === */
@media (max-width: 430px) {
  .w5d31-container { padding: 0 0.8rem; }
  .w5d31-game-grid { gap: 0.6rem; }
}

@media (min-width: 431px) and (max-width: 768px) {
  .w5d31-game-grid { grid-template-columns: repeat(5, 1fr); }
}

/* === Winner ticker === */
.w5d31-winner-bar {
  background: rgba(139, 0, 139, 0.2);
  border-radius: 8px;
  padding: 0.6rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0.8rem 0;
  overflow: hidden;
}

.w5d31-winner-bar span {
  font-size: 1.2rem;
  color: var(--w5d31-gold);
  white-space: nowrap;
}

/* === Testimonial === */
.w5d31-testimonial {
  background: var(--w5d31-card-bg);
  border-radius: var(--w5d31-radius);
  padding: 1.2rem;
  margin: 0.8rem 0;
  border-left: 3px solid var(--w5d31-accent);
}

.w5d31-testimonial p {
  font-size: 1.2rem;
  font-style: italic;
  color: var(--w5d31-text-dim);
  margin-bottom: 0.5rem;
}

.w5d31-testimonial strong {
  color: var(--w5d31-gold);
  font-size: 1.1rem;
}

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

.w5d31-payment-item {
  background: rgba(221, 160, 221, 0.1);
  border-radius: 8px;
  padding: 0.5rem 1rem;
  font-size: 1.2rem;
  color: var(--w5d31-light);
}

/* === FAQ Accordion === */
.w5d31-faq-item {
  background: var(--w5d31-card-bg);
  border-radius: 8px;
  margin: 0.6rem 0;
  padding: 1rem 1.2rem;
  border: 1px solid rgba(138, 43, 226, 0.15);
}

.w5d31-faq-item h3 {
  font-size: 1.3rem;
  color: var(--w5d31-gold);
  margin-bottom: 0.5rem;
}

.w5d31-faq-item p {
  font-size: 1.2rem;
  color: var(--w5d31-text-dim);
  line-height: 1.6rem;
}

/* === Feature Grid === */
.w5d31-feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.8rem;
  margin: 1rem 0;
}

.w5d31-feature-item {
  background: var(--w5d31-card-bg);
  border-radius: 8px;
  padding: 1rem;
  text-align: center;
  border: 1px solid rgba(138, 43, 226, 0.15);
}

.w5d31-feature-item .w5d31-feat-icon {
  font-size: 2.4rem;
  margin-bottom: 0.5rem;
}

.w5d31-feature-item h4 {
  font-size: 1.2rem;
  color: var(--w5d31-gold);
  margin-bottom: 0.3rem;
}

.w5d31-feature-item p {
  font-size: 1.1rem;
  color: var(--w5d31-text-dim);
}

/* === CTA Section === */
.w5d31-cta-section {
  background: linear-gradient(135deg, var(--w5d31-primary), var(--w5d31-accent));
  border-radius: var(--w5d31-radius);
  padding: 1.5rem;
  text-align: center;
  margin: 1.5rem 0;
}

.w5d31-cta-section h3 {
  color: #fff;
  font-size: 1.6rem;
  margin-bottom: 0.8rem;
}

.w5d31-cta-section p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.3rem;
  margin-bottom: 1rem;
}

.w5d31-cta-section .w5d31-promo-btn {
  background: var(--w5d31-gold);
  color: #1a0a2e;
}

/* === Inline link styles === */
.w5d31-inline-link {
  color: var(--w5d31-light);
  text-decoration: underline;
  cursor: pointer;
}
