/* PHOpen - Main Stylesheet
 * Dark blue-gray with plum/purple accents
 * Mobile-first, max-width 430px
 * All classes use g478- prefix
 */

:root {
  --g478-primary: #DDA0DD;
  --g478-bg: #212F3D;
  --g478-bg-dark: #182028;
  --g478-bg-light: #2a3a4d;
  --g478-text: #F8F9FA;
  --g478-text-muted: #a0aec0;
  --g478-accent: #9370DB;
  --g478-accent-dark: #7B52C0;
  --g478-card-bg: #2a3a4d;
  --g478-border: #3a4a5d;
  --g478-success: #48bb78;
  --g478-warning: #f6ad55;
  --g478-danger: #fc8181;
  --g478-gold: #ffd700;
  --g478-radius: 8px;
  --g478-radius-lg: 12px;
  --g478-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  --g478-shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.4);
  --g478-transition: all 0.3s ease;
}

/* Reset & Base */
html {
  font-size: 62.5%;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

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

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

a {
  color: var(--g478-primary);
  text-decoration: none;
  transition: var(--g478-transition);
}

a:hover {
  color: var(--g478-accent);
}

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

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

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

.g478-logo-wrap {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

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

.g478-logo-text {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--g478-primary);
  letter-spacing: 0.5px;
}

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

.g478-btn-register {
  background: linear-gradient(135deg, var(--g478-accent), var(--g478-primary));
  color: var(--g478-bg-dark);
  border: none;
  padding: 0.6rem 1.4rem;
  border-radius: 20px;
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--g478-transition);
  min-height: 36px;
  min-width: 72px;
  text-align: center;
}

.g478-btn-register:hover {
  transform: scale(1.05);
  box-shadow: 0 0 12px rgba(147, 112, 219, 0.5);
}

.g478-btn-login {
  background: transparent;
  color: var(--g478-primary);
  border: 1px solid var(--g478-primary);
  padding: 0.5rem 1.2rem;
  border-radius: 20px;
  font-size: 1.2rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--g478-transition);
  min-height: 36px;
}

.g478-btn-login:hover {
  background: rgba(221, 160, 221, 0.15);
}

.g478-hamburger {
  background: none;
  border: none;
  color: var(--g478-text);
  font-size: 2rem;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  min-height: 36px;
}

/* Mobile Menu */
.g478-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: var(--g478-transition);
}

.g478-menu-overlay.g478-overlay-visible {
  opacity: 1;
  visibility: visible;
}

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

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

.g478-menu-header {
  padding: 0 1.6rem 1.6rem;
  border-bottom: 1px solid var(--g478-border);
  margin-bottom: 1rem;
}

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

.g478-menu-close {
  position: absolute;
  top: 1.4rem;
  right: 1.4rem;
  background: none;
  border: none;
  color: var(--g478-text);
  font-size: 2.4rem;
  cursor: pointer;
  min-width: 36px;
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.g478-menu-link {
  display: block;
  padding: 1.2rem 1.6rem;
  color: var(--g478-text);
  font-size: 1.4rem;
  font-weight: 500;
  border-bottom: 1px solid rgba(58, 74, 93, 0.5);
  transition: var(--g478-transition);
}

.g478-menu-link:hover {
  background: rgba(147, 112, 219, 0.15);
  color: var(--g478-primary);
  padding-left: 2rem;
}

/* Slider / Banner */
.g478-slider {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 0 0 var(--g478-radius-lg) var(--g478-radius-lg);
}

.g478-slider-track {
  display: flex;
  transition: transform 0.4s ease;
  will-change: transform;
}

.g478-slide {
  min-width: 100%;
  cursor: pointer;
}

.g478-slide img {
  width: 100%;
  height: auto;
  display: block;
}

.g478-slider-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 10;
}

.g478-slider-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(248, 249, 250, 0.4);
  border: none;
  cursor: pointer;
  transition: var(--g478-transition);
  padding: 0;
}

.g478-slider-dot.g478-dot-active {
  background: var(--g478-primary);
  width: 20px;
  border-radius: 4px;
}

/* Main Content Area */
.g478-main {
  margin-top: 56px;
  padding-bottom: 80px;
}

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

/* Page Title */
.g478-page-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--g478-text);
  text-align: center;
  padding: 1.6rem 1.2rem 0.8rem;
  line-height: 2.2rem;
}

.g478-page-title span {
  color: var(--g478-primary);
}

/* Section Title */
.g478-section-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--g478-text);
  padding: 1.4rem 1.2rem 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.g478-section-title i,
.g478-section-title .material-icons {
  color: var(--g478-primary);
  font-size: 1.8rem;
}

.g478-section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, var(--g478-border), transparent);
  margin-left: 0.8rem;
}

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

.g478-game-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: var(--g478-transition);
  border-radius: var(--g478-radius);
  padding: 0.4rem;
}

.g478-game-item:hover {
  transform: translateY(-2px);
  background: rgba(147, 112, 219, 0.1);
}

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

.g478-game-item:hover img {
  border-color: var(--g478-accent);
  box-shadow: 0 0 8px rgba(147, 112, 219, 0.4);
}

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

/* Cards */
.g478-card {
  background: var(--g478-card-bg);
  border-radius: var(--g478-radius-lg);
  padding: 1.6rem;
  margin: 0.8rem 1.2rem;
  border: 1px solid var(--g478-border);
  box-shadow: var(--g478-shadow);
}

.g478-card h2 {
  font-size: 1.6rem;
  color: var(--g478-primary);
  margin-bottom: 0.8rem;
  font-weight: 700;
}

.g478-card h3 {
  font-size: 1.4rem;
  color: var(--g478-accent);
  margin-bottom: 0.6rem;
  font-weight: 600;
}

.g478-card p {
  font-size: 1.2rem;
  color: var(--g478-text-muted);
  line-height: 1.8rem;
  margin-bottom: 0.6rem;
}

/* CTA Box */
.g478-cta-box {
  background: linear-gradient(135deg, var(--g478-bg-light), var(--g478-bg-dark));
  border-radius: var(--g478-radius-lg);
  padding: 2rem 1.6rem;
  margin: 1.2rem;
  text-align: center;
  border: 1px solid var(--g478-accent);
  box-shadow: 0 0 20px rgba(147, 112, 219, 0.2);
}

.g478-cta-box h2 {
  font-size: 1.8rem;
  color: var(--g478-primary);
  margin-bottom: 0.8rem;
}

.g478-cta-box p {
  font-size: 1.2rem;
  color: var(--g478-text-muted);
  line-height: 1.8rem;
  margin-bottom: 1.2rem;
}

.g478-cta-btn {
  display: inline-block;
  background: linear-gradient(135deg, var(--g478-accent), var(--g478-primary));
  color: var(--g478-bg-dark);
  padding: 1rem 2.8rem;
  border-radius: 25px;
  font-size: 1.4rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: var(--g478-transition);
  min-height: 44px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.g478-cta-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 16px rgba(147, 112, 219, 0.6);
}

/* Promo Link Button */
.g478-promo-btn {
  display: inline-block;
  background: linear-gradient(135deg, var(--g478-accent-dark), var(--g478-accent));
  color: var(--g478-text);
  padding: 0.8rem 2rem;
  border-radius: 20px;
  font-size: 1.2rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--g478-transition);
  min-height: 44px;
  text-align: center;
}

.g478-promo-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(147, 112, 219, 0.4);
}

/* Text promo link */
.g478-promo-link {
  color: var(--g478-primary);
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  transition: var(--g478-transition);
}

.g478-promo-link:hover {
  color: var(--g478-accent);
}

/* FAQ Section */
.g478-faq-item {
  border-bottom: 1px solid var(--g478-border);
  padding: 1.2rem 0;
}

.g478-faq-item summary {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--g478-text);
  cursor: pointer;
  padding: 0.4rem 0;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.g478-faq-item summary::after {
  content: '+';
  color: var(--g478-primary);
  font-size: 1.6rem;
  font-weight: 700;
}

.g478-faq-item[open] summary::after {
  content: '-';
}

.g478-faq-item p {
  font-size: 1.2rem;
  color: var(--g478-text-muted);
  line-height: 1.8rem;
  padding-top: 0.8rem;
}

/* Testimonials */
.g478-testimonial {
  background: var(--g478-card-bg);
  border-radius: var(--g478-radius-lg);
  padding: 1.4rem;
  margin: 0.6rem 1.2rem;
  border-left: 3px solid var(--g478-primary);
}

.g478-testimonial-text {
  font-size: 1.2rem;
  color: var(--g478-text-muted);
  line-height: 1.8rem;
  font-style: italic;
  margin-bottom: 0.6rem;
}

.g478-testimonial-author {
  font-size: 1.1rem;
  color: var(--g478-accent);
  font-weight: 600;
}

/* RTP Table */
.g478-rtp-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.8rem 0;
  font-size: 1.1rem;
}

.g478-rtp-table th {
  background: var(--g478-bg-dark);
  color: var(--g478-primary);
  padding: 0.8rem 0.6rem;
  text-align: left;
  font-size: 1.1rem;
  font-weight: 600;
  border-bottom: 2px solid var(--g478-accent);
}

.g478-rtp-table td {
  padding: 0.6rem;
  border-bottom: 1px solid var(--g478-border);
  color: var(--g478-text-muted);
}

.g478-rtp-table tr:hover td {
  background: rgba(147, 112, 219, 0.08);
}

.g478-rtp-high {
  color: var(--g478-success);
  font-weight: 600;
}

/* Feature List */
.g478-feature-list {
  list-style: none;
  padding: 0;
}

.g478-feature-list li {
  padding: 0.6rem 0;
  padding-left: 2rem;
  position: relative;
  font-size: 1.2rem;
  color: var(--g478-text-muted);
  line-height: 1.8rem;
}

.g478-feature-list li::before {
  content: '\f00c';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  left: 0;
  color: var(--g478-accent);
  font-size: 1.1rem;
}

/* Winners Section */
.g478-winner-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.8rem 1.2rem;
  border-bottom: 1px solid var(--g478-border);
}

.g478-winner-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--g478-accent), var(--g478-primary));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--g478-bg-dark);
  font-weight: 700;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.g478-winner-info {
  flex: 1;
}

.g478-winner-name {
  font-size: 1.2rem;
  color: var(--g478-text);
  font-weight: 600;
}

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

.g478-winner-amount {
  font-size: 1.3rem;
  color: var(--g478-gold);
  font-weight: 700;
}

/* Payment Methods */
.g478-payment-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  padding: 0.8rem 0;
  justify-content: center;
}

.g478-payment-item {
  background: var(--g478-bg-dark);
  border: 1px solid var(--g478-border);
  border-radius: var(--g478-radius);
  padding: 0.8rem 1.2rem;
  font-size: 1.1rem;
  color: var(--g478-text-muted);
  text-align: center;
  min-width: 80px;
}

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

.g478-footer-brand {
  text-align: center;
  margin-bottom: 1.4rem;
}

.g478-footer-brand p {
  font-size: 1.1rem;
  color: var(--g478-text-muted);
  line-height: 1.7rem;
  margin-bottom: 0.4rem;
}

.g478-footer-promo {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
  margin: 1.2rem 0;
}

.g478-footer-promo .g478-promo-btn {
  font-size: 1.1rem;
  padding: 0.6rem 1.4rem;
}

.g478-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.4rem;
  justify-content: center;
  padding: 1rem 0;
  border-top: 1px solid var(--g478-border);
  border-bottom: 1px solid var(--g478-border);
}

.g478-footer-links a {
  font-size: 1.1rem;
  color: var(--g478-text-muted);
}

.g478-footer-links a:hover {
  color: var(--g478-primary);
}

.g478-footer-copyright {
  text-align: center;
  padding-top: 1rem;
  font-size: 1rem;
  color: var(--g478-text-muted);
}

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

.g478-bottom-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--g478-text-muted);
  cursor: pointer;
  min-width: 60px;
  min-height: 56px;
  padding: 4px;
  transition: var(--g478-transition);
  gap: 2px;
  position: relative;
}

.g478-bottom-btn i,
.g478-bottom-btn .material-icons {
  font-size: 22px;
  transition: var(--g478-transition);
}

.g478-bottom-btn ion-icon {
  font-size: 24px;
  transition: var(--g478-transition);
}

.g478-bottom-btn span {
  font-size: 1rem;
  line-height: 1.2rem;
}

.g478-bottom-btn:hover,
.g478-bottom-btn.g478-btn-active {
  color: var(--g478-primary);
}

.g478-bottom-btn:hover i,
.g478-bottom-btn:hover .material-icons,
.g478-bottom-btn:hover ion-icon {
  transform: scale(1.15);
}

.g478-bottom-btn.g478-btn-active::after {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 2px;
  background: var(--g478-primary);
  border-radius: 0 0 2px 2px;
}

/* Hide bottom nav on desktop */
@media (min-width: 769px) {
  .g478-bottom-nav {
    display: none;
  }
}

/* Desktop navigation */
.g478-desktop-nav {
  display: none;
}

@media (min-width: 769px) {
  .g478-desktop-nav {
    display: flex;
    gap: 1.2rem;
    align-items: center;
  }

  .g478-hamburger {
    display: none;
  }

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

/* Partner Logos */
.g478-partners {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  justify-content: center;
  padding: 1rem 0;
}

.g478-partners img {
  height: 24px;
  opacity: 0.6;
  transition: var(--g478-transition);
  filter: grayscale(0.5);
}

.g478-partners img:hover {
  opacity: 1;
  filter: grayscale(0);
}

/* Highlight Badge */
.g478-badge {
  display: inline-block;
  background: var(--g478-accent);
  color: var(--g478-text);
  font-size: 1rem;
  padding: 0.2rem 0.6rem;
  border-radius: 10px;
  font-weight: 600;
  line-height: 1.4rem;
}

.g478-badge-hot {
  background: #e53e3e;
}

.g478-badge-new {
  background: var(--g478-success);
}

/* Responsive Text */
.g478-text-sm {
  font-size: 1.1rem;
  color: var(--g478-text-muted);
  line-height: 1.7rem;
}

.g478-text-lg {
  font-size: 1.4rem;
  color: var(--g478-text);
  line-height: 2rem;
}

/* Inline promo link style */
.g478-inline-link {
  color: var(--g478-primary);
  font-weight: 600;
  cursor: pointer;
  border-bottom: 1px dashed var(--g478-primary);
  transition: var(--g478-transition);
}

.g478-inline-link:hover {
  color: var(--g478-accent);
  border-bottom-color: var(--g478-accent);
}

/* Tricks list */
.g478-tricks-list {
  counter-reset: trick-counter;
  list-style: none;
  padding: 0;
}

.g478-tricks-list li {
  counter-increment: trick-counter;
  padding: 0.8rem 0 0.8rem 3.2rem;
  position: relative;
  font-size: 1.2rem;
  color: var(--g478-text-muted);
  line-height: 1.8rem;
  border-bottom: 1px solid rgba(58, 74, 93, 0.3);
}

.g478-tricks-list li::before {
  content: counter(trick-counter);
  position: absolute;
  left: 0;
  top: 0.8rem;
  width: 2.4rem;
  height: 2.4rem;
  background: linear-gradient(135deg, var(--g478-accent), var(--g478-primary));
  color: var(--g478-bg-dark);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 700;
}

/* Utility classes */
.g478-text-center { text-align: center; }
.g478-mt-1 { margin-top: 0.8rem; }
.g478-mt-2 { margin-top: 1.6rem; }
.g478-mb-1 { margin-bottom: 0.8rem; }
.g478-mb-2 { margin-bottom: 1.6rem; }
.g478-p-1 { padding: 0.8rem; }
.g478-p-2 { padding: 1.6rem; }

/* Divider */
.g478-divider {
  height: 1px;
  background: linear-gradient(to right, transparent, var(--g478-border), transparent);
  margin: 1.2rem 0;
}
