/* jackpot.css */

/* ---------- Base ---------- */

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: radial-gradient(circle at top, #130024, #040008 60%);
  color: #f7f7ff;
  min-height: 100vh;
}

/* Subtle animated glow behind the content */
.jackpot-root {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 16px 40px;
  position: relative;
  z-index: 1;
}

.jackpot-root::before {
  content: '';
  position: fixed;
  inset: auto;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 43, 240, 0.17), transparent 60%);
  filter: blur(4px);
  opacity: 0.8;
  pointer-events: none;
  top: 8%;
  left: 50%;
  transform: translateX(-50%);
  animation: glowFloat 16s ease-in-out infinite alternate;
  z-index: -1;
}

/* ---------- Header ---------- */

.jackpot-header {
  text-align: center;
  margin-bottom: 24px;
}

.jackpot-hero-img {
  width: 240px;
  max-width: 70%;
  display: block;
  margin: 0 auto 8px;
  filter: drop-shadow(0 0 16px rgba(255, 255, 255, 0.15));
  animation: logoFloat 10s ease-in-out infinite alternate;
}

.jackpot-header h1 {
  letter-spacing: 0.16em;
  font-size: 1.35rem;
  margin: 0;
  text-transform: uppercase;
}

.jackpot-header p {
  margin: 6px 0 0;
  color: #c7c4ff;
  font-size: 0.95rem;
  opacity: 0.9;
}

/* ---------- Layout ---------- */

.jackpot-main {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.1fr);
  gap: 20px;
}

/* ---------- Cards ---------- */

.jackpot-pot-card,
.jackpot-entry-card,
.jackpot-rules-card,
.jackpot-winners-card {
  background: radial-gradient(circle at top left, rgba(119, 51, 255, 0.22), rgba(8, 0, 24, 0.96));
  border-radius: 18px;
  padding: 16px 18px;
  box-shadow: 0 0 24px rgba(187, 0, 255, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(10px);
  transition:
    transform 0.18s ease-out,
    box-shadow 0.18s ease-out,
    border-color 0.18s ease-out,
    background 0.18s ease-out;
}

.jackpot-pot-card:hover,
.jackpot-entry-card:hover,
.jackpot-rules-card:hover,
.jackpot-winners-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 32px rgba(187, 0, 255, 0.55);
  border-color: rgba(255, 255, 255, 0.12);
}

.jackpot-pot-card h2,
.jackpot-entry-card h2,
.jackpot-winners-card h2 {
  margin-top: 0;
  margin-bottom: 8px;
  font-size: 1.1rem;
  letter-spacing: 0.04em;
}

/* ---------- Pot ---------- */

.pot-amount {
  font-size: 1.5rem;
  margin: 4px 0 8px;
  font-weight: 600;
  text-shadow: 0 0 12px rgba(55, 210, 255, 0.6);
}

.pot-breakdown {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  color: #c7c4ff;
}

.pot-progress {
  margin-top: 10px;
}

.pot-progress-bar {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  position: relative;
}

.pot-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #ff2bf0, #37d2ff);
  box-shadow: 0 0 16px rgba(255, 43, 240, 0.6);
  transition: width 0.4s ease-out;
}

.pot-progress-label {
  margin-top: 6px;
  font-size: 0.85rem;
  color: #c7c4ff;
}

/* When the pot has any progress, give a subtle pulse on the bar */
.pot-progress-fill[data-has-pot='true'] {
  animation: potPulse 2.3s ease-in-out infinite;
}

.jackpot-timer,
.jackpot-participants {
  margin-top: 10px;
  font-size: 0.9rem;
  display: flex;
  justify-content: space-between;
  color: #e3e0ff;
}

/* ---------- Rules ---------- */

.jackpot-rules-card h3 {
  margin: 0 0 6px;
  font-size: 1rem;
}

.jackpot-rules-card ul {
  padding-left: 18px;
  margin: 8px 0 0;
  font-size: 0.9rem;
  color: #d3d0ff;
  line-height: 1.5;
}

/* ---------- Buttons ---------- */

.primary-btn {
  background: linear-gradient(120deg, #ff2bf0, #37d2ff);
  border: none;
  color: white;
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.95rem;
  width: auto;
  position: relative;
  overflow: hidden;
  transition:
    transform 0.16s ease-out,
    box-shadow 0.16s ease-out,
    filter 0.16s ease-out,
    opacity 0.16s ease-out;
  box-shadow: 0 0 18px rgba(55, 210, 255, 0.35);
}

.primary-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 0 0, rgba(255, 255, 255, 0.3), transparent 60%);
  opacity: 0;
  transition: opacity 0.2s ease-out, transform 0.2s ease-out;
  transform: translateX(-20%);
}

.primary-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 0 24px rgba(55, 210, 255, 0.55);
  filter: brightness(1.04);
}

.primary-btn:hover::after {
  opacity: 1;
  transform: translateX(0);
}

.primary-btn:active:not(:disabled) {
  transform: translateY(1px) scale(0.98);
  box-shadow: 0 0 12px rgba(55, 210, 255, 0.4);
}

.primary-btn:disabled {
  opacity: 0.5;
  cursor: default;
  box-shadow: none;
}

/* Special: full-width buttons inside entry card */
.jackpot-entry-card .primary-btn {
  width: 100%;
  margin-bottom: 10px;
}

/* ---------- Entry Form ---------- */

.entry-form label {
  display: block;
  margin-top: 10px;
  font-size: 0.85rem;
}

.entry-form input,
.entry-form select {
  width: 100%;
  margin-top: 4px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: radial-gradient(circle at top left, rgba(255, 255, 255, 0.06), rgba(8, 0, 28, 0.95));
  color: #f7f7ff;
  outline: none;
  transition:
    border-color 0.18s ease-out,
    box-shadow 0.18s ease-out,
    background 0.18s ease-out;
}

.entry-form input:focus,
.entry-form select:focus {
  border-color: rgba(55, 210, 255, 0.9);
  box-shadow: 0 0 12px rgba(55, 210, 255, 0.5);
  background: radial-gradient(circle at top left, rgba(255, 255, 255, 0.08), rgba(8, 0, 28, 0.98));
}

.entry-tickets {
  margin-top: 8px;
  font-size: 0.9rem;
  color: #e6e3ff;
}

.entry-help {
  margin-top: 6px;
  font-size: 0.8rem;
  color: #c7c4ff;
  word-break: break-all;
}

.entry-status {
  margin-top: 8px;
  font-size: 0.85rem;
  min-height: 1.1em;
}

/* ---------- Winners Table ---------- */

.winners-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.winners-table th,
.winners-table td {
  padding: 6px 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.winners-table th {
  text-align: left;
  color: #c7c4ff;
  font-weight: 500;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.winners-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.04);
}

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  .jackpot-main {
    grid-template-columns: 1fr;
  }

  .jackpot-root {
    padding-top: 18px;
  }

  .jackpot-header h1 {
    font-size: 1.15rem;
  }

  .jackpot-header p {
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .jackpot-root {
    padding: 18px 12px 32px;
  }

  .jackpot-pot-card,
  .jackpot-entry-card,
  .jackpot-rules-card,
  .jackpot-winners-card {
    padding: 14px 14px;
  }

  .jackpot-hero-img {
    width: 210px;
  }
}

/* ---------- Animations ---------- */

@keyframes logoFloat {
  0% {
    transform: translateY(0px);
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.18));
  }
  100% {
    transform: translateY(-6px);
    filter: drop-shadow(0 0 16px rgba(255, 255, 255, 0.26));
  }
}

@keyframes glowFloat {
  0% {
    transform: translate(-50%, 0) scale(1);
    opacity: 0.7;
  }
  100% {
    transform: translate(-48%, 4px) scale(1.08);
    opacity: 1;
  }
}

@keyframes potPulse {
  0% {
    box-shadow: 0 0 12px rgba(255, 43, 240, 0.5);
  }
  50% {
    box-shadow: 0 0 22px rgba(55, 210, 255, 0.8);
  }
  100% {
    box-shadow: 0 0 12px rgba(255, 43, 240, 0.5);
  }
}

