/**
 * earnph.cfd - Layout Stylesheet
 * All classes use v513- prefix for namespace isolation
 * Mobile-first design, max-width 430px
 */

/* CSS Custom Properties */
:root {
  --v513-primary: #FF4500;
  --v513-bg: #1A1A2E;
  --v513-bg-dark: #12121F;
  --v513-bg-card: #222240;
  --v513-text: #F5F5F5;
  --v513-text-muted: #B0B0C8;
  --v513-accent: #FF9800;
  --v513-peru: #CD853F;
  --v513-salmon: #E9967A;
  --v513-border: #2E2E50;
  --v513-radius: 8px;
  --v513-radius-lg: 12px;
  --v513-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
  --v513-font-size-base: 1.6rem;
  font-size: 62.5%;
}

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

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

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

a {
  color: var(--v513-accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

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

/* Header */
.v513-header {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  height: 56px;
  background: var(--v513-bg-dark);
  border-bottom: 1px solid var(--v513-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.2rem;
  z-index: 1000;
}

.v513-logo-wrap {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.v513-logo-wrap img {
  width: 28px;
  height: 28px;
  border-radius: 4px;
}

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

.v513-header-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.v513-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  min-width: 44px;
  padding: 0.5rem 1.2rem;
  border: none;
  border-radius: var(--v513-radius);
  font-size: 1.3rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.v513-btn:hover {
  text-decoration: none;
}

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

.v513-btn-register:hover {
  background: #E03E00;
  transform: scale(1.03);
}

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

.v513-btn-login:hover {
  background: rgba(255, 152, 0, 0.1);
}

.v513-menu-toggle {
  background: none;
  border: none;
  color: var(--v513-text);
  font-size: 2.2rem;
  cursor: pointer;
  padding: 0.4rem;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Mobile Menu Overlay */
.v513-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.v513-overlay-active {
  opacity: 1;
  visibility: visible;
}

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

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

.v513-mobile-menu .v513-menu-close {
  position: absolute;
  top: 1rem;
  right: 1.2rem;
  background: none;
  border: none;
  color: var(--v513-text);
  font-size: 2.4rem;
  cursor: pointer;
  min-width: 44px;
  min-height: 44px;
}

.v513-mobile-menu nav {
  margin-top: 3rem;
}

.v513-mobile-menu nav a {
  display: block;
  padding: 1rem 0;
  color: var(--v513-text);
  font-size: 1.5rem;
  border-bottom: 1px solid var(--v513-border);
  transition: color 0.2s;
}

.v513-mobile-menu nav a:hover {
  color: var(--v513-primary);
  text-decoration: none;
}

/* Main Content */
.v513-main {
  padding-top: 56px;
  padding-bottom: 2rem;
}

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

/* Carousel */
.v513-carousel {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: var(--v513-radius-lg);
  margin: 1rem 0;
}

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

.v513-slide img {
  width: 100%;
  height: auto;
  min-height: 160px;
  object-fit: cover;
  border-radius: var(--v513-radius-lg);
}

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

.v513-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  border: none;
  transition: background 0.2s;
}

.v513-dot-active {
  background: var(--v513-primary);
}

/* Section Headings */
.v513-section-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--v513-text);
  margin: 2rem 0 1rem;
  padding-left: 1rem;
  border-left: 3px solid var(--v513-primary);
}

.v513-section-title span {
  color: var(--v513-primary);
}

/* Game Grid */
.v513-game-section {
  margin-bottom: 2rem;
}

.v513-cat-title {
  font-size: 1.7rem;
  font-weight: 600;
  color: var(--v513-accent);
  margin: 1.5rem 0 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

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

.v513-game-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: transform 0.2s;
  text-decoration: none;
}

.v513-game-card:hover {
  transform: scale(1.05);
  text-decoration: none;
}

.v513-game-card img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--v513-radius);
  border: 2px solid var(--v513-border);
  object-fit: cover;
}

.v513-game-card .v513-game-name {
  font-size: 1.1rem;
  color: var(--v513-text-muted);
  text-align: center;
  margin-top: 0.3rem;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

/* Content Modules */
.v513-module {
  background: var(--v513-bg-card);
  border-radius: var(--v513-radius-lg);
  padding: 1.6rem;
  margin: 1.2rem 0;
  border: 1px solid var(--v513-border);
}

.v513-module h2 {
  font-size: 1.8rem;
  color: var(--v513-primary);
  margin-bottom: 1rem;
}

.v513-module h3 {
  font-size: 1.5rem;
  color: var(--v513-accent);
  margin: 1rem 0 0.5rem;
}

.v513-module p {
  color: var(--v513-text-muted);
  line-height: 1.6;
  margin-bottom: 0.8rem;
}

.v513-module ul {
  list-style: none;
  padding: 0;
}

.v513-module ul li {
  padding: 0.6rem 0;
  color: var(--v513-text-muted);
  border-bottom: 1px solid var(--v513-border);
  font-size: 1.4rem;
}

.v513-module ul li:last-child {
  border-bottom: none;
}

/* Promo Button */
.v513-promo-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--v513-primary), var(--v513-accent));
  color: #fff;
  font-size: 1.4rem;
  font-weight: 700;
  padding: 1rem 2rem;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  min-height: 44px;
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
  width: 100%;
  margin: 1rem 0;
}

.v513-promo-btn:hover {
  transform: scale(1.03);
  box-shadow: 0 4px 20px rgba(255, 69, 0, 0.4);
  text-decoration: none;
}

/* Highlight text link */
.v513-promo-link {
  color: var(--v513-primary);
  font-weight: 700;
  cursor: pointer;
  transition: color 0.2s;
}

.v513-promo-link:hover {
  color: var(--v513-accent);
  text-decoration: underline;
}

/* Testimonial */
.v513-testimonial {
  background: var(--v513-bg-card);
  border-radius: var(--v513-radius-lg);
  padding: 1.4rem;
  margin: 0.8rem 0;
  border-left: 3px solid var(--v513-peru);
}

.v513-testimonial p {
  font-style: italic;
  color: var(--v513-text-muted);
  margin-bottom: 0.5rem;
}

.v513-testimonial .v513-author {
  color: var(--v513-salmon);
  font-size: 1.2rem;
  font-weight: 600;
}

/* Stats bar */
.v513-stat-row {
  display: flex;
  justify-content: space-between;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--v513-border);
  font-size: 1.3rem;
}

.v513-stat-row:last-child {
  border-bottom: none;
}

.v513-stat-label {
  color: var(--v513-text-muted);
}

.v513-stat-value {
  color: var(--v513-accent);
  font-weight: 600;
}

/* Winner item */
.v513-winner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--v513-border);
}

.v513-winner:last-child {
  border-bottom: none;
}

.v513-winner-name {
  color: var(--v513-text);
  font-weight: 500;
}

.v513-winner-game {
  color: var(--v513-text-muted);
  font-size: 1.2rem;
}

.v513-winner-amount {
  color: var(--v513-primary);
  font-weight: 700;
}

/* Payment icons */
.v513-payment-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 0.8rem;
}

.v513-payment-item {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--v513-border);
  border-radius: var(--v513-radius);
  padding: 0.6rem 1rem;
  font-size: 1.3rem;
  color: var(--v513-text-muted);
}

/* Footer */
.v513-footer {
  background: var(--v513-bg-dark);
  padding: 2rem 1.2rem;
  border-top: 1px solid var(--v513-border);
  margin-top: 2rem;
}

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

.v513-footer-brand p {
  color: var(--v513-text-muted);
  font-size: 1.3rem;
  line-height: 1.6;
}

.v513-footer-promos {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}

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

.v513-footer-links a {
  color: var(--v513-text-muted);
  font-size: 1.2rem;
  padding: 0.3rem 0.6rem;
}

.v513-footer-links a:hover {
  color: var(--v513-accent);
}

.v513-copyright {
  text-align: center;
  color: var(--v513-text-muted);
  font-size: 1.1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--v513-border);
}

/* Bottom Navigation */
.v513-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  height: 60px;
  background: var(--v513-bg-dark);
  border-top: 1px solid var(--v513-border);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 1000;
  padding: 0 0.4rem;
}

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

.v513-bottom-btn:hover {
  color: var(--v513-primary);
  transform: scale(1.08);
}

.v513-bottom-btn .v513-nav-icon {
  font-size: 22px;
  margin-bottom: 2px;
}

.v513-bottom-btn .v513-nav-label {
  font-size: 1rem;
  line-height: 1;
}

.v513-bottom-btn.v513-active {
  color: var(--v513-primary);
}

.v513-bottom-btn.v513-active .v513-nav-icon {
  color: var(--v513-accent);
}

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

/* Responsive adjustments */
@media (max-width: 768px) {
  .v513-main {
    padding-bottom: 80px;
  }
}

/* Utility classes */
.v513-text-center {
  text-align: center;
}

.v513-mt-1 {
  margin-top: 0.5rem;
}

.v513-mt-2 {
  margin-top: 1rem;
}

.v513-mb-1 {
  margin-bottom: 0.5rem;
}

.v513-mb-2 {
  margin-bottom: 1rem;
}

.v513-hidden {
  display: none !important;
}

/* FAQ accordion */
.v513-faq-item {
  border: 1px solid var(--v513-border);
  border-radius: var(--v513-radius);
  margin-bottom: 0.8rem;
  overflow: hidden;
}

.v513-faq-q {
  padding: 1.2rem;
  font-weight: 600;
  color: var(--v513-text);
  background: var(--v513-bg-card);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.v513-faq-a {
  padding: 1rem 1.2rem;
  color: var(--v513-text-muted);
  font-size: 1.3rem;
  line-height: 1.6;
  background: rgba(34, 34, 64, 0.5);
}

/* Review stars */
.v513-stars {
  color: var(--v513-accent);
  font-size: 1.4rem;
  margin-bottom: 0.4rem;
}

/* Feature grid */
.v513-feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
}

.v513-feature-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--v513-border);
  border-radius: var(--v513-radius);
  padding: 1rem;
  text-align: center;
}

.v513-feature-item i,
.v513-feature-item .material-icons {
  font-size: 24px;
  color: var(--v513-primary);
  margin-bottom: 0.4rem;
}

.v513-feature-item p {
  font-size: 1.2rem;
  color: var(--v513-text-muted);
}

/* App download CTA */
.v513-app-cta {
  background: linear-gradient(135deg, var(--v513-bg-card), rgba(255, 69, 0, 0.1));
  border-radius: var(--v513-radius-lg);
  padding: 1.6rem;
  text-align: center;
  border: 1px solid var(--v513-border);
}

.v513-app-cta h3 {
  font-size: 1.6rem;
  color: var(--v513-accent);
  margin-bottom: 0.6rem;
}

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