:root {
  --primary: #6C3FE8;
  --primary-dark: #5230C4;
  --accent: #FF6B35;
  --accent-2: #00C896;
  --accent-3: #FFB800;
  --dark: #0F0E17;
  --card-bg: #ffffff;
  --surface: #F4F4FF;
  --text-muted: #6B7280;
  --border: #E5E7EB;
}

* { box-sizing: border-box; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--surface);
  color: var(--dark);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.page-content { flex: 1 0 auto; }

/* Navbar */
#mainNav {
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.navbar-brand { font-size: 1.4rem; font-weight: 800; color: var(--primary) !important; }
.brand-icon { background: var(--primary); color: white; border-radius: 8px; padding: 4px 8px; font-size: 1rem; }
.text-accent { color: var(--accent); }

.nav-link { color: #374151 !important; font-weight: 500; border-radius: 8px; padding: .4rem .8rem !important; transition: all .2s; }
.nav-link:hover { background: var(--surface); color: var(--primary) !important; }

/* Avatar */
.avatar-initials {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white; font-weight: 700; font-size: .75rem;
}

/* Buttons */
.btn-primary { background: var(--primary); border-color: var(--primary); font-weight: 600; border-radius: 10px; }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn-outline-primary { border-color: var(--primary); color: var(--primary); border-radius: 10px; font-weight: 600; }
.btn-outline-primary:hover { background: var(--primary); color: white; }
.btn-accent { background: var(--accent); color: white; border: none; border-radius: 10px; font-weight: 600; }
.btn-accent:hover { background: #e05a28; color: white; }

/* Cards */
.card { border: 1px solid var(--border); border-radius: 16px; box-shadow: 0 2px 12px rgba(0,0,0,.05); }
.card-header { border-radius: 16px 16px 0 0 !important; border-bottom: 1px solid var(--border); }
.stat-card { border-radius: 16px; padding: 1.5rem; color: white; }

/* Hero */
.hero-section {
  background: linear-gradient(135deg, var(--primary) 0%, #9B5DE5 50%, var(--accent) 100%);
  color: white; padding: 5rem 0;
  position: relative; overflow: hidden;
}
.hero-section::before {
  content: ''; position: absolute; top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(circle at 30% 50%, rgba(255,255,255,.08) 0%, transparent 50%);
}
.hero-badge { background: rgba(255,255,255,.2); backdrop-filter: blur(10px); border-radius: 20px; padding: .3rem 1rem; font-size: .85rem; font-weight: 600; display: inline-block; margin-bottom: 1rem; }
.hero-title { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 800; line-height: 1.1; }
.hero-subtitle { font-size: 1.1rem; opacity: .85; }

/* Category cards */
.cat-card {
  border-radius: 16px; padding: 1.5rem; color: white; cursor: pointer;
  transition: transform .2s, box-shadow .2s;
  border: none;
}
.cat-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(0,0,0,.15); }
.cat-card .cat-icon { font-size: 2.5rem; margin-bottom: .75rem; }
.cat-card .cat-name { font-weight: 700; font-size: 1.1rem; }

/* Stage progress */
.stage-step { display: flex; align-items: center; gap: .75rem; padding: .75rem; border-radius: 12px; margin-bottom: .5rem; }
.stage-step.done { background: rgba(0,200,150,.1); }
.stage-step.active { background: rgba(108,63,232,.1); border: 2px solid var(--primary); }
.stage-step.pending { background: #f9f9f9; opacity: .6; }
.step-icon { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: .9rem; font-weight: 700; flex-shrink: 0; }
.step-icon.done { background: var(--accent-2); color: white; }
.step-icon.active { background: var(--primary); color: white; }
.step-icon.pending { background: var(--border); color: #999; }

/* Score bars */
.score-bar-wrap { background: var(--border); border-radius: 6px; height: 8px; overflow: hidden; }
.score-bar { height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--primary), var(--accent)); }

/* Leaderboard */
.lb-rank-1 { background: linear-gradient(135deg, #FFD700, #FFA500); color: white; }
.lb-rank-2 { background: linear-gradient(135deg, #C0C0C0, #A0A0A0); color: white; }
.lb-rank-3 { background: linear-gradient(135deg, #CD7F32, #A0522D); color: white; }
.lb-entry { border-radius: 12px; padding: 1rem 1.25rem; margin-bottom: .5rem; background: white; border: 1px solid var(--border); transition: box-shadow .2s; }
.lb-entry:hover { box-shadow: 0 4px 16px rgba(0,0,0,.08); }

/* Notification badge */
.notif-badge { position: absolute; top: 0; right: 0; font-size: .6rem; min-width: 16px; padding: 2px 4px; }

/* Schedule */
.event-card { border-left: 4px solid var(--primary); border-radius: 0 12px 12px 0; padding: 1rem 1.25rem; margin-bottom: .75rem; background: white; }
.event-card.type-results { border-color: var(--accent-2); }
.event-card.type-presentation { border-color: var(--accent); }
.event-card.type-ceremony { border-color: var(--accent-3); }
.event-date { font-size: 1.5rem; font-weight: 800; color: var(--primary); line-height: 1; }
.event-month { font-size: .75rem; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); }

/* Form */
.form-control, .form-select { border-radius: 10px; border: 1.5px solid var(--border); padding: .6rem 1rem; font-size: .95rem; }
.form-control:focus, .form-select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(108,63,232,.12); }

/* Dashboard panels */
.portal-header { background: linear-gradient(135deg, var(--primary), #9B5DE5); color: white; border-radius: 16px; padding: 2rem; margin-bottom: 2rem; }
.portal-header h1 { font-size: 1.6rem; font-weight: 800; margin: 0; }

/* Judge score row */
.criterion-row { background: white; border: 1px solid var(--border); border-radius: 12px; padding: 1rem; margin-bottom: .5rem; }
.score-input { width: 80px; text-align: center; font-weight: 700; font-size: 1.1rem; }

/* Footer */
.footer { background: var(--dark); color: #aaa; }
.footer .fw-600 { color: white; }

/* Utilities */
.fw-800 { font-weight: 800; }
.fw-700 { font-weight: 700; }
.fw-600 { font-weight: 600; }
.rounded-xl { border-radius: 16px; }
.text-primary-custom { color: var(--primary); }
.bg-primary-custom { background: var(--primary); }

/* Responsive */
@media (max-width: 768px) {
  .hero-section { padding: 3rem 0; }
  .stat-card { margin-bottom: 1rem; }
}
