/* Master CSS for Punjab State Lottery Portal */
:root {
  --brand-red: #e32636;
  --brand-red-dark: #b91c1c;
  --brand-red-light: #ff4d5a;
  --brand-red-gradient: linear-gradient(135deg, #f03a47 0%, #d81b2a 50%, #b3101e 100%);
  --brand-crimson-deep: #7f1d1d;
  --gold-primary: #f59e0b;
  --gold-secondary: #d97706;
  --gold-gradient: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #d97706 100%);
  --punjabi-green: #16a34a;
  --punjabi-green-light: #22c55e;
  --bg-page: #fdfbf7;
  --card-bg: #ffffff;
  --card-border: #f1e4db;
  --surface-light: #fbf5ef;
  --input-bg: #ffffff;
  --border-subtle: #e2e8f0;
  --text-white: #ffffff;
  --text-main: #334155;
  --text-muted: #64748b;
  --text-dark: #0f172a;
  --font-heading: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
  --border-radius-lg: 16px;
  --border-radius-md: 10px;
  --border-radius-sm: 6px;
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px rgba(185, 28, 28, 0.08);
  --shadow-lg: 0 10px 25px -5px rgba(185, 28, 28, 0.12), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
  --transition: all 0.22s ease-in-out;
}

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

html, body {
  font-family: var(--font-body);
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  outline: none;
  transition: var(--transition);
}

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

input, textarea, select {
  font-family: inherit;
  font-size: 1rem;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

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

/* Demo Notice Banner */
.demo-banner {
  background: #fffbeb;
  border-bottom: 1px solid #fef3c7;
  color: #92400e;
  font-size: 0.85rem;
  padding: 6px 12px;
  text-align: center;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* Header & Sticky Top Bar */
.top-notice-strip {
  background: var(--brand-crimson-deep);
  color: #fed7aa;
  font-size: 0.82rem;
  padding: 8px 0;
  text-align: center;
  font-weight: 500;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #ffffff;
  border-bottom: 2px solid #f1e4db;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

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

.header-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-logo img {
  height: 48px;
  width: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-links a {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-dark);
  padding: 6px 0;
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--brand-red);
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--brand-red-gradient);
  border-radius: 2px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.btn-helpline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-light);
  color: var(--brand-red-dark);
  border: 1.5px solid #fecaca;
  padding: 8px 16px;
  border-radius: 30px;
  font-size: 0.88rem;
  font-weight: 700;
}

.btn-book-nav {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--brand-red-gradient);
  color: #ffffff;
  padding: 9px 20px;
  border-radius: 30px;
  font-size: 0.9rem;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(227, 38, 54, 0.3);
}

.hamburger-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 8px;
  border-radius: 8px;
  background: var(--surface-light);
  border: 1px solid var(--card-border);
}

.hamburger-bar {
  display: block;
  width: 100%;
  height: 2.5px;
  background: var(--brand-red-dark);
  border-radius: 2px;
}

/* Mobile Drawer */
.mobile-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.mobile-drawer-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-drawer {
  position: fixed;
  top: 0;
  right: -320px;
  width: 300px;
  height: 100%;
  background: #ffffff;
  z-index: 2000;
  padding: 24px;
  display: flex;
  flex-direction: column;
  box-shadow: -5px 0 25px rgba(0, 0, 0, 0.15);
  transition: right 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
}

.mobile-drawer.open {
  right: 0;
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 20px;
}

.drawer-nav {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.drawer-nav a {
  display: flex;
  align-items: center;
  padding: 12px 14px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-dark);
  background: #f8fafc;
}

.drawer-nav a.active {
  background: #fee2e2;
  color: var(--brand-red-dark);
}

/* Badges */
.badge-gold {
  background: var(--gold-gradient);
  color: #78350f;
  font-weight: 800;
  font-size: 0.75rem;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 20px;
}

.badge-guaranteed {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
  font-weight: 700;
  font-size: 0.78rem;
  padding: 4px 10px;
  border-radius: 20px;
}

.badge-bumper {
  background: var(--brand-red-gradient);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.75rem;
  padding: 4px 12px;
  border-radius: 20px;
  text-transform: uppercase;
}

/* Cards */
.lottery-card {
  background: #ffffff;
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.lottery-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: #fca5a5;
}

/* Live Draw Countdown Banner */
.countdown-strip {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  color: #ffffff;
  padding: 16px 20px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin: 20px 0;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.countdown-boxes {
  display: flex;
  align-items: center;
  gap: 10px;
}

.countdown-box {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 6px 12px;
  text-align: center;
  min-width: 58px;
}

.countdown-box .num {
  font-size: 1.35rem;
  font-weight: 800;
  color: #fbbf24;
  line-height: 1.1;
  display: block;
}

.countdown-box .label {
  font-size: 0.65rem;
  text-transform: uppercase;
  color: #94a3b8;
  letter-spacing: 0.5px;
}

/* ========================================================
   TICKET PILL SELECTION & STATES (Phase 1 C & Phase 4)
   ======================================================== */
.lucky-pills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(135px, 1fr));
  gap: 12px;
  max-height: 460px;
  overflow-y: auto;
  padding: 4px;
}

.lucky-ticket-pill {
  position: relative;
  padding: 12px 10px;
  border-radius: 12px;
  border: 1.5px solid #e2e8f0;
  background-color: #ffffff;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  cursor: pointer;
  transition: all 0.18s ease;
  user-select: none;
}

.lucky-ticket-pill:hover:not(.pill-sold):not(.pill-hold) {
  border-color: #b91c1c;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(185, 28, 28, 0.12);
}

.lucky-ticket-pill.is-selected {
  border: 2px solid #b91c1c;
  background-color: #fee2e2;
  box-shadow: 0 4px 12px rgba(185, 28, 28, 0.22);
}

.lucky-ticket-pill.pill-sold {
  background-color: #f1f5f9;
  border-color: #cbd5e1;
  opacity: 0.65;
  cursor: not-allowed;
}

.lucky-ticket-pill.pill-sold .pill-num {
  text-decoration: line-through;
  color: #94a3b8;
}

.pill-sold-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  background: #64748b;
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

/* On-Hold Ticket Pill (Pending Payment / Temporary Reservation) */
.lucky-ticket-pill.pill-hold {
  background-color: #fffbeb;
  border-color: #f59e0b;
  opacity: 0.88;
  cursor: not-allowed;
}

.lucky-ticket-pill.pill-hold .pill-num {
  color: #92400e;
}

.pill-hold-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  background: #d97706;
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.pill-series {
  font-size: 0.72rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  margin-bottom: 2px;
}

.pill-num {
  font-size: 1.25rem;
  font-weight: 900;
  font-family: monospace;
  letter-spacing: 1px;
  color: #0f172a;
}

.pill-price {
  font-size: 0.75rem;
  font-weight: 700;
  color: #d97706;
  margin-top: 2px;
}

.pill-check-indicator {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #b91c1c;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 900;
  box-shadow: 0 2px 6px rgba(185, 28, 28, 0.3);
}

/* Sticky Bottom Selection Dock */
.selection-dock {
  position: sticky;
  bottom: 0;
  z-index: 900;
  background-color: #ffffff;
  border-top: 2px solid #f1e4db;
  box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.08);
  padding: 16px 0;
}

/* ========================================================
   CONGRATULATIONS / OFFER UNLOCK POPUP (Phase 1 B & Phase 4)
   ======================================================== */
.offer-pop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(4px);
  z-index: 3000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.offer-pop.is-open {
  display: flex;
  animation: popIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes popIn {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

.offer-pop-card {
  background: #ffffff;
  border-radius: 20px;
  width: 100%;
  max-width: 440px;
  padding: 32px 28px;
  position: relative;
  text-align: center;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  border: 3px solid #fbbf24;
}

.offer-pop-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f1f5f9;
  color: #64748b;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.offer-pop-diya {
  font-size: 3rem;
  margin-bottom: 8px;
}

.offer-pop-badge {
  background: var(--gold-gradient);
  color: #78350f;
  font-weight: 900;
  font-size: 0.8rem;
  text-transform: uppercase;
  padding: 4px 14px;
  border-radius: 20px;
  display: inline-block;
  margin-bottom: 12px;
}

.offer-pop-title {
  font-size: 1.5rem;
  font-weight: 900;
  color: #0f172a;
  line-height: 1.25;
  margin-bottom: 8px;
}

.offer-pop-desc {
  font-size: 0.95rem;
  color: #475569;
  margin-bottom: 20px;
}

.offer-savings-callout {
  background: #fef3c7;
  border: 1.5px dashed #f59e0b;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 20px;
}

.offer-savings-amount {
  font-size: 1.6rem;
  font-weight: 900;
  color: #b91c1c;
}

/* ========================================================
   LIVE REAL-TIME BUYER ACTIVITY TOAST (Phase 1 D & Phase 8)
   ======================================================== */
.live-booking-toast {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 1500;
  background: #ffffff;
  border: 1.5px solid #bbf7d0;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15);
  border-radius: 12px;
  padding: 12px 16px;
  display: none;
  align-items: center;
  gap: 12px;
  max-width: 380px;
  transform: translateY(20px);
  opacity: 0;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.live-booking-toast.toast-active {
  display: flex;
  transform: translateY(0);
  opacity: 1;
}

.toast-avatar-box {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #dcfce7;
  color: #16a34a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  flex-shrink: 0;
}

.toast-text-box {
  font-size: 0.85rem;
  color: #0f172a;
  line-height: 1.35;
}

.toast-live-pill {
  font-size: 0.68rem;
  background: #fee2e2;
  color: #991b1b;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}

/* Footer Styling */
.site-footer {
  background: #111827;
  color: #9ca3af;
  padding-top: 50px;
  border-top: 4px solid var(--brand-red);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 36px;
  padding-bottom: 40px;
}

.footer-col h4 {
  color: #f3f4f6;
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 18px;
}

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

.footer-links a {
  color: #9ca3af;
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: #fbbf24;
  padding-left: 4px;
}

.footer-bottom {
  border-top: 1px solid #1f2937;
  padding: 24px 0;
  text-align: center;
  font-size: 0.85rem;
  color: #6b7280;
}

@media (max-width: 992px) {
  .nav-links, .btn-helpline {
    display: none;
  }
  .hamburger-btn {
    display: flex;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
  }
}

@media (max-width: 640px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .countdown-strip {
    flex-direction: column;
    text-align: center;
  }
  .countdown-boxes {
    justify-content: center;
  }
  .live-booking-toast {
    left: 16px;
    right: 16px;
    bottom: 84px;
    max-width: none;
  }
}
