/* ==========================================================
   PANDA PREDIKSI - Core Stylesheet
   Tema: Dark Modern Glassmorphism (Black, White, Green, Gold)
   ========================================================== */

:root {
  --bg-main: #0a0f18;
  --bg-surface: #0f172a;
  --bg-card: #131d2e;
  --bg-card-elevated: #1a273e;
  --bg-glass: rgba(19, 29, 46, 0.75);

  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-active: rgba(16, 185, 129, 0.35);

  --panda-green: #10b981;
  --panda-green-dark: #059669;
  --panda-green-glow: rgba(16, 185, 129, 0.25);

  --panda-gold: #f59e0b;
  --panda-gold-light: #fbbf24;
  --panda-gold-glow: rgba(245, 158, 11, 0.25);

  --accent-red: #ef4444;
  --accent-blue: #38bdf8;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 20px rgba(16, 185, 129, 0.2);

  --font-base: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-base);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(16, 185, 129, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 85% 80%, rgba(245, 158, 11, 0.03) 0%, transparent 40%);
  background-attachment: fixed;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

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

/* ================= HEADER / NAVBAR ================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 15, 24, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 12px 0;
}

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

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

.brand-logo img {
  height: 46px;
  width: auto;
  object-fit: contain;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.04);
}

.nav-link.active {
  color: var(--panda-green);
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

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

.provider-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
}

.provider-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--panda-green);
  box-shadow: 0 0 8px var(--panda-green);
}

/* ================= GLOBAL SEARCH BAR ================= */
.search-wrapper {
  position: relative;
  width: 100%;
  max-width: 480px;
}

.search-input-box {
  display: flex;
  align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  gap: 10px;
  transition: all 0.25s ease;
}

.search-input-box:focus-within {
  border-color: var(--panda-green);
  box-shadow: 0 0 16px var(--panda-green-glow);
  background: var(--bg-card);
}

.search-icon {
  color: var(--text-muted);
  font-size: 1.1rem;
}

.search-input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-main);
  font-size: 0.95rem;
  width: 100%;
}

.search-input::placeholder {
  color: var(--text-dim);
}

.search-clear-btn {
  color: var(--text-muted);
  font-size: 1rem;
  display: none;
}

.search-clear-btn.visible {
  display: block;
}

/* Dropdown Search Results */
.search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--bg-card-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  max-height: 400px;
  overflow-y: auto;
  z-index: 120;
  display: none;
}

.search-dropdown.open {
  display: block;
}

.search-item {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.2s;
  cursor: pointer;
}

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

.search-item:hover {
  background: rgba(16, 185, 129, 0.08);
}

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

.search-item-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-main);
}

.search-item-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ================= BUTTONS & BADGES ================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 700;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--panda-green), var(--panda-green-dark));
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.45);
}

.btn-panda-analisis {
  background: linear-gradient(135deg, #1e2e47, #131d2e);
  border: 1px solid var(--border-active);
  color: #ffffff;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.btn-panda-analisis:hover {
  background: linear-gradient(135deg, var(--panda-green), var(--panda-green-dark));
  border-color: var(--panda-green);
  box-shadow: 0 0 16px var(--panda-green-glow);
  transform: scale(1.02);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Status Badges */
.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.badge-status.live {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}

.badge-status.live .pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-red);
  animation: livePulse 1.2s infinite ease-in-out;
}

.badge-status.finished {
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.2);
  color: var(--text-muted);
}

.badge-status.upcoming {
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.25);
  color: var(--accent-blue);
}

/* Confidence Badges */
.confidence-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 800;
}

.confidence-badge.level-very-high {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(245, 158, 11, 0.2));
  border: 1px solid var(--panda-green);
  color: #34d399;
}

.confidence-badge.level-high {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #10b981;
}

.confidence-badge.level-medium {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fbbf24;
}

.confidence-badge.level-low {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #f87171;
}

/* ================= FORM BADGES (W / D / L) ================= */
.form-badge-group {
  display: inline-flex;
  gap: 5px;
}

.form-badge {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 800;
  color: #ffffff;
}

.form-badge.W {
  background-color: #10b981;
}

.form-badge.D {
  background-color: #f59e0b;
}

.form-badge.L {
  background-color: #ef4444;
}

/* ================= PANDA ANALYZING MODAL / ANIMATION ================= */
.panda-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 15, 24, 0.88);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.panda-modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.panda-modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-active);
  border-radius: var(--radius-lg);
  padding: 40px;
  text-align: center;
  max-width: 440px;
  width: 90%;
  box-shadow: var(--shadow-md), var(--shadow-glow);
  position: relative;
  overflow: hidden;
}

.panda-modal-card::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(transparent, rgba(16, 185, 129, 0.15), transparent 30%);
  animation: rotateGlow 4s linear infinite;
  z-index: 1;
}

.panda-modal-content {
  position: relative;
  z-index: 2;
}

.panda-loader-avatar {
  width: 100px;
  height: 100px;
  margin: 0 auto 20px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.panda-loader-avatar img {
  width: 80px;
  height: 80px;
  animation: pandaBounce 2s infinite ease-in-out;
}

.radar-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid var(--panda-green);
  opacity: 0;
  animation: radarPulse 2s infinite cubic-bezier(0.2, 0.8, 0.2, 1);
}

.radar-ring:nth-child(2) {
  animation-delay: 0.6s;
}

.radar-ring:nth-child(3) {
  animation-delay: 1.2s;
}

.panda-loader-title {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--text-main);
  margin-bottom: 8px;
}

.panda-loader-subtitle {
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* ================= PROBABILITY BARS ================= */
.prob-bar-container {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-full);
  overflow: hidden;
  height: 14px;
  display: flex;
  margin: 12px 0;
  border: 1px solid var(--border-subtle);
}

.prob-segment {
  height: 100%;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.prob-segment.home {
  background: linear-gradient(90deg, #10b981, #059669);
}

.prob-segment.draw {
  background: linear-gradient(90deg, #f59e0b, #d97706);
}

.prob-segment.away {
  background: linear-gradient(90deg, #38bdf8, #2563eb);
}

.prob-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  font-weight: 700;
}

/* ================= OFFICIAL DISCLAIMER & FOOTER ================= */
.disclaimer-banner {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: var(--radius-md);
  padding: 12px 20px;
  margin: 25px 0;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.85rem;
  color: #fde68a;
}

.disclaimer-icon {
  font-size: 1.3rem;
  color: var(--panda-gold);
  flex-shrink: 0;
}

.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  padding: 40px 0 25px;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
  text-align: center;
}

.footer-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-links a:hover {
  color: var(--panda-green);
}

.footer-disclaimer-text {
  max-width: 720px;
  font-size: 0.8rem;
  color: var(--text-dim);
  line-height: 1.5;
}

/* ================= KEYFRAME ANIMATIONS ================= */
@keyframes livePulse {
  0% { transform: scale(0.9); opacity: 0.7; box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
  70% { transform: scale(1.1); opacity: 1; box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
  100% { transform: scale(0.9); opacity: 0.7; }
}

@keyframes pandaBounce {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-8px) rotate(2deg); }
}

@keyframes radarPulse {
  0% { transform: scale(0.8); opacity: 0.8; }
  100% { transform: scale(2.2); opacity: 0; }
}

@keyframes rotateGlow {
  100% { transform: rotate(360deg); }
}
