/* ==========================================================================
   COLOR GAME PINOY (colorgamepinoy.com) - DESIGN SYSTEM & STYLESHEET
   Mobile-First (390px+), High-Contrast Dark Theme with Vibrant Fiesta Accents
   Complies with anti-ui-slop, website-design-guide, and Lighthouse 95+
   ========================================================================== */

:root {
  /* Color Game 6 Dice Colors */
  --dice-red: #ef4444;
  --dice-blue: #3b82f6;
  --dice-green: #10b981;
  --dice-yellow: #f59e0b;
  --dice-white: #f8fafc;
  --dice-pink: #ec4899;

  /* Brand Palette */
  --bg-primary: #0a0e17;
  --bg-secondary: #111827;
  --bg-surface: #1e293b;
  --bg-surface-elevated: #283548;
  --bg-glass: rgba(17, 24, 39, 0.85);

  --accent-gold: #fbbf24;
  --accent-gold-hover: #f59e0b;
  --accent-glow: rgba(251, 191, 36, 0.35);

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(251, 191, 36, 0.6);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-gold: 0 0 25px rgba(251, 191, 36, 0.3);

  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --transition-fast: 0.2s ease;
  --transition-smooth: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  font-family: var(--font-family);
  background-color: var(--bg-primary);
  color: var(--text-main);
  line-height: 1.6;
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  padding-bottom: 70px; /* Space for sticky bottom bar on mobile */
}

@media (min-width: 1024px) {
  body {
    padding-bottom: 0;
  }
}

a {
  color: var(--accent-gold);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: #fde68a;
  text-decoration: underline;
}

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

/* Container */
.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 16px;
}

@media (min-width: 768px) {
  .container {
    padding: 0 24px;
  }
}

/* Header & Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
}

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

.brand-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-logo {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.25);
}

.brand-text {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-text span {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent-gold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-menu {
  display: none;
  align-items: center;
  gap: 24px;
  list-style: none;
}

@media (min-width: 1024px) {
  .nav-menu {
    display: flex;
  }
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.nav-link:hover, .nav-link.active {
  color: var(--accent-gold);
  background: rgba(255, 255, 255, 0.05);
  text-decoration: none;
}

.header-cta-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.menu-toggle {
  background: none;
  border: 1px solid var(--border-subtle);
  color: #fff;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: block;
}

@media (min-width: 1024px) {
  .menu-toggle {
    display: none;
  }
}

/* Mobile Drawer */
.mobile-drawer {
  position: fixed;
  top: 68px;
  left: 0;
  width: 100%;
  background: var(--bg-secondary);
  border-bottom: 2px solid var(--accent-gold);
  display: none;
  flex-direction: column;
  padding: 20px;
  z-index: 99;
  box-shadow: var(--shadow-md);
}

.mobile-drawer.open {
  display: flex;
}

.mobile-drawer a {
  padding: 12px 16px;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-main);
  border-radius: var(--radius-sm);
  border-bottom: 1px solid var(--border-subtle);
}

.mobile-drawer a:hover {
  background: var(--bg-surface);
  color: var(--accent-gold);
  text-decoration: none;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  min-height: 44px;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition-smooth);
  border: none;
  text-align: center;
}

.btn-primary {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #0f172a;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.6);
  color: #0f172a;
  text-decoration: none;
}

.btn-secondary {
  background: var(--bg-surface-elevated);
  color: #fff;
  border: 1px solid var(--border-subtle);
}

.btn-secondary:hover {
  background: #334155;
  color: var(--accent-gold);
  text-decoration: none;
}

.btn-glow {
  background: linear-gradient(135deg, #ef4444 0%, #f59e0b 100%);
  color: #fff;
  font-weight: 800;
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.5);
  animation: pulse-glow 2.5s infinite;
}

.btn-glow:hover {
  transform: scale(1.03);
  color: #fff;
  text-decoration: none;
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 15px rgba(239, 68, 68, 0.4); }
  50% { box-shadow: 0 0 28px rgba(245, 158, 11, 0.8); }
}

/* Hero Section */
.hero {
  position: relative;
  padding: 40px 0 50px;
  background: radial-gradient(circle at 50% 20%, rgba(245, 158, 11, 0.12) 0%, transparent 70%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: center;
}

@media (min-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1.15fr 0.85fr;
    gap: 48px;
  }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.3);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent-gold);
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.hero-title {
  font-size: 2.25rem;
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
  color: #fff;
}

@media (min-width: 768px) {
  .hero-title {
    font-size: 3.25rem;
  }
}

.hero-title .gradient-text {
  background: linear-gradient(135deg, #fbbf24 0%, #f43f5e 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 24px;
  max-width: 600px;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 24px;
}

.hero-trust-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  font-size: 0.85rem;
  color: var(--text-dim);
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
}

.trust-icon {
  color: var(--dice-green);
  font-weight: bold;
}

.hero-artwork {
  position: relative;
}

.hero-img {
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-subtle);
}

/* 6-Color Dice Strip */
.color-strip {
  display: flex;
  height: 6px;
  width: 100%;
  border-radius: var(--radius-full);
  overflow: hidden;
  margin: 20px 0;
}

.color-strip-item {
  flex: 1;
}

.color-strip-item.red { background: var(--dice-red); }
.color-strip-item.blue { background: var(--dice-blue); }
.color-strip-item.green { background: var(--dice-green); }
.color-strip-item.yellow { background: var(--dice-yellow); }
.color-strip-item.white { background: var(--dice-white); }
.color-strip-item.pink { background: var(--dice-pink); }

/* Interactive Color Game Simulator */
.game-sim-card {
  background: var(--bg-secondary);
  border: 1px solid rgba(251, 191, 36, 0.3);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.5);
  margin: 32px 0;
}

.sim-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.sim-title {
  font-size: 1.35rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sim-balance-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--accent-gold);
}

.dice-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin: 24px 0;
  min-height: 90px;
}

.dice-box {
  width: 76px;
  height: 76px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4), inset 0 2px 4px rgba(255, 255, 255, 0.3);
  transition: transform 0.2s ease;
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.dice-box.rolling {
  animation: dice-tumble 0.6s infinite;
}

@keyframes dice-tumble {
  0% { transform: rotate(0deg) scale(0.9); }
  25% { transform: rotate(90deg) scale(1.1); }
  50% { transform: rotate(180deg) scale(0.9); }
  75% { transform: rotate(270deg) scale(1.1); }
  100% { transform: rotate(360deg) scale(1); }
}

.dice-box.red { background: var(--dice-red); }
.dice-box.blue { background: var(--dice-blue); }
.dice-box.green { background: var(--dice-green); }
.dice-box.yellow { background: var(--dice-yellow); color: #000; text-shadow: none; }
.dice-box.white { background: var(--dice-white); color: #000; text-shadow: none; }
.dice-box.pink { background: var(--dice-pink); }

.color-bet-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

@media (min-width: 640px) {
  .color-bet-grid {
    grid-template-columns: repeat(6, 1fr);
  }
}

.color-bet-btn {
  padding: 12px 6px;
  border-radius: var(--radius-md);
  font-weight: 800;
  font-size: 0.85rem;
  cursor: pointer;
  border: 2px solid transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transition: all var(--transition-fast);
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.color-bet-btn.active {
  border-color: #fff;
  transform: scale(1.05);
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.5);
}

.color-bet-btn.red { background: var(--dice-red); }
.color-bet-btn.blue { background: var(--dice-blue); }
.color-bet-btn.green { background: var(--dice-green); }
.color-bet-btn.yellow { background: var(--dice-yellow); color: #000; text-shadow: none; }
.color-bet-btn.white { background: var(--dice-white); color: #000; text-shadow: none; }
.color-bet-btn.pink { background: var(--dice-pink); }

.sim-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.sim-result-msg {
  text-align: center;
  font-size: 1.05rem;
  font-weight: 700;
  margin-top: 14px;
  min-height: 28px;
}

.sim-result-msg.win {
  color: #34d399;
}

.sim-result-msg.loss {
  color: #f87171;
}

/* Content Cards Grid */
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin: 28px 0;
}

@media (min-width: 640px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .card-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.game-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all var(--transition-smooth);
}

.game-card:hover {
  transform: translateY(-4px);
  border-color: rgba(251, 191, 36, 0.4);
  box-shadow: var(--shadow-md);
}

.game-card-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  background: #000;
}

.game-card-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.game-card-tag {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-gold);
  text-transform: uppercase;
  margin-bottom: 6px;
}

.game-card-title {
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 8px;
  color: #fff;
}

.game-card-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  flex-grow: 1;
}

/* Data Tables */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  margin: 24px 0;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-secondary);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.92rem;
}

.data-table th {
  background: var(--bg-surface-elevated);
  padding: 14px 16px;
  font-weight: 700;
  color: var(--accent-gold);
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
}

.data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-main);
}

.data-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* Callout Boxes */
.callout {
  padding: 20px;
  border-radius: var(--radius-md);
  margin: 24px 0;
  border-left: 4px solid var(--accent-gold);
  background: var(--bg-surface);
}

.callout.expert {
  border-left-color: #38bdf8;
  background: rgba(56, 189, 248, 0.08);
}

.callout.tldr {
  border-left-color: var(--accent-gold);
  background: rgba(245, 158, 11, 0.08);
}

.callout.warning {
  border-left-color: var(--dice-red);
  background: rgba(239, 68, 68, 0.08);
}

.callout-title {
  font-weight: 800;
  font-size: 1.05rem;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Answer Capsule */
.answer-capsule {
  background: rgba(251, 191, 36, 0.08);
  border: 1px solid rgba(251, 191, 36, 0.25);
  padding: 16px 20px;
  border-radius: var(--radius-md);
  margin-bottom: 18px;
  font-size: 1rem;
  font-weight: 500;
  color: #fde68a;
}

/* Numbered Steps */
.step-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 24px 0;
}

.step-item {
  display: flex;
  gap: 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px;
}

.step-num {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--accent-gold);
  color: #000;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.step-content h4 {
  font-size: 1.05rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.step-content p {
  font-size: 0.92rem;
  color: var(--text-muted);
}

/* Accordion FAQ */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 28px 0;
}

.faq-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.faq-question {
  width: 100%;
  text-align: left;
  padding: 18px 20px;
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.faq-question::after {
  content: "+";
  font-size: 1.4rem;
  color: var(--accent-gold);
  transition: transform var(--transition-fast);
}

.faq-item.active .faq-question::after {
  content: "−";
}

.faq-answer {
  display: none;
  padding: 0 20px 20px;
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.faq-item.active .faq-answer {
  display: block;
}

/* Breadcrumbs */
.breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-dim);
  padding: 16px 0 8px;
}

.breadcrumbs a {
  color: var(--text-muted);
}

.breadcrumbs span.divider {
  color: var(--text-dim);
}

.breadcrumbs span.current {
  color: var(--accent-gold);
}

/* Article Body Typography */
.article-content {
  font-size: 1.02rem;
  line-height: 1.75;
  color: var(--text-main);
}

.article-content h1 {
  font-size: 2.2rem;
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 20px;
  color: #fff;
}

.article-content h2 {
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1.3;
  margin: 36px 0 16px;
  color: #fff;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 10px;
}

.article-content h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 24px 0 12px;
  color: #f1f5f9;
}

.article-content p {
  margin-bottom: 18px;
}

.article-content ul, .article-content ol {
  margin-bottom: 20px;
  padding-left: 24px;
}

.article-content li {
  margin-bottom: 8px;
}

/* Footer Directory */
.site-footer {
  background: #060910;
  border-top: 1px solid var(--border-subtle);
  padding: 48px 0 24px;
  margin-top: 60px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  margin-bottom: 40px;
}

@media (min-width: 640px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1.3fr repeat(5, 1fr);
  }
}

.footer-col h4 {
  font-size: 1rem;
  font-weight: 800;
  color: var(--accent-gold);
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col a {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.footer-col a:hover {
  color: #fff;
}

.footer-compliance {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 24px;
  font-size: 0.8rem;
  color: var(--text-dim);
  text-align: center;
  line-height: 1.7;
}

/* Mobile Sticky Bottom Bar */
.mobile-sticky-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 64px;
  background: rgba(10, 14, 23, 0.95);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 16px;
  z-index: 999;
}

@media (min-width: 1024px) {
  .mobile-sticky-bar {
    display: none;
  }
}

.mobile-sticky-bar .btn {
  flex: 1;
  max-width: 180px;
  min-height: 44px;
  font-size: 0.9rem;
  padding: 8px 16px;
}
