:root {
  --bg-dark: #08090c;
  --bg-card: #12141a;
  --bg-header: #0a0b10;
  --text-light: #f5f5f5;
  --primary-yellow: #ffeb3b;
  --border-color: #232632;
  --accent-green: #00e676;
  --gold-accent: #ffd700;
}

body { font-family: 'Segoe UI', Arial, sans-serif; margin: 0; background: var(--bg-dark); color: var(--text-light); }
.container { max-width: 750px; margin: 0 auto; padding: 15px; }

header { 
  background: var(--bg-header); 
  padding: 8px 16px; 
  border-bottom: 2px solid var(--primary-yellow); 
  position: sticky; 
  top: 0; 
  z-index: 100;
  box-shadow: 0 4px 25px rgba(255, 235, 59, 0.12);
  backdrop-filter: blur(8px);
}

.header-top {
  max-width: 750px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
}

.home-button { 
  color: var(--primary-yellow); 
  background: rgba(255, 235, 59, 0.08); 
  padding: 5px 10px; 
  text-decoration: none; 
  font-weight: bold; 
  border-radius: 8px; 
  border: 1px solid rgba(255, 235, 59, 0.3);
  transition: all 0.15s ease;
  font-size: 0.85rem;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}

.home-button:hover {
  background: var(--primary-yellow);
  color: #000;
  box-shadow: 0 0 10px rgba(255, 235, 59, 0.5);
}

.home-button:active {
  background: var(--primary-yellow);
  color: #000;
  box-shadow: 0 0 16px rgba(255, 235, 59, 0.9), 0 0 4px rgba(255, 235, 59, 1) inset;
  transform: scale(0.96);
}

.home-button-spacer {
  visibility: hidden;
  pointer-events: none;
}

header h1 {
  margin: 0;
  font-size: 0.95rem; 
  letter-spacing: 0.8px;
  text-transform: uppercase;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.2);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 480px) {
  header h1 {
    font-size: clamp(0.6rem, 3.4vw, 0.85rem);
    letter-spacing: 0.3px;
  }
  .home-button, .home-button-spacer {
    font-size: 0.75rem;
    padding: 5px 8px;
  }
}

.event-period {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.15) 0%, rgba(18, 20, 26, 0.98) 50%, rgba(255, 235, 59, 0.1) 100%);
  border: 1px solid rgba(255, 215, 0, 0.5);
  padding: 22px 16px;
  border-radius: 16px;
  margin-bottom: 20px;
  text-align: center;
  position: relative;
  box-shadow: 0 8px 32px rgba(255, 215, 0, 0.15), inset 0 0 15px rgba(255, 215, 0, 0.05);
  overflow: hidden;
}

.event-period::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #ffd700, #fff7a6, #ffd700, transparent);
}

.season-badge-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 12px;
}

.event-title {
  background: linear-gradient(135deg, #ffd700 0%, #ffaa00 50%, #ff7700 100%);
  color: #0d0e12;
  font-size: 0.95rem;
  font-weight: 900;
  padding: 6px 24px;
  border-radius: 30px;
  letter-spacing: 2px;
  text-transform: uppercase;
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.5), inset 0 2px 2px rgba(255, 255, 255, 0.8), inset 0 -2px 4px rgba(0, 0, 0, 0.4);
  position: relative;
  overflow: hidden;
  border: 1px solid #ffe875;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.event-title::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -60%;
  width: 220%;
  height: 200%;
  background: linear-gradient(75deg, transparent 35%, rgba(255, 255, 255, 0.85) 50%, transparent 65%);
  animation: seasonShimmer 2.8s infinite ease-in-out;
}

@keyframes seasonShimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.event-date {
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.event-timer { margin-bottom: 14px; }

.countdown-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: nowrap;
}

.countdown-box {
  background: rgba(10, 15, 12, 0.9);
  border: 1.5px solid #00e676;
  border-radius: 10px;
  padding: 10px 4px 6px 4px;
  width: 58px;
  flex-shrink: 0;
  flex-grow: 0;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 0 8px rgba(0, 230, 118, 0.2);
}

.countdown-number {
  font-size: 1.35rem;
  font-weight: 800;
  color: #00ff66;
  text-shadow: 0 0 8px rgba(0, 255, 102, 0.7);
  line-height: 1;
  font-family: 'Courier New', Consolas, monospace;
  white-space: nowrap;
}

.countdown-label {
  font-size: 0.65rem;
  color: #888;
  text-transform: uppercase;
  margin-top: 8px;
  font-weight: 700;
  letter-spacing: 0.5px;
  font-family: Arial, Helvetica, sans-serif;
  white-space: nowrap;
}

.countdown-separator {
  font-size: 1.2rem;
  font-weight: 900;
  color: #00ff66;
  margin-top: -12px;
  font-family: 'Consolas', 'Courier New', 'Arial Black', sans-serif;
}

.event-tags {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.event-tag-item {
  font-size: 0.7rem;
  color: #bbb;
  background: rgba(255, 255, 255, 0.04);
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
}

.stats-container { margin-bottom: 18px; }
.stat-box { 
  background: linear-gradient(180deg, #161922 0%, #101217 100%); 
  border: 1px solid var(--border-color); 
  padding: 16px; 
  border-radius: 14px; 
  text-align: center; 
  position: relative;
  box-shadow: 0 6px 20px rgba(0,0,0,0.5);
}

.live-badge {
  position: absolute;
  top: 12px;
  right: 15px;
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--accent-green);
  background: rgba(0, 230, 118, 0.1);
  padding: 3px 8px;
  border-radius: 20px;
  border: 1px solid rgba(0, 230, 118, 0.25);
  display: flex;
  align-items: center;
  gap: 5px;
}

.live-dot {
  width: 6px;
  height: 6px;
  background-color: var(--accent-green);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--accent-green);
  animation: pulseDot 1.5s infinite;
}

@keyframes pulseDot {
  0% { opacity: 0.3; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.2); }
  100% { opacity: 0.3; transform: scale(0.8); }
}

.stat-box .count { 
  display: block; 
  font-size: 2.2rem; 
  font-weight: 900; 
  color: var(--primary-yellow); 
  text-shadow: 0 0 15px rgba(255, 235, 59, 0.4);
  margin: 4px 0;
}

.stat-box .label { font-size: 0.75rem; text-transform: uppercase; opacity: 0.75; letter-spacing: 1px; }
.last-update { font-size: 0.7rem; color: #888; margin-top: 2px; font-style: italic; }

.search-wrapper { 
  margin-bottom: 22px; 
  position: relative;
  background: linear-gradient(145deg, #181b24, #101217);
  padding: 4px;
  border-radius: 14px;
  border: 1px solid rgba(255, 235, 59, 0.2);
  box-shadow: 0 8px 20px rgba(0,0,0,0.4);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-wrapper:focus-within {
  border-color: var(--primary-yellow);
  box-shadow: 0 0 20px rgba(255, 235, 59, 0.25), 0 8px 25px rgba(0,0,0,0.6);
  transform: translateY(-2px);
}

.search-inner {
  display: flex;
  align-items: center;
  background: #0c0d12;
  border-radius: 10px;
  padding: 2px 14px;
}

.search-icon {
  font-size: 1.1rem;
  color: var(--primary-yellow);
  opacity: 0.8;
  margin-right: 10px;
  transition: transform 0.3s ease;
}

.search-wrapper:focus-within .search-icon {
  transform: scale(1.15) rotate(-10deg);
  opacity: 1;
}

#searchInput { 
  width: 100%; 
  padding: 12px 0;
  border: none; 
  background: transparent; 
  color: #ffffff; 
  font-size: 0.95rem; 
  font-weight: 600;
  letter-spacing: 0.5px;
  outline: none;
}

#searchInput::placeholder {
  color: #666e80;
  font-weight: 400;
}

.clear-search {
  color: #666;
  font-size: 1.1rem;
  cursor: pointer;
  display: none;
  padding: 4px 8px;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.clear-search:hover {
  color: #ff5252;
  background: rgba(255, 82, 82, 0.1);
}

.participant-list { display: grid; gap: 14px; }

.participant-card { 
  background: var(--bg-card); 
  padding: 14px 18px; 
  border-radius: 12px; 
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  position: relative;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  transition: all 0.2s ease-in-out;
  overflow: hidden;
}

.participant-card:hover { transform: translateY(-2px); }

.rank-badge { 
  font-size: 0.85rem; 
  font-weight: 900; 
  letter-spacing: 0.5px;
  margin-bottom: 4px;
  color: #777;
}

.participant-card.rank-1,
.participant-card.rank-2,
.participant-card.rank-3 {
  position: relative;
  border: none;
  background: #121319;
  z-index: 1;
}

.participant-card.rank-1::before,
.participant-card.rank-2::before,
.participant-card.rank-3::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  z-index: -2;
  animation: rotateGlow 3.5s linear infinite;
}

.participant-card.rank-1::after,
.participant-card.rank-2::after,
.participant-card.rank-3::after {
  content: '';
  position: absolute;
  inset: 2px;
  border-radius: 10px;
  z-index: -1;
}

@keyframes rotateGlow { 100% { transform: rotate(360deg); } }

.shine-effect {
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.18), transparent);
  transform: skewX(-25deg);
  pointer-events: none;
  z-index: 2;
  animation: shineSweep 4s infinite;
}

@keyframes shineSweep {
  0%, 70% { left: -100%; }
  100% { left: 200%; }
}

.sparkle-container {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.sparkle {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--primary-yellow);
  box-shadow: 0 0 8px var(--primary-yellow);
  animation: floatSparkle 2.5s infinite ease-in-out;
  opacity: 0;
}

@keyframes floatSparkle {
  0% { bottom: -5px; opacity: 0; transform: scale(0.3) rotate(0deg); }
  50% { opacity: 1; transform: scale(1.5) rotate(180deg); }
  100% { bottom: 105%; opacity: 0; transform: scale(0.2) rotate(360deg); }
}

.participant-card.rank-1 { animation: goldPulseShadow 2s infinite alternate; }
.participant-card.rank-1::before {
  background: conic-gradient(transparent, #ffd700, #fff7a6, transparent 25%, transparent 50%, #ffd700, #fff7a6, transparent 75%);
}
.participant-card.rank-1::after { background: linear-gradient(90deg, #2c2400 0%, #12131a 80%); }
.participant-card.rank-1 .rank-badge { color: #ffd700; text-shadow: 0 0 10px rgba(255, 215, 0, 0.8); }
.participant-card.rank-1 .sparkle { background: #ffd700; box-shadow: 0 0 10px #ffd700, 0 0 18px #fff7a6; }
.participant-card.rank-1 .sparkle:nth-child(1)  { left: 5%;   animation-delay: 0s;   animation-duration: 2.2s; width: 5px; height: 5px; }
.participant-card.rank-1 .sparkle:nth-child(2)  { left: 15%; animation-delay: 0.4s;  animation-duration: 1.9s; width: 3px; height: 3px; }
.participant-card.rank-1 .sparkle:nth-child(3)  { left: 28%; animation-delay: 1.1s;  animation-duration: 2.5s; width: 6px; height: 6px; }
.participant-card.rank-1 .sparkle:nth-child(4)  { left: 40%; animation-delay: 0.2s;  animation-duration: 2.0s; width: 4px; height: 4px; }
.participant-card.rank-1 .sparkle:nth-child(5)  { left: 52%; animation-delay: 1.5s;  animation-duration: 2.3s; width: 5px; height: 5px; }
.participant-card.rank-1 .sparkle:nth-child(6)  { left: 63%; animation-delay: 0.7s;  animation-duration: 1.8s; width: 3px; height: 3px; }
.participant-card.rank-1 .sparkle:nth-child(7)  { left: 74%; animation-delay: 1.8s;  animation-duration: 2.6s; width: 6px; height: 6px; }
.participant-card.rank-1 .sparkle:nth-child(8)  { left: 83%; animation-delay: 0.9s;  animation-duration: 2.1s; width: 4px; height: 4px; }
.participant-card.rank-1 .sparkle:nth-child(9)  { left: 91%; animation-delay: 0.3s;  animation-duration: 2.4s; width: 5px; height: 5px; }
.participant-card.rank-1 .sparkle:nth-child(10) { left: 97%; animation-delay: 1.3s;  animation-duration: 1.9s; width: 3px; height: 3px; }

@keyframes goldPulseShadow {
  0% { box-shadow: 0 0 10px rgba(255, 215, 0, 0.2); }
  100% { box-shadow: 0 0 25px rgba(255, 215, 0, 0.5); }
}

@keyframes borderGlow {
  0%, 100% {
    box-shadow: 0 0 8px rgba(255, 235, 59, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  }
  50% {
    box-shadow: 0 0 18px rgba(255, 235, 59, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  }
}

@keyframes pillShineSweep {
  0% {
    left: -120%;
  }
  20%, 100% {
    left: 120%;
  }
}

.shining-pill {
  position: relative;
  display: inline-block;
  background: linear-gradient(180deg, #2a2d32 0%, #111315 100%);
  border: 1.5px solid #ffeb3b;
  padding: 5px 16px;
  border-radius: 20px;
  overflow: hidden; 
  animation: borderGlow 2s infinite ease-in-out;
}

.shining-pill::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -120%;
  width: 50%;
  height: 200%;
  background: linear-gradient(
    90deg, 
    rgba(255, 255, 255, 0) 0%, 
    rgba(255, 255, 255, 0.7) 50%, 
    rgba(255, 255, 255, 0) 100%
  );
  transform: rotate(25deg);
  animation: pillShineSweep 3s infinite ease-in-out;
  pointer-events: none;
}

.shining-text {
  position: relative;
  z-index: 1;
  font-family: 'Arial Black', Arial, sans-serif;
  font-size: 0.8rem;
  font-weight: 900;
  color: #ffffff; /* Teks diubah menjadi warna putih */
  text-transform: uppercase;
  letter-spacing: 1px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.participant-card.rank-2 { animation: silverPulseShadow 2s infinite alternate; }
.participant-card.rank-2::before {
  background: conic-gradient(transparent, #ffffff, #aaaaaa, transparent 25%, transparent 50%, #ffffff, #aaaaaa, transparent 75%);
}
.participant-card.rank-2::after { background: linear-gradient(90deg, #1d2229 0%, #12131a 80%); }
.participant-card.rank-2 .rank-badge { color: #e0e0e0; text-shadow: 0 0 10px rgba(224, 224, 224, 0.8); }
.participant-card.rank-2 .sparkle { background: #ffffff; box-shadow: 0 0 10px #ffffff, 0 0 15px #e0e0e0; }
.participant-card.rank-2 .sparkle:nth-child(1) { left: 8%;   animation-delay: 0.3s; animation-duration: 2.4s; width: 4px; height: 4px; }
.participant-card.rank-2 .sparkle:nth-child(2) { left: 22%; animation-delay: 1.0s; animation-duration: 2.0s; width: 5px; height: 5px; }
.participant-card.rank-2 .sparkle:nth-child(3) { left: 35%; animation-delay: 0.1s; animation-duration: 2.2s; width: 3px; height: 3px; }
.participant-card.rank-2 .sparkle:nth-child(4) { left: 48%; animation-delay: 1.6s; animation-duration: 1.8s; width: 5px; height: 5px; }
.participant-card.rank-2 .sparkle:nth-child(5) { left: 60%; animation-delay: 0.6s; animation-duration: 2.5s; width: 4px; height: 4px; }
.participant-card.rank-2 .sparkle:nth-child(6) { left: 72%; animation-delay: 1.2s; animation-duration: 2.1s; width: 6px; height: 6px; }
.participant-card.rank-2 .sparkle:nth-child(7) { left: 85%; animation-delay: 0.4s; animation-duration: 1.9s; width: 3px; height: 3px; }
.participant-card.rank-2 .sparkle:nth-child(8) { left: 94%; animation-delay: 1.8s; animation-duration: 2.3s; width: 5px; height: 5px; }

@keyframes silverPulseShadow {
  0% { box-shadow: 0 0 10px rgba(224, 224, 224, 0.2); }
  100% { box-shadow: 0 0 25px rgba(224, 224, 224, 0.5); }
}

.participant-card.rank-3 { animation: bronzePulseShadow 2s infinite alternate; }
.participant-card.rank-3::before {
  background: conic-gradient(transparent, #ff9d00, #ce6d00, transparent 25%, transparent 50%, #ff9d00, #ce6d00, transparent 75%);
}
.participant-card.rank-3::after { background: linear-gradient(90deg, #2a1a0f 0%, #12131a 80%); }
.participant-card.rank-3 .rank-badge { color: #ff9d00; text-shadow: 0 0 10px rgba(255, 157, 0, 0.8); }
.participant-card.rank-3 .sparkle { background: #ff9d00; box-shadow: 0 0 10px #ff9d00, 0 0 15px #ce6d00; }
.participant-card.rank-3 .sparkle:nth-child(1) { left: 12%; animation-delay: 0.7s; animation-duration: 2.1s; width: 5px; height: 5px; }
.participant-card.rank-3 .sparkle:nth-child(2) { left: 25%; animation-delay: 0.1s; animation-duration: 2.5s; width: 3px; height: 3px; }
.participant-card.rank-3 .sparkle:nth-child(3) { left: 38%; animation-delay: 1.4s; animation-duration: 1.9s; width: 5px; height: 5px; }
.participant-card.rank-3 .sparkle:nth-child(4) { left: 50%; animation-delay: 0.5s; animation-duration: 2.3s; width: 4px; height: 4px; }
.participant-card.rank-3 .sparkle:nth-child(5) { left: 65%; animation-delay: 1.8s; animation-duration: 2.0s; width: 6px; height: 6px; }
.participant-card.rank-3 .sparkle:nth-child(6) { left: 78%; animation-delay: 0.9s; animation-duration: 2.4s; width: 3px; height: 3px; }
.participant-card.rank-3 .sparkle:nth-child(7) { left: 88%; animation-delay: 0.3s; animation-duration: 1.8s; width: 5px; height: 5px; }
.participant-card.rank-3 .sparkle:nth-child(8) { left: 96%; animation-delay: 1.2s; animation-duration: 2.2s; width: 4px; height: 4px; }

@keyframes bronzePulseShadow {
  0% { box-shadow: 0 0 10px rgba(255, 157, 0, 0.2); }
  100% { box-shadow: 0 0 25px rgba(255, 157, 0, 0.5); }
}

.card-details { flex-grow: 1; display: flex; flex-direction: column; z-index: 3; }
.id-info { font-weight: 800; font-size: 1.05rem; color: #fff; letter-spacing: 0.5px; text-transform: uppercase; }
.ket-info { font-size: 0.8rem; color: #aaa; margin-top: 2px; }

.parlay-info { 
  display: inline-block;
  align-self: flex-start;
  margin-top: 6px;
  font-size: 0.75rem; 
  color: var(--accent-green); 
  font-weight: 700; 
  background: rgba(0, 230, 118, 0.1);
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid rgba(0, 230, 118, 0.2);
}

.point-info { text-align: right; z-index: 3; }
.point-info .value { 
  font-size: 1.6rem; 
  color: var(--primary-yellow); 
  font-weight: 900; 
  text-shadow: 0 0 10px rgba(255, 235, 59, 0.4);
}
.point-label { font-size: 0.65rem; color: #888; text-transform: uppercase; letter-spacing: 1px; }

#noResult { display: none; text-align: center; padding: 30px; color: #777; }
footer { text-align: center; padding: 20px; opacity: 0.5; font-size: 0.75rem; }