/* assets/css/style.css */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800&family=Roboto:wght@400;700&display=swap');

:root {
  --bg-color: #0c1015;
  /* Obsidian */
  --card-bg: #161b22;
  --text-main: #e6edf3;
  --text-muted: #8b949e;
  --primary: #2ea043;
  /* Stable Emerald */
  --accent: #238636;
  --error: #f85149;
  --warning: #d29922;
  --border-radius: 2px;
  /* Sharp corners for Pro feel */
  --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  /* Prevent horizontal scroll */
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Header */
header {
  padding: 2rem 0;
  text-align: center;
}

.massive-title {
  font-size: clamp(3rem, 10vw, 6rem);
  font-weight: 800;
  text-transform: uppercase;
  background: linear-gradient(135deg, var(--primary), #3b82f6);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
  margin-bottom: 0.5rem;
}

/* Prize Section & Carousel */
.prize-container {
  margin-bottom: 3rem;
  background: var(--card-bg);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.05);
  position: relative;
}

.prize-carousel {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #000;
}

.carousel-track {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-slide {
  min-width: 100%;
  aspect-ratio: 16/9;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(16, 185, 129, 0.2);
  color: white;
  border: none;
  padding: 1.5rem 0.8rem;
  cursor: pointer;
  z-index: 10;
  font-weight: 800;
  backdrop-filter: blur(5px);
  transition: var(--transition);
}

.carousel-btn:hover {
  background: var(--primary);
  color: #000;
}

.carousel-btn.prev {
  left: 0;
  border-radius: 0 4px 4px 0;
}

.carousel-btn.next {
  right: 0;
  border-radius: 4px 0 0 4px;
}

.carousel-indicators {
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.6rem;
  z-index: 10;
}

.indicator {
  width: 10px;
  height: 3px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
  cursor: pointer;
  transition: var(--transition);
}

.indicator.active {
  background: var(--primary);
  width: 20px;
}

.prize-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.5rem 2rem;
  background: linear-gradient(transparent, rgba(15, 23, 42, 0.95));
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  pointer-events: none;
}

.floating-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: var(--primary);
  color: #0a0f1e;
  padding: 0.3rem 0.8rem;
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
  border-radius: 4px;
  z-index: 20;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  letter-spacing: 1px;
}

.placeholder-container {
  text-align: center;
  padding: 4rem 2rem;
  background: var(--card-bg);
  border-radius: 8px;
  border: 1px dashed rgba(255, 255, 255, 0.1);
}

.placeholder-img {
  width: 100%;
  max-width: 400px;
  opacity: 0.5;
  margin-bottom: 2rem;
  filter: grayscale(1);
}

.prize-details {
  padding: 2rem;
}

.prize-details h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--primary);
}

.prize-details p {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.6;
}

/* Simple Lightbox */
#lightbox {
  position: fixed;
  z-index: 200;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

#lightbox.active {
  opacity: 1;
  pointer-events: auto;
}

#lightbox img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 4px;
}

/* Raffle Grid */
.raffle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
  gap: 0.75rem;
  margin-top: 2rem;
  padding-bottom: 5rem;
}

.number-card {
  aspect-ratio: 1;
  background-color: var(--card-bg);
  border: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  user-select: none;
}

.number-card:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
  z-index: 10;
}

.number-card.available {
  border-bottom: 3px solid var(--primary);
  color: var(--primary);
}

.number-card.reserved {
  border-bottom: 3px solid var(--warning);
  color: var(--warning);
  opacity: 0.8;
}

.number-card.paid {
  border-bottom: 3px solid var(--error);
  color: var(--error);
  cursor: not-allowed;
}

.number-card.selected {
  background: var(--primary);
  color: #0a0f1e;
  border-bottom: 3px solid #0a0f1e;
  transform: scale(1.05);
  box-shadow: 0 0 15px var(--primary);
}

/* Modal Styling */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: var(--card-bg);
  width: 100%;
  max-width: 500px;
  padding: 2.5rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* Frontend Pro Modals */
.modal-content.pro {
  background: var(--card-bg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.8);
  max-width: 450px;
  padding: 3rem 2rem;
  border-radius: 4px;
  position: relative;
}

.modal-content.pro h2 {
  font-size: 1.5rem;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  color: white;
  letter-spacing: -0.02em;
}

.modal-content.pro p {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 2rem;
}

.pro-form-group {
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
}

.pro-form-group label {
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.5rem;
}

.pro-form-input {
  background: #0d1117;
  border: 1px solid #30363d;
  padding: 0.9rem 1rem;
  color: white;
  font-size: 0.9rem;
  border-radius: 4px;
  transition: var(--transition);
  width: 100%;
}

.pro-form-input:focus {
  border-color: var(--primary);
  background: #161b22;
  box-shadow: 0 0 0 3px rgba(46, 160, 67, 0.1);
  outline: none;
}

.timer-box {
  background: rgba(210, 153, 34, 0.1);
  border: 1px solid rgba(210, 153, 34, 0.2);
  padding: 0.8rem;
  border-radius: 4px;
  color: var(--warning);
  font-weight: 700;
  margin-bottom: 1.5rem;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.timer-box i {
  font-style: normal;
  background: var(--warning);
  color: black;
  padding: 2px 4px;
  border-radius: 2px;
  font-family: monospace;
}

/* Floating Checkout Bar - Premium Redesign */
.checkout-bar {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(150%);
  width: calc(100% - 2rem);
  max-width: 600px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(20px) saturate(180%);
  padding: 1.25rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 100px;
  /* Pill shape */
  z-index: 90;
  transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), 0 0 20px rgba(16, 185, 129, 0.1);
}

.checkout-bar.active {
  transform: translateX(-50%) translateY(0);
}

.checkout-bar p {
  color: var(--text-muted);
  margin: 0;
}

.checkout-bar span,
.checkout-bar #total-price {
  color: #fff;
}

#selected-count {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--primary) !important;
  line-height: 1;
}

.btn-checkout {
  background: var(--primary);
  color: #0a0f1e;
  border: none;
  padding: 1rem 2.5rem;
  font-weight: 900;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 100px;
  font-size: 0.9rem;
  letter-spacing: 1px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 10px 20px rgba(16, 185, 129, 0.3);
}

.btn-checkout:hover {
  transform: scale(1.05) translateY(-2px);
  box-shadow: 0 15px 30px rgba(16, 185, 129, 0.5);
  filter: brightness(1.1);
}

.btn-checkout:active {
  transform: scale(0.98);
}

.checkout-info p {
  margin: 0;
  line-height: 1.2;
}

#selected-count {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--primary);
  display: block;
}

.btn-checkout {
  background: var(--primary);
  color: #0a0f1e;
  border: none;
  padding: 1rem 2.5rem;
  font-weight: 900;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 100px;
  font-size: 0.9rem;
  letter-spacing: 1px;
  transition: all 0.3s ease;
  box-shadow: 0 8px 15px rgba(16, 185, 129, 0.3);
}

.btn-checkout:hover {
  transform: scale(1.05);
  box-shadow: 0 12px 20px rgba(16, 185, 129, 0.5);
  filter: brightness(1.1);
}

/* Live Stream Indicator */
.live-indicator {
  animation: fadeIn 0.5s ease;
}

.live-pulse {
  width: 12px;
  height: 12px;
  background: #ef4444;
  border-radius: 50%;
  position: relative;
}

.live-pulse::after {
  content: '';
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  border: 2px solid #ef4444;
  border-radius: 50%;
  animation: livePulse 1.5s infinite;
}

@keyframes livePulse {
  0% {
    transform: scale(0.8);
    opacity: 1;
  }

  100% {
    transform: scale(2.5);
    opacity: 0;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Admin Pro Design System */
.admin-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
  background: var(--bg-color);
}

.admin-sidebar {
  background: #0d1117;
  border-right: 1px solid #30363d;
  padding: 2.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: sticky;
  top: 0;
}

.sidebar-logo {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 3rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.sidebar-logo::before {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--primary);
  border-radius: 1px;
  box-shadow: 0 0 10px var(--primary);
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  padding: 0.8rem 1rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: var(--border-radius);
  margin-bottom: 0.4rem;
  transition: var(--transition);
  border: 1px solid transparent;
}

.sidebar-nav a:hover {
  background: rgba(255, 255, 255, 0.03);
  color: white;
}

.sidebar-nav a.active {
  background: rgba(46, 160, 67, 0.1);
  color: var(--primary);
  border-color: rgba(46, 160, 67, 0.2);
}

.admin-main {
  padding: 3rem;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
}

.admin-header h1 {
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: white;
}

.pro-card {
  background: var(--card-bg);
  border: 1px solid #30363d;
  border-radius: var(--border-radius);
  padding: 2rem;
  position: relative;
  overflow: hidden;
}

.pro-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.stat-box {
  background: #161b22;
  border: 1px solid #30363d;
  padding: 1.5rem;
  border-radius: var(--border-radius);
}

.stat-box small {
  display: block;
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.5rem;
}

.stat-box .val {
  font-size: 1.6rem;
  font-weight: 800;
  color: white;
}

.stat-box .trend {
  font-size: 0.75rem;
  margin-top: 0.5rem;
  color: var(--primary);
}

.pro-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 0.5rem;
}

.pro-table th {
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 1rem;
  border-bottom: 1px solid #30363d;
}

.pro-table td {
  background: #161b22;
  padding: 1.2rem 1rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.pro-table tr td:first-child {
  border-radius: 4px 0 0 4px;
  border-left: 1px solid #30363d;
}

.pro-table tr td:last-child {
  border-radius: 0 4px 4px 0;
  border-right: 1px solid #30363d;
}

.pro-table tr td {
  border-top: 1px solid #30363d;
  border-bottom: 1px solid #30363d;
}

.pro-input-group label {
  display: block;
  margin-bottom: 0.6rem;
  font-size: 0.75rem;
  font-weight: 800;
  color: #8b949e;
  text-transform: uppercase;
}

.pro-input {
  width: 100%;
  background: #0d1117;
  border: 1px solid #30363d;
  padding: 0.8rem 1rem;
  color: white;
  font-size: 0.9rem;
  border-radius: 4px;
  transition: var(--transition);
}

.pro-input:focus {
  border-color: var(--primary);
  background: #161b22;
  box-shadow: 0 0 0 3px rgba(46, 160, 67, 0.1);
  outline: none;
}

.btn-pro {
  background: var(--primary);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.8rem 1.5rem;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  border-radius: 4px;
  transition: var(--transition);
}

.btn-pro:hover {
  background: var(--accent);
  transform: translateY(-1px);
}

.btn-pro.danger {
  background: transparent;
  border-color: #f85149;
  color: #f85149;
}

.btn-pro.danger:hover {
  background: #f85149;
  color: white;
}

/* Responsive Pro Admin */
@media (max-width: 1024px) {
  .admin-layout {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    height: auto;
    position: relative;
    border-right: none;
    border-bottom: 1px solid #30363d;
  }

  .sidebar-nav {
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 1rem;
  }

  .sidebar-nav a {
    white-space: nowrap;
    margin-bottom: 0;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .raffle-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 0.5rem;
  }

  .modal-content {
    padding: 1.5rem;
  }

  .prize-container {
    max-height: 400px;
  }
}