@import url("https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Montserrat:wght@300;400;500;600;700;800;900&family=Unbounded:wght@400;700;900&display=swap");

:root {
  --bg-main: #010409;
  --bg-secondary: #0d1117;
  --accent: #fbbf24;
  --accent-dim: rgba(251, 191, 36, 0.12);
  --accent-glow: rgba(251, 191, 36, 0.35);
  --text-main: #f0f6fc;
  --text-muted: #8b949e;
  --border-color: rgba(251, 191, 36, 0.2);
  --success: #238636;
  --font-main: "Montserrat", sans-serif;
  --font-brand: "Bebas Neue", sans-serif;
  --font-display: "Unbounded", cursive;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-main);
  color: var(--text-main);
  max-width: 500px; /* Slightly wider for better desktop view while keeping mobile feel */
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
  font-weight: 400;
}

/* Stunning Dynamic Background */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(
      circle at 50% 10%,
      rgba(251, 191, 36, 0.08) 0%,
      transparent 60%
    ),
    radial-gradient(
      circle at 10% 90%,
      rgba(59, 130, 246, 0.05) 0%,
      transparent 40%
    ),
    radial-gradient(
      circle at 90% 90%,
      rgba(30, 64, 175, 0.1) 0%,
      transparent 40%
    ),
    var(--bg-main);
  z-index: -3;
  animation: bgPulse 8s ease-in-out infinite alternate;
}

@keyframes bgPulse {
  0% {
    filter: brightness(1);
  }
  100% {
    filter: brightness(1.2) saturate(1.1);
  }
}

.bg-lines {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
}

/* Layer 1: Fast Shifting Dot Grid */
.bg-lines::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(
    rgba(251, 191, 36, 0.25) 1px,
    transparent 1px
  );
  background-size: 32px 32px;
  mask-image: radial-gradient(circle at center, black 30%, transparent 95%);
  animation: gridShift 15s linear infinite;
  opacity: 0.5;
}

/* Layer 2: Fast-Paced Glowing Particles */
.line-shape {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1.5px 1.5px at 10% 20%, #fff, transparent),
    radial-gradient(2px 2px at 30% 50%, var(--accent), transparent),
    radial-gradient(1.5px 1.5px at 50% 30%, #fff, transparent),
    radial-gradient(2px 2px at 70% 80%, var(--accent), transparent),
    radial-gradient(1.5px 1.5px at 90% 10%, #fff, transparent);
  background-size: 400px 400px;
  animation: particleFlow 12s linear infinite;
}

@keyframes gridShift {
  from {
    background-position: 0 0;
  }
  to {
    background-position: 32px 64px;
  }
}

@keyframes particleFlow {
  from {
    background-position: 0 0;
  }
  to {
    background-position: 400px 800px;
  }
}

/* Premium Glass Header */
.app-header {
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  background: rgba(13, 17, 23, 0.7);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1000;
}

/* ===================== NAVBAR ===================== */
.gj-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  transition:
    background 0.35s ease,
    box-shadow 0.35s ease;
}

/* Top row: logo + brand name */
.gj-nav-top {
  background: #0a0d14;
  padding: 14px 16px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-bottom: 1px solid rgba(251, 191, 36, 0.1);
}

/* Bottom row: nav links */
.gj-nav-bottom {
  background: #060810;
  padding: 8px 16px;
  display: flex;
  justify-content: center;
  border-bottom: 2px solid rgba(251, 191, 36, 0.15);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

/* Brand anchor */
.gj-brand {
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transition: opacity 0.3s ease;
}
.gj-brand:hover {
  opacity: 0.85;
}

/* Logo image */
.gj-logo {
  height: 50px;
  width: auto;
  filter: drop-shadow(0 0 8px rgba(251, 191, 36, 0.4));
  transition: transform 0.3s ease;
}
.gj-brand:hover .gj-logo {
  transform: scale(1.07);
}

/* Brand text */
.gj-brand-text {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.15rem;
  letter-spacing: 3px;
  background: linear-gradient(180deg, #fff 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Nav link list */
.gj-nav-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

/* Individual nav link */
.gj-link {
  display: inline-block;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.55);
  font-family: var(--font-main);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 1px;
  padding: 6px 16px;
  border-radius: 20px;
  border: 1px solid transparent;
  transition: all 0.25s ease;
}

.gj-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.07);
}

.gj-link.active {
  color: var(--accent);
  background: rgba(251, 191, 36, 0.1);
  border-color: rgba(251, 191, 36, 0.35);
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.2);
}

/* ===================== BRAND LOGO (old header) ===================== */
.brand-logo {
  font-family: var(--font-brand);
  font-size: 1.6rem;
  letter-spacing: 1.5px;
  background: linear-gradient(to bottom, #fffbb5 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Content Area */
.app-content {
  flex: 1;
  padding: 24px 16px 24px;
}

/* Glassy Premium Cards - High Visibility */
.card-premium {
  background: linear-gradient(
    165deg,
    rgba(22, 28, 38, 0.9) 0%,
    rgba(13, 17, 23, 0.95) 100%
  );
  backdrop-filter: blur(20px);
  border-radius: 20px;
  padding: 20px 16px;
  margin-bottom: 16px;
  border: 1px solid rgba(251, 191, 36, 0.2);
  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.5),
    inset 0 1px 1px rgba(255, 255, 255, 0.05);
  position: relative;
  overflow: hidden;
}

/* Suble Card Shimmer */
.card-premium::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(251, 191, 36, 0.05),
    transparent
  );
  transform: skewX(-15deg);
  animation: cardShimmer 5s infinite cubic-bezier(0.1, 0, 0.1, 1);
  pointer-events: none;
}

@keyframes cardShimmer {
  0% {
    left: -100%;
  }
  25% {
    left: 100%;
  }
  100% {
    left: 100%;
  }
}

.card-title {
  font-family: var(--font-brand);
  font-size: 0.95rem;
  color: var(--accent);
  letter-spacing: 1.5px;
  margin-bottom: 0px; /* Reset margin for flex headers */
  display: flex;
  align-items: center;
  gap: 10px;
}

.draw-number-badge {
  font-size: 0.78rem;
  color: var(--accent);
  opacity: 0.9;
  font-weight: 700;
  letter-spacing: 1.2px;
  background: rgba(251, 191, 36, 0.1);
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid rgba(251, 191, 36, 0.2);
}

/* Card Header Container for spacing */
.card-premium-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

/* Compact Status Bar - Premium Pill Style */
.compact-card {
  padding: 12px 20px !important;
  border-radius: 50px !important;
  margin-bottom: 25px !important;
  background: rgba(13, 17, 23, 0.9) !important;
  border: 1px solid rgba(251, 191, 36, 0.3) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8) !important;
}

.status-bar {
  display: flex;
  justify-content: space-around;
  align-items: center;
  font-family: var(--font-main);
  width: 100%;
}

.status-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.status-item .label {
  font-size: 0.75rem;
  font-weight: 800;
  color: #8b949e;
  letter-spacing: 1.5px;
}

.status-item .value {
  font-family: "JetBrains Mono", monospace;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.status-item .value.accent {
  color: var(--accent);
  font-family: var(--font-brand);
  font-size: 1.3rem;
  letter-spacing: 1.2px;
}

/* Iconic Timeline Numbers */
.timer-nums {
  font-family: var(--font-brand);
  font-size: 3.2rem;
  text-align: center;
  color: #fff;
  letter-spacing: 2px;
  margin: 4px 0;
  background: linear-gradient(to bottom, #fff 40%, #c1c1c1 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.15));
  line-height: 1;
}

.next-time-label {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

.next-time-label span {
  color: var(--accent);
  text-shadow: 0 0 12px var(--accent-glow);
}

/* Result List Polishing */
.result-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
  border-bottom: 1px solid rgba(251, 191, 36, 0.1);
}

.result-item:last-child {
  border-bottom: none;
}

.result-time {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.5px;
}

.result-numbers {
  display: flex;
  gap: 10px;
}

.num-circle {
  font-family: var(--font-brand);
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: #fff;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.draw-revealed .num-circle {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 20px rgba(251, 191, 36, 0.35);
  transform: scale(1.1);
}

/* Bottom Nav Removed - Integrated into Top Nav per request */

/* Advanced Micro-Animations */
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-up {
  animation: slideUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.stagger-1 {
  animation-delay: 0.1s;
}
.stagger-2 {
  animation-delay: 0.2s;
}

.live-dot {
  width: 12px;
  height: 12px;
  background: #238636;
  border-radius: 50%;
  box-shadow: 0 0 15px #238636;
  position: relative;
}

.live-dot::after {
  content: "";
  position: absolute;
  inset: -6px;
  border: 1.5px solid var(--success);
  border-radius: 50%;
  animation: pulseLive 2s infinite ease-out;
}

@keyframes pulseLive {
  0% {
    transform: scale(0.5);
    opacity: 1;
  }
  100% {
    transform: scale(2);
    opacity: 0;
  }
}

/* Mobile Perfection */
@media (max-width: 380px) {
  .timer-nums {
    font-size: 3.8rem;
  }
  .num-circle {
    width: 34px;
    height: 34px;
    font-size: 1.1rem;
  }
  .brand-logo {
    font-size: 1.3rem;
  }
  .bottom-nav {
    height: 68px;
    bottom: 16px;
    border-radius: 20px;
  }
}

@media (max-width: 320px) {
  .app-content {
    padding: 16px 10px;
  }
  .card-premium {
    padding: 24px 12px;
  }
  .timer-nums {
    font-size: 2.8rem;
  }
  .num-circle {
    width: 28px;
    height: 28px;
    font-size: 0.9rem;
    border-radius: 8px;
  }
  .result-time {
    font-size: 0.85rem;
  }
}
/* Fix: date input group on very small screens */
.date-input-group {
    background: #fff;
    border: 1px solid #d1df0eff;
    border-radius: 12px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;          /* ← allows wrapping */
    margin-bottom: 20px;
}

.date-input-group input {
    background: transparent;
    border: none;
    color: #495057;
    flex: 1 1 100px;          /* ← grows but won't shrink below 100px */
    min-width: 90px;
    outline: none;
    font-weight: 600;
}

.date-input-group button {
    background: var(--accent);
    border: none;
    border-radius: 8px;
    padding: 8px 15px;
    color: var(--primary-bg);
    font-weight: 700;
    font-size: 0.8rem;
    flex-shrink: 0;           /* ← button never shrinks */
    white-space: nowrap;
}

