/* ==========================================================================
   PureKing777 - Modern Luxury Web Interface
   ========================================================================== */

:root {
  --bg-main: #070a12;
  --bg-card: rgba(15, 23, 42, 0.75);
  --bg-card-hover: rgba(23, 34, 60, 0.85);
  --border-card: rgba(245, 158, 11, 0.2);
  --border-card-hover: rgba(251, 191, 36, 0.5);
  
  --gold-primary: #f59e0b;
  --gold-light: #fde68a;
  --gold-gradient: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #d97706 100%);
  --gold-glow: 0 0 25px rgba(245, 158, 11, 0.35);

  --emerald-primary: #10b981;
  --emerald-gradient: linear-gradient(135deg, #34d399 0%, #10b981 100%);
  --emerald-glow: 0 0 20px rgba(16, 185, 129, 0.4);

  --purple-accent: #8b5cf6;
  --purple-gradient: linear-gradient(135deg, #a78bfa 0%, #7c3aed 100%);

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dark: #0f172a;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-full: 9999px;

  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.6), 0 0 1px 1px rgba(255, 255, 255, 0.05);
}

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

body {
  font-family: 'Outfit', 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-main);
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(139, 92, 246, 0.12) 0%, transparent 40%),
    radial-gradient(circle at 85% 25%, rgba(245, 158, 11, 0.12) 0%, transparent 40%),
    radial-gradient(circle at 50% 80%, rgba(16, 185, 129, 0.08) 0%, transparent 50%);
  background-attachment: fixed;
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  padding-bottom: 70px; /* Space for mobile sticky bottom bar */
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
  transition: all 0.2s ease;
}

/* ==========================================================================
   Navigation Bar
   ========================================================================== */
.modern-navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(7, 10, 18, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 12px 0;
}

.nav-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo-img {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  filter: drop-shadow(0 0 10px rgba(245, 158, 11, 0.5));
  object-fit: contain;
}

.brand-name {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 1px;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-transform: uppercase;
}

.brand-subtitle {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 2px;
  text-transform: uppercase;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.live-clock-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  color: #cbd5e1;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--emerald-primary);
  box-shadow: 0 0 10px var(--emerald-primary);
  animation: pulse-dot 1.5s infinite;
}

@keyframes pulse-dot {
  0% { transform: scale(0.95); opacity: 0.7; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.7; }
}

.btn-nav-download {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--gold-gradient);
  color: var(--text-dark);
  font-weight: 700;
  font-size: 14px;
  padding: 8px 18px;
  border-radius: var(--radius-full);
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.35);
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-nav-download:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.5);
}

/* ==========================================================================
   Ticker / Marquee Banner
   ========================================================================== */
.ticker-banner {
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
  border-top: 1px solid rgba(245, 158, 11, 0.2);
  border-bottom: 1px solid rgba(245, 158, 11, 0.2);
  overflow: hidden;
  display: flex;
  align-items: center;
  height: 42px;
}

.ticker-badge {
  background: var(--gold-gradient);
  color: var(--text-dark);
  font-weight: 800;
  font-size: 11px;
  padding: 0 16px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 6px;
  text-transform: uppercase;
  letter-spacing: 1px;
  z-index: 2;
  white-space: nowrap;
}

.ticker-track {
  display: flex;
  white-space: nowrap;
  animation: marquee 28s linear infinite;
}

.ticker-track:hover {
  animation-play-state: paused;
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  padding: 0 30px;
  font-size: 13px;
  font-weight: 500;
  color: #e2e8f0;
}

.ticker-item span.highlight {
  color: var(--gold-primary);
  font-weight: 700;
  margin: 0 4px;
}

@keyframes marquee {
  0% { transform: translateX(0%); }
  100% { transform: translateX(-50%); }
}

/* ==========================================================================
   Main Container
   ========================================================================== */
.main-wrapper {
  max-width: 1240px;
  margin: 0 auto;
  padding: 24px 20px;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 32px;
}

@media (max-width: 880px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
}

/* Card: Latest Result Spotlight */
.hero-result-card {
  position: relative;
  background: linear-gradient(145deg, rgba(23, 37, 84, 0.8) 0%, rgba(15, 23, 42, 0.9) 100%);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hero-result-card::before {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.25) 0%, transparent 70%);
  pointer-events: none;
}

.card-top-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: var(--gold-light);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  width: fit-content;
}

.hero-result-content {
  text-align: center;
  margin: 20px 0;
}

.hero-game-name {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 12px;
}

.hero-result-bubble {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 110px;
  height: 110px;
  background: var(--gold-gradient);
  border-radius: 50%;
  box-shadow: 0 0 35px rgba(245, 158, 11, 0.6), inset 0 0 15px rgba(255, 255, 255, 0.5);
  border: 3px solid #fff;
  margin: 10px 0;
  animation: float-bubble 3s ease-in-out infinite;
}

@keyframes float-bubble {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.hero-result-bubble span {
  font-size: 52px;
  font-weight: 900;
  color: #0f172a;
  line-height: 1;
}

.hero-result-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 14px;
  font-size: 13px;
  color: var(--text-muted);
}

/* Card: App Download Hero */
.hero-app-card {
  position: relative;
  background: linear-gradient(145deg, rgba(30, 27, 75, 0.8) 0%, rgba(15, 23, 42, 0.9) 100%);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hero-app-card::before {
  content: '';
  position: absolute;
  top: -40px;
  left: -40px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.25) 0%, transparent 70%);
  pointer-events: none;
}

.app-card-title {
  font-size: 26px;
  font-weight: 800;
  color: #fff;
  margin-top: 10px;
  line-height: 1.3;
}

.app-card-desc {
  color: #cbd5e1;
  font-size: 14px;
  margin: 12px 0 20px;
}

.app-features-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 24px;
}

.feature-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  color: #e2e8f0;
}

.feature-pill svg {
  color: var(--gold-primary);
  flex-shrink: 0;
}

.btn-big-download {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: var(--gold-gradient);
  color: var(--text-dark);
  font-size: 16px;
  font-weight: 800;
  padding: 14px 24px;
  border-radius: var(--radius-md);
  box-shadow: 0 8px 25px rgba(245, 158, 11, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-big-download:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(245, 158, 11, 0.6);
}

.download-meta {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 8px;
}

/* ==========================================================================
   Ads / Helpline Banners
   ========================================================================== */
.modern-ad-box {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: var(--radius-md);
  padding: 18px 24px;
  margin-bottom: 28px;
  position: relative;
  box-shadow: var(--shadow-card);
  text-align: center;
}

.ad-tag-badge {
  position: absolute;
  top: 10px;
  right: 12px;
  background: rgba(245, 158, 11, 0.2);
  color: var(--gold-light);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
}

.ad-heading {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}

.ad-contact-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.btn-ad-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 700;
  transition: all 0.2s;
}

.btn-ad-call {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-ad-call:hover {
  background: rgba(255, 255, 255, 0.2);
}

.btn-ad-wa {
  background: #25d366;
  color: #fff;
}

.btn-ad-wa:hover {
  background: #1ebc59;
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
}

/* ==========================================================================
   Results Grid Section
   ========================================================================== */
.section-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
}

.section-title-wrap h2 {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title-wrap p {
  font-size: 13px;
  color: var(--text-muted);
}

.controls-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.search-input-box {
  position: relative;
  min-width: 220px;
}

.search-input-box input {
  width: 100%;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 8px 14px 8px 36px;
  border-radius: var(--radius-full);
  color: #fff;
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s;
}

.search-input-box input:focus {
  border-color: var(--gold-primary);
}

.search-input-box svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.tab-toggle-group {
  display: flex;
  background: rgba(15, 23, 42, 0.85);
  padding: 4px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 700;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s;
}

.tab-btn.active {
  background: var(--gold-gradient);
  color: var(--text-dark);
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.3);
}

/* Results Grid */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
  margin-bottom: 36px;
}

.game-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 18px;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.game-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-card-hover);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
}

.game-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.game-card-name {
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.game-card-time {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 3px;
}

.game-card-center {
  text-align: center;
  margin: 12px 0;
}

.declared-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 76px;
  height: 76px;
  background: linear-gradient(145deg, #1e293b, #0f172a);
  border: 2px solid var(--gold-primary);
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.35);
  border-radius: 50%;
}

.declared-badge span {
  font-size: 34px;
  font-weight: 900;
  color: var(--gold-light);
  line-height: 1;
}

.pending-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-full);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
}

.pending-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold-primary);
  animation: pulse-dot 1.5s infinite;
}

.game-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 12px;
  margin-top: 8px;
}

.btn-chart-link {
  font-size: 12px;
  font-weight: 700;
  color: var(--gold-primary);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-chart-link:hover {
  color: var(--gold-light);
  text-decoration: underline;
}

/* ==========================================================================
   Monthly Chart Explorer
   ========================================================================== */
.chart-section {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-card);
  margin-bottom: 36px;
}

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

.chart-filter-form {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-select {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  outline: none;
}

.filter-select option {
  background: #0f172a;
  color: #fff;
}

.btn-filter-go {
  background: var(--gold-gradient);
  color: var(--text-dark);
  font-weight: 700;
  font-size: 13px;
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
}

/* Chart Responsive Table */
.chart-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(10, 14, 23, 0.6);
}

.modern-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 14px;
}

.modern-table th {
  background: #111827;
  color: var(--gold-light);
  font-weight: 800;
  padding: 12px 14px;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  white-space: nowrap;
  letter-spacing: 0.5px;
}

.modern-table td {
  padding: 10px 14px;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: #cbd5e1;
  font-weight: 600;
}

.modern-table tr:hover td {
  background: rgba(245, 158, 11, 0.08);
}

.modern-table td.date-col,
.modern-table th.date-col {
  position: sticky;
  left: 0;
  background: #0f172a;
  font-weight: 700;
  color: #94a3b8;
  z-index: 1;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.modern-table td.num-cell {
  font-family: monospace, sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
}

.modern-table td.num-cell.active-num {
  color: var(--gold-primary);
  font-weight: 800;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.modern-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(7, 10, 18, 0.95);
  padding: 36px 20px 24px;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}

.footer-content {
  max-width: 800px;
  margin: 0 auto;
}

.footer-brand {
  font-size: 20px;
  font-weight: 800;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 8px;
}

.footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin: 16px 0;
  flex-wrap: wrap;
}

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

/* ==========================================================================
   Mobile Sticky Bottom Action Bar
   ========================================================================== */
.mobile-sticky-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 999;
  background: rgba(10, 14, 23, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 10px 16px;
}

@media (max-width: 768px) {
  .mobile-sticky-bar {
    display: flex;
    gap: 10px;
  }
  
  .live-clock-pill {
    display: none;
  }
  
  .brand-name {
    font-size: 20px;
  }
}

.mobile-bar-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.mobile-bar-download {
  background: var(--gold-gradient);
  color: var(--text-dark);
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
}

.mobile-bar-wa {
  background: #25d366;
  color: #fff;
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
}

/* Accessibility: Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .ticker-track {
    animation: none;
  }
}
