@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&family=Inter:wght@300;400;500;600&display=swap');

/* =============================================
   CSS Variables & Reset
   ============================================= */
:root {
  --navy-900: #060d1a;
  --navy-800: #0D1B2A;
  --navy-700: #112236;
  --navy-600: #1a3350;
  --navy-500: #1e3d61;
  --navy-400: #2a4f7a;
  --gold-500: #F5A623;
  --gold-400: #f7b84b;
  --gold-300: #fad07f;
  --gold-600: #d4891a;
  --white: #ffffff;
  --gray-100: #f0f4f8;
  --gray-200: #d9e2ec;
  --gray-400: #9fb3c8;
  --gray-600: #627d98;
  --success: #10b981;
  --danger: #ef4444;
  --glass-bg: rgba(255,255,255,0.05);
  --glass-border: rgba(255,255,255,0.1);
  --shadow: 0 20px 60px rgba(0,0,0,0.4);
  --shadow-sm: 0 4px 20px rgba(0,0,0,0.25);
  --radius: 16px;
  --radius-sm: 10px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--navy-800);
  color: var(--white);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* =============================================
   Typography
   ============================================= */
h1, h2, h3, h4, h5 {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  line-height: 1.2;
}

/* =============================================
   Utility Classes
   ============================================= */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.glass-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.gold-text { color: var(--gold-500); }
.text-muted { color: var(--gray-400); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-family: 'Poppins', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold-500), var(--gold-600));
  color: var(--navy-800);
}
.btn-gold:hover {
  background: linear-gradient(135deg, var(--gold-400), var(--gold-500));
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(245,166,35,0.4);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 2px solid var(--glass-border);
}
.btn-outline:hover {
  border-color: var(--gold-500);
  color: var(--gold-500);
  transform: translateY(-2px);
}

.btn-danger {
  background: var(--danger);
  color: white;
  padding: 8px 16px;
  font-size: 0.8rem;
}
.btn-danger:hover {
  background: #dc2626;
  transform: translateY(-1px);
}

/* =============================================
   Navbar / Header
   ============================================= */
.navbar {
  background: rgba(6, 13, 26, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

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

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.navbar-logo {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, var(--gold-500), var(--gold-600));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--navy-800);
  flex-shrink: 0;
}

.navbar-title {
  font-family: 'Poppins', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--white);
  line-height: 1.2;
}

.navbar-subtitle {
  font-size: 0.72rem;
  color: var(--gray-400);
  font-weight: 400;
}

.navbar-period {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(245,166,35,0.15);
  border: 1px solid rgba(245,166,35,0.3);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 0.8rem;
  color: var(--gold-400);
  font-weight: 500;
}

/* =============================================
   Hero Section (Landing Page)
   ============================================= */
.hero {
  padding: 80px 0 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(ellipse, rgba(245,166,35,0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(16,185,129,0.15);
  border: 1px solid rgba(16,185,129,0.3);
  border-radius: 20px;
  padding: 6px 16px;
  font-size: 0.8rem;
  color: #34d399;
  font-weight: 500;
  margin-bottom: 24px;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #ffffff 30%, var(--gold-400));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1rem;
  color: var(--gray-400);
  margin-bottom: 40px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.hero-actions .btn {
  font-size: 1rem;
  padding: 16px 36px;
  border-radius: 12px;
}

/* =============================================
   Section Divider
   ============================================= */
.section-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
}

.section-header h2 {
  font-size: 1.4rem;
  color: var(--white);
}

.section-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--glass-border), transparent);
}

/* =============================================
   Team Grid
   ============================================= */
.team-section {
  padding: 40px 0 80px;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 20px;
}

.team-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 24px 16px;
  text-align: center;
  transition: var(--transition);
  cursor: default;
  position: relative;
  overflow: hidden;
}

.team-card::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold-500), var(--gold-600));
  transform: scaleX(0);
  transition: var(--transition);
}

.team-card:hover {
  border-color: rgba(245,166,35,0.4);
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.team-card:hover::before { transform: scaleX(1); }

.team-card.selectable { cursor: pointer; }
.team-card.selectable:hover { background: rgba(245,166,35,0.08); }

.team-card.selected {
  border-color: var(--gold-500);
  background: rgba(245,166,35,0.12);
  transform: translateY(-6px);
  box-shadow: 0 0 0 2px var(--gold-500), 0 20px 40px rgba(0,0,0,0.4);
}

.team-card.selected::before { transform: scaleX(1); }

.team-card-avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  margin: 0 auto 14px;
  overflow: hidden;
  border: 3px solid var(--glass-border);
  transition: var(--transition);
  position: relative;
}

.team-card:hover .team-card-avatar,
.team-card.selected .team-card-avatar {
  border-color: var(--gold-500);
  box-shadow: 0 0 20px rgba(245,166,35,0.3);
}

.team-card-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1.4rem;
  color: white;
}

.team-card-name {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--white);
  margin-bottom: 4px;
}

.team-card-position {
  font-size: 0.72rem;
  color: var(--gray-400);
  line-height: 1.4;
}

.selected-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 24px;
  height: 24px;
  background: var(--gold-500);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  color: var(--navy-800);
  opacity: 0;
  transform: scale(0);
  transition: var(--transition);
}

.team-card.selected .selected-badge {
  opacity: 1;
  transform: scale(1);
}

/* =============================================
   Step Wizard
   ============================================= */
.step-progress {
  display: flex;
  align-items: center;
  margin-bottom: 40px;
  gap: 0;
}

.step-item {
  display: flex;
  align-items: center;
  flex: 1;
}

.step-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--navy-600);
  border: 2px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  transition: var(--transition);
  flex-shrink: 0;
  color: var(--gray-400);
}

.step-item.active .step-circle {
  background: var(--gold-500);
  border-color: var(--gold-500);
  color: var(--navy-800);
  box-shadow: 0 0 20px rgba(245,166,35,0.5);
}

.step-item.done .step-circle {
  background: var(--success);
  border-color: var(--success);
  color: white;
}

.step-label {
  font-size: 0.72rem;
  color: var(--gray-400);
  margin-left: 8px;
  font-weight: 500;
  white-space: nowrap;
}

.step-item.active .step-label { color: var(--gold-400); }
.step-item.done .step-label { color: var(--success); }

.step-line {
  flex: 1;
  height: 2px;
  background: var(--glass-border);
  margin: 0 8px;
  transition: var(--transition);
}

.step-line.done { background: var(--success); }

.step-content { display: none; }
.step-content.active { display: block; animation: fadeInUp 0.4s ease; }

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* =============================================
   Score Input
   ============================================= */
.criteria-list { display: flex; flex-direction: column; gap: 16px; }

.criteria-item {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 20px;
  transition: var(--transition);
}

.criteria-item:hover {
  border-color: rgba(245,166,35,0.3);
  background: rgba(245,166,35,0.04);
}

.criteria-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.criteria-info {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
}

.criteria-num {
  width: 32px;
  height: 32px;
  background: var(--navy-600);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--gold-400);
  flex-shrink: 0;
}

.criteria-label {
  font-size: 0.9rem;
  color: var(--white);
  font-weight: 400;
}

.score-input-group {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.score-input {
  width: 70px;
  height: 48px;
  background: var(--navy-700);
  border: 2px solid var(--glass-border);
  border-radius: 10px;
  color: var(--gold-400);
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1.3rem;
  text-align: center;
  transition: var(--transition);
  outline: none;
  appearance: none;
  -moz-appearance: textfield;
}

.score-input::-webkit-outer-spin-button,
.score-input::-webkit-inner-spin-button { -webkit-appearance: none; }

.score-input:focus {
  border-color: var(--gold-500);
  box-shadow: 0 0 0 3px rgba(245,166,35,0.2);
}

.score-input.filled { border-color: rgba(16,185,129,0.5); color: var(--success); }
.score-input.invalid { border-color: var(--danger); color: var(--danger); }

.score-btns {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.score-btn {
  width: 28px;
  height: 22px;
  background: var(--navy-600);
  border: 1px solid var(--glass-border);
  border-radius: 6px;
  color: var(--gray-400);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  transition: var(--transition);
}

.score-btn:hover {
  background: var(--gold-500);
  color: var(--navy-800);
  border-color: var(--gold-500);
}

.score-display {
  font-size: 0.72rem;
  color: var(--gray-400);
  text-align: center;
  min-width: 40px;
}

/* Score Stars Indicator */
.score-stars {
  display: flex;
  gap: 3px;
  margin-top: 8px;
}

.score-star {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--navy-600);
  transition: var(--transition);
}

.score-star.lit { background: var(--gold-500); }

/* =============================================
   Average Display
   ============================================= */
.avg-card {
  background: rgba(245,166,35,0.1);
  border: 1px solid rgba(245,166,35,0.3);
  border-radius: var(--radius-sm);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.avg-label {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  color: var(--gold-400);
  font-size: 0.9rem;
}

.avg-value {
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  font-size: 2rem;
  color: var(--gold-500);
}

.avg-max { font-size: 1rem; color: var(--gray-400); font-weight: 400; }

/* =============================================
   Textarea / Feedback
   ============================================= */
.form-group {
  margin-bottom: 24px;
}

.form-label {
  display: block;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--white);
  margin-bottom: 10px;
}

.form-label span {
  font-size: 0.75rem;
  color: var(--gray-400);
  font-weight: 400;
  margin-left: 6px;
}

.form-textarea {
  width: 100%;
  background: var(--navy-700);
  border: 2px solid var(--glass-border);
  border-radius: var(--radius-sm);
  color: var(--white);
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  padding: 14px 16px;
  resize: vertical;
  min-height: 120px;
  outline: none;
  transition: var(--transition);
  line-height: 1.6;
}

.form-textarea:focus {
  border-color: var(--gold-500);
  box-shadow: 0 0 0 3px rgba(245,166,35,0.15);
}

.form-textarea::placeholder { color: var(--gray-600); }

/* =============================================
   Selected Person Preview
   ============================================= */
.selected-person-card {
  background: rgba(245,166,35,0.1);
  border: 1px solid rgba(245,166,35,0.3);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.selected-person-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--gold-500);
  flex-shrink: 0;
}

.selected-person-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.selected-person-name {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--white);
}

.selected-person-pos {
  font-size: 0.82rem;
  color: var(--gold-400);
  margin-top: 2px;
}

/* =============================================
   Success State
   ============================================= */
.success-container {
  text-align: center;
  padding: 60px 20px;
  animation: fadeInUp 0.5s ease;
}

.success-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--success), #059669);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto 24px;
  box-shadow: 0 0 40px rgba(16,185,129,0.4);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 40px rgba(16,185,129,0.4); }
  50% { box-shadow: 0 0 60px rgba(16,185,129,0.7); }
}

.success-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 10px;
}

.success-subtitle {
  color: var(--gray-400);
  font-size: 1rem;
  margin-bottom: 32px;
  max-width: 440px;
  margin-left: auto;
  margin-right: auto;
}

.success-score-card {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  background: rgba(16,185,129,0.1);
  border: 1px solid rgba(16,185,129,0.3);
  border-radius: var(--radius);
  padding: 20px 32px;
  margin-bottom: 32px;
}

.success-score-label { color: #34d399; font-weight: 600; }
.success-score-val {
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  font-size: 2rem;
  color: var(--success);
}

/* =============================================
   Page Layout
   ============================================= */
.page-header {
  padding: 48px 0 32px;
}

.page-header h1 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-bottom: 8px;
  background: linear-gradient(135deg, #fff 40%, var(--gold-400));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.page-header p {
  color: var(--gray-400);
  font-size: 0.95rem;
}

.form-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 32px;
  margin-bottom: 24px;
}

.form-card h2 {
  font-size: 1.1rem;
  color: var(--gold-400);
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  gap: 10px;
}

.form-card h2 .icon {
  width: 32px;
  height: 32px;
  background: rgba(245,166,35,0.15);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
}

.form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 32px;
  flex-wrap: wrap;
}

/* =============================================
   Divider with text
   ============================================= */
.section-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 32px 0 24px;
}

.section-divider-line {
  flex: 1;
  height: 1px;
  background: var(--glass-border);
}

.section-divider-text {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--gold-400);
  white-space: nowrap;
}

/* =============================================
   Toast Notification
   ============================================= */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--navy-700);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow);
  z-index: 1000;
  transform: translateX(120%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  max-width: 360px;
  font-size: 0.88rem;
}

.toast.show { transform: translateX(0); }
.toast.success { border-left: 4px solid var(--success); }
.toast.error { border-left: 4px solid var(--danger); }

.toast-icon { font-size: 1.1rem; flex-shrink: 0; }
.toast-message { flex: 1; color: var(--white); line-height: 1.4; }

/* =============================================
   Responsive
   ============================================= */
@media (max-width: 768px) {
  .container { padding: 0 16px; }
  .form-card { padding: 20px 16px; }
  .criteria-row { flex-direction: column; align-items: flex-start; }
  .score-input-group { align-self: flex-end; }
  .hero-actions { flex-direction: column; align-items: center; }
  .hero-actions .btn { width: 100%; max-width: 320px; justify-content: center; }
  .step-label { display: none; }
  .navbar-period { display: none; }
  .team-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px; }
}

/* =============================================
   Scrollbar
   ============================================= */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--navy-900); }
::-webkit-scrollbar-thumb {
  background: var(--navy-400);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: var(--gold-600); }
