/* PMR Competition Management System - Custom Design System */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800;900&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
  --primary: #dc2626;
  --primary-dark: #991b1b;
  --primary-light: #fee2e2;
  --primary-gradient: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
  --gold-gradient: linear-gradient(135deg, #fbbf24 0%, #d97706 100%);
  --silver-gradient: linear-gradient(135deg, #e2e8f0 0%, #94a3b8 100%);
  --bronze-gradient: linear-gradient(135deg, #fdba74 0%, #c2410c 100%);
  --dark-bg: #0f172a;
  --dark-surface: #1e293b;
  --dark-card: #1e293b;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 10px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 20px 35px -10px rgba(220, 38, 38, 0.15);
  --shadow-glow: 0 0 25px rgba(220, 38, 38, 0.35);
}

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

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text-main);
  background-color: #f8fafc;
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6, .brand-font {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* Navbar */
.navbar-custom {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

.navbar-brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 1.25rem;
  color: #0f172a !important;
  text-decoration: none;
}

.logo-badge {
  width: 42px;
  height: 42px;
  background: var(--primary-gradient);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.3rem;
  box-shadow: var(--shadow-glow);
}

.nav-link {
  font-weight: 600;
  color: #475569 !important;
  padding: 8px 16px !important;
  border-radius: 10px;
  transition: all 0.2s ease;
}

.nav-link:hover, .nav-link.active {
  color: var(--primary) !important;
  background: var(--primary-light);
}

/* Hero Section */
.hero-section {
  position: relative;
  background: radial-gradient(circle at top right, #fee2e2 0%, #f8fafc 60%, #ffffff 100%);
  padding: 60px 0 40px;
  border-bottom: 1px solid var(--border-color);
  overflow: hidden;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  padding: 6px 16px;
  border-radius: 9999px;
  border: 1px solid #fecaca;
  color: var(--primary-dark);
  font-size: 0.85rem;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.08);
}

.hero-title {
  font-size: 3rem;
  line-height: 1.15;
  margin-top: 16px;
  color: #0f172a;
}

.hero-title span {
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.live-pulse {
  width: 10px;
  height: 10px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulse-green 2s infinite;
  display: inline-block;
}

@keyframes pulse-green {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Stats Cards */
.stat-card {
  background: #ffffff;
  border-radius: var(--radius-md);
  padding: 24px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  position: relative;
  overflow: hidden;
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.stat-icon-wrapper {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 16px;
}

.stat-val {
  font-size: 2.2rem;
  font-weight: 800;
  font-family: 'Outfit', sans-serif;
  color: #0f172a;
}

/* Juara Umum Spotlight Card */
.champion-spotlight {
  background: linear-gradient(135deg, #1e1b4b 0%, #0f172a 100%);
  border-radius: var(--radius-xl);
  color: #ffffff;
  padding: 36px;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.champion-spotlight::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.25) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.champion-trophy-badge {
  font-size: 4rem;
  filter: drop-shadow(0 10px 15px rgba(245, 158, 11, 0.4));
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-8px); }
}

/* Custom Nav Pills for Categories */
.category-pills {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 12px;
  scrollbar-width: thin;
}

.category-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  color: #475569;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.category-pill-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.category-pill-btn.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 4px 15px rgba(220, 38, 38, 0.35);
}

/* Table Design */
.custom-table-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.table-custom {
  width: 100%;
  margin-bottom: 0;
  vertical-align: middle;
}

.table-custom thead th {
  background: #f8fafc;
  color: #475569;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  padding: 16px 20px;
  border-bottom: 2px solid var(--border-color);
}

.table-custom tbody tr {
  transition: background 0.15s ease;
  border-bottom: 1px solid #f1f5f9;
}

.table-custom tbody tr:hover {
  background: #f8fafc;
}

.table-custom td {
  padding: 16px 20px;
  color: #1e293b;
}

/* Badges for Standings */
.badge-gold {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
  font-weight: 800;
  padding: 6px 14px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.badge-silver {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
  font-weight: 800;
  padding: 6px 14px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.badge-bronze {
  background: #ffedd5;
  color: #9a3412;
  border: 1px solid #fed7aa;
  font-weight: 800;
  padding: 6px 14px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.badge-harapan {
  background: #dbeafe;
  color: #1e40af;
  border: 1px solid #bfdbfe;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 9999px;
}

.badge-participant {
  background: #f8fafc;
  color: #64748b;
  border: 1px solid #e2e8f0;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 9999px;
}

.score-highlight {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 1.25rem;
  color: #0f172a;
}

/* Status Badges */
.status-pill {
  font-size: 0.8rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.status-belum {
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #cbd5e1;
}

.status-berlangsung {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
  animation: pulse-yellow 2s infinite;
}

.status-selesai {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

/* Jury Scoring Sheet */
.scoring-sheet-card {
  background: #ffffff;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
  padding: 32px;
}

.criterion-card {
  background: #f8fafc;
  border-radius: var(--radius-md);
  padding: 20px;
  border: 1px solid #e2e8f0;
  margin-bottom: 20px;
  transition: border-color 0.2s ease;
}

.criterion-card:hover, .criterion-card:focus-within {
  border-color: var(--primary);
  background: #ffffff;
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.08);
}

.score-slider {
  accent-color: var(--primary);
  height: 8px;
  cursor: pointer;
}

.live-score-total-box {
  position: sticky;
  top: 90px;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  color: white;
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Admin Sidebar Layout */
.admin-sidebar {
  min-height: calc(100vh - 70px);
  background: #ffffff;
  border-right: 1px solid var(--border-color);
  padding: 24px 16px;
}

.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  color: #475569;
  font-weight: 600;
  text-decoration: none;
  border-radius: 12px;
  margin-bottom: 6px;
  transition: all 0.2s ease;
}

.admin-nav-item:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.admin-nav-item.active {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.25);
}

/* Buttons */
.btn-pmr {
  background: var(--primary-gradient);
  color: #ffffff;
  font-weight: 700;
  border: none;
  padding: 10px 22px;
  border-radius: 12px;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-pmr:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
  color: #ffffff;
}

.btn-pmr-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
  font-weight: 700;
  padding: 8px 20px;
  border-radius: 12px;
  transition: all 0.2s ease;
}

.btn-pmr-outline:hover {
  background: var(--primary);
  color: #ffffff;
}

/* Footer */
.footer-custom {
  background: #0f172a;
  color: #94a3b8;
  padding: 50px 0 30px;
  border-top: 1px solid #1e293b;
  margin-top: 60px;
}

.footer-custom a {
  color: #cbd5e1;
  text-decoration: none;
  transition: color 0.2s;
}

.footer-custom a:hover {
  color: var(--primary);
}

/* Responsive tweaks */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2.1rem;
  }
  .stat-val {
    font-size: 1.75rem;
  }
  .champion-spotlight {
    padding: 24px;
  }
}
