/* ============================================================
   LOMBA DESAIN GRAFIS — HUT KE-81 REPUBLIK INDONESIA
   LKP Les Privat Digital
   Design System & Styling
   ============================================================ */

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

/* ---------- CSS Custom Properties ---------- */
:root {
  /* Colors - Indonesian Flag Theme */
  --red-50: #fef2f2;
  --red-100: #fee2e2;
  --red-200: #fecaca;
  --red-300: #fca5a5;
  --red-400: #f87171;
  --red-500: #ef4444;
  --red-600: #dc2626;
  --red-700: #b91c1c;
  --red-800: #991b1b;
  --red-900: #7f1d1d;

  --primary: #CE1126;
  --primary-dark: #A30E1F;
  --primary-light: #E8394D;
  --primary-glow: rgba(206, 17, 38, 0.15);

  --white: #FFFFFF;
  --off-white: #FDFAF7;
  --cream: #FFF8F0;

  --dark: #1A1A2E;
  --dark-light: #2D2D44;
  --dark-muted: #3D3D56;

  --gold: #C9A84C;
  --gold-light: #E8D48B;
  --gold-dark: #A68A3E;

  --text-primary: #1F2937;
  --text-secondary: #4B5563;
  --text-muted: #9CA3AF;
  --text-light: #D1D5DB;

  --success: #059669;
  --success-light: #D1FAE5;
  --warning: #D97706;
  --warning-light: #FEF3C7;
  --info: #2563EB;
  --info-light: #DBEAFE;
  --danger: #DC2626;
  --danger-light: #FEE2E2;

  --gray-50: #F9FAFB;
  --gray-100: #F3F4F6;
  --gray-200: #E5E7EB;
  --gray-300: #D1D5DB;
  --gray-400: #9CA3AF;
  --gray-500: #6B7280;
  --gray-600: #4B5563;
  --gray-700: #374151;
  --gray-800: #1F2937;

  /* Typography */
  --font-heading: 'Poppins', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;

  /* Border Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.08), 0 8px 10px -6px rgba(0,0,0,0.04);
  --shadow-2xl: 0 25px 50px -12px rgba(0,0,0,0.15);
  --shadow-inner: inset 0 2px 4px rgba(0,0,0,0.05);
  --shadow-red: 0 10px 30px -5px rgba(206, 17, 38, 0.25);
  --shadow-gold: 0 4px 15px -3px rgba(201, 168, 76, 0.3);

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast: 150ms;
  --duration-normal: 250ms;
  --duration-slow: 400ms;

  /* Z-Index */
  --z-dropdown: 100;
  --z-modal: 1000;
  --z-toast: 1100;
  --z-tooltip: 1200;
}

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--off-white);
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

button {
  cursor: pointer;
  border: none;
  outline: none;
  font-family: var(--font-body);
}

select, input {
  font-family: var(--font-body);
}

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.75rem); }
h4 { font-size: 1.25rem; }

p {
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ---------- Container ---------- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

/* ---------- Navbar ---------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: var(--z-dropdown);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  padding: var(--space-md) 0;
  transition: box-shadow var(--duration-normal) var(--ease-out);
}

.navbar.scrolled {
  box-shadow: var(--shadow-md);
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.navbar-logo {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--primary);
  letter-spacing: -0.02em;
}

.navbar-logo span {
  color: var(--dark);
}

.navbar-badge {
  background: var(--primary);
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.navbar-links {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
}

.navbar-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--duration-fast);
  position: relative;
}

.navbar-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width var(--duration-normal) var(--ease-out);
  border-radius: 1px;
}

.navbar-link:hover {
  color: var(--primary);
}

.navbar-link:hover::after {
  width: 100%;
}

/* ---------- Hero Section ---------- */
.hero-section {
  position: relative;
  min-height: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(165deg, var(--primary) 0%, var(--primary-dark) 45%, var(--dark) 100%);
  padding: var(--space-4xl) 0;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(ellipse 600px 400px at 20% 50%, rgba(255,255,255,0.08) 0%, transparent 70%),
    radial-gradient(ellipse 500px 300px at 80% 30%, rgba(201,168,76,0.1) 0%, transparent 70%);
  pointer-events: none;
}

.hero-section::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: linear-gradient(to top, var(--off-white), transparent);
  pointer-events: none;
}

.hero-bg-number {
  position: absolute;
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: clamp(15rem, 35vw, 30rem);
  color: rgba(255, 255, 255, 0.04);
  right: -3%;
  top: 50%;
  transform: translateY(-50%);
  line-height: 1;
  pointer-events: none;
  user-select: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 800px;
  padding: 0 var(--space-xl);
}

.hero-kecil {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: var(--space-md);
}

.hero-title {
  color: var(--white);
  font-size: clamp(2.2rem, 5.5vw, 3.8rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: var(--space-sm);
  letter-spacing: -0.02em;
}

.hero-title .accent {
  display: block;
  color: var(--gold-light);
  font-size: 0.55em;
  font-weight: 600;
  letter-spacing: 0.05em;
  margin-top: var(--space-xs);
}

.hero-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: clamp(4rem, 10vw, 7rem);
  color: var(--white);
  margin: var(--space-lg) 0;
  line-height: 1;
  text-shadow: 0 4px 30px rgba(0,0,0,0.3);
  position: relative;
}

.hero-number::before,
.hero-number::after {
  content: '';
  width: clamp(30px, 8vw, 80px);
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold));
  border-radius: 2px;
  margin: 0 var(--space-lg);
}

.hero-number::after {
  background: linear-gradient(90deg, var(--gold), transparent);
}

.hero-number sup {
  font-size: 0.3em;
  vertical-align: super;
  margin-left: 2px;
  font-weight: 700;
}

.hero-subtitle {
  font-size: clamp(0.95rem, 2vw, 1.15rem);
  color: rgba(255, 255, 255, 0.75);
  font-weight: 400;
  max-width: 600px;
  margin: 0 auto var(--space-xl);
  line-height: 1.7;
}

.hero-subtitle strong {
  color: white;
  font-weight: 600;
}

.hero-date {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  color: rgba(255,255,255,0.9);
  border: 1px solid rgba(255,255,255,0.15);
}

.hero-date-icon {
  font-size: 1.1rem;
}

/* ---------- Section ---------- */
.section {
  padding: var(--space-4xl) 0;
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-3xl);
}

.section-label {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: var(--space-sm);
}

.section-title {
  margin-bottom: var(--space-sm);
}

.section-desc {
  max-width: 560px;
  margin: 0 auto;
  font-size: 1rem;
}

/* ---------- Step Wizard ---------- */
.step-wizard {
  display: flex;
  justify-content: center;
  gap: 0;
  margin-bottom: var(--space-3xl);
  padding: 0 var(--space-md);
  flex-wrap: wrap;
}

.step-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-lg);
  position: relative;
  opacity: 0.4;
  transition: all var(--duration-normal) var(--ease-out);
}

.step-item.active {
  opacity: 1;
}

.step-item.completed {
  opacity: 0.7;
}

.step-item.completed .step-number {
  background: var(--success);
  color: white;
}

.step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gray-200);
  color: var(--text-muted);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
  transition: all var(--duration-normal) var(--ease-out);
}

.step-item.active .step-number {
  background: var(--primary);
  color: white;
  box-shadow: 0 0 0 4px var(--primary-glow);
}

.step-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
}

.step-item.active .step-label {
  color: var(--text-primary);
}

.step-connector {
  width: 40px;
  height: 2px;
  background: var(--gray-200);
  align-self: center;
  flex-shrink: 0;
}

.step-connector.completed {
  background: var(--success);
}

/* ---------- Participant Select ---------- */
.participant-select-wrapper {
  max-width: 600px;
  margin: 0 auto var(--space-3xl);
}

.form-group {
  margin-bottom: var(--space-lg);
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
}

.form-label .required {
  color: var(--primary);
  margin-left: 2px;
}

.participant-dropdown {
  width: 100%;
  padding: 14px 18px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-md);
  font-size: 1rem;
  color: var(--text-primary);
  background: var(--white);
  transition: all var(--duration-fast);
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%239CA3AF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  cursor: pointer;
}

.participant-dropdown:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-glow);
  outline: none;
}

.participant-dropdown:hover {
  border-color: var(--gray-300);
}

.participant-info {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  background: var(--cream);
  border-radius: var(--radius-md);
  margin-top: var(--space-md);
  border: 1px solid rgba(206,17,38,0.08);
}

.participant-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.participant-name {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 1.05rem;
}

.participant-label-small {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}

/* ---------- Template Grid ---------- */
.template-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
  margin-bottom: var(--space-3xl);
}

.template-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 2px solid var(--gray-200);
  transition: all var(--duration-normal) var(--ease-out);
  cursor: pointer;
  position: relative;
}

.template-card:hover {
  border-color: var(--gray-300);
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.template-card.selected {
  border-color: var(--primary);
  box-shadow: var(--shadow-red);
}

.template-card.selected::after {
  content: '✓';
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  z-index: 2;
  box-shadow: var(--shadow-md);
  animation: checkPop 0.3s var(--ease-bounce);
}

@keyframes checkPop {
  from { transform: scale(0); }
  to { transform: scale(1); }
}

.template-image-wrapper {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--gray-100);
}

.template-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration-slow) var(--ease-out);
}

.template-card:hover .template-image-wrapper img {
  transform: scale(1.03);
}

.template-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  gap: var(--space-sm);
}

.template-image-placeholder svg {
  width: 48px;
  height: 48px;
  opacity: 0.4;
}

.template-image-placeholder span {
  font-size: 0.85rem;
}

.template-label {
  padding: var(--space-md) var(--space-lg);
  text-align: center;
}

.template-label-title {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-primary);
}

.template-label-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ---------- Upload Zone ---------- */
.upload-section {
  max-width: 700px;
  margin: 0 auto var(--space-3xl);
}

.upload-zone {
  border: 2px dashed var(--gray-300);
  border-radius: var(--radius-lg);
  padding: var(--space-3xl) var(--space-xl);
  text-align: center;
  background: var(--white);
  transition: all var(--duration-normal) var(--ease-out);
  cursor: pointer;
  position: relative;
}

.upload-zone:hover {
  border-color: var(--primary);
  background: var(--red-50);
}

.upload-zone.dragover {
  border-color: var(--primary);
  background: var(--red-100);
  transform: scale(1.01);
  box-shadow: var(--shadow-red);
}

.upload-zone.has-file {
  border-style: solid;
  border-color: var(--success);
  background: var(--success-light);
}

.upload-icon {
  margin-bottom: var(--space-md);
  color: var(--text-muted);
}

.upload-icon svg {
  width: 56px;
  height: 56px;
  stroke-width: 1.5;
}

.upload-zone.has-file .upload-icon svg {
  color: var(--success);
}

.upload-text {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: var(--space-xs);
}

.upload-text-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.upload-text-sub strong {
  color: var(--primary);
  font-weight: 600;
}

.upload-file-input {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.upload-preview {
  margin-top: var(--space-xl);
  display: none;
}

.upload-preview.show {
  display: block;
}

.upload-preview-inner {
  display: flex;
  align-items: flex-start;
  gap: var(--space-lg);
  padding: var(--space-lg);
  background: var(--white);
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-200);
}

.upload-preview-img {
  width: 120px;
  height: 90px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--gray-200);
  flex-shrink: 0;
}

.upload-preview-info {
  flex: 1;
  text-align: left;
}

.upload-preview-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
  word-break: break-all;
}

.upload-preview-size {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.upload-preview-remove {
  background: var(--danger-light);
  color: var(--danger);
  border: none;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: var(--space-sm);
  transition: all var(--duration-fast);
}

.upload-preview-remove:hover {
  background: var(--danger);
  color: white;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 12px 28px;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 600;
  transition: all var(--duration-normal) var(--ease-out);
  border: none;
  cursor: pointer;
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 2px 8px rgba(206, 17, 38, 0.25);
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-dark);
  box-shadow: var(--shadow-red);
  transform: translateY(-1px);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(0);
}

.btn-secondary {
  background: var(--white);
  color: var(--text-primary);
  border: 2px solid var(--gray-200);
}

.btn-secondary:hover:not(:disabled) {
  border-color: var(--gray-300);
  background: var(--gray-50);
  transform: translateY(-1px);
}

.btn-success {
  background: var(--success);
  color: white;
  box-shadow: 0 2px 8px rgba(5, 150, 105, 0.25);
}

.btn-success:hover:not(:disabled) {
  background: #047857;
  transform: translateY(-1px);
}

.btn-danger {
  background: var(--danger);
  color: white;
}

.btn-danger:hover:not(:disabled) {
  background: var(--red-700);
  transform: translateY(-1px);
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: white;
  box-shadow: var(--shadow-gold);
}

.btn-gold:hover:not(:disabled) {
  box-shadow: 0 6px 20px -3px rgba(201, 168, 76, 0.4);
  transform: translateY(-1px);
}

.btn-lg {
  padding: 16px 36px;
  font-size: 1.05rem;
  border-radius: var(--radius-md);
}

.btn-sm {
  padding: 8px 18px;
  font-size: 0.85rem;
}

.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: var(--radius-sm);
}

.btn-group {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- Analysis / Results ---------- */
.analysis-section {
  max-width: 800px;
  margin: 0 auto;
  display: none;
}

.analysis-section.show {
  display: block;
}

.analysis-progress {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  box-shadow: var(--shadow-lg);
  text-align: center;
  margin-bottom: var(--space-xl);
}

.progress-bar-wrapper {
  width: 100%;
  height: 8px;
  background: var(--gray-100);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin: var(--space-lg) 0 var(--space-md);
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  border-radius: var(--radius-full);
  transition: width 0.4s var(--ease-out);
  width: 0%;
}

.progress-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* Results Card */
.results-container {
  background: var(--white);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  display: none;
}

.results-container.show {
  display: block;
  animation: slideUp 0.5s var(--ease-out);
}

.results-header {
  padding: var(--space-2xl);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.results-header.excellent {
  background: linear-gradient(135deg, #059669, #047857);
}

.results-header.good {
  background: linear-gradient(135deg, #2563EB, #1D4ED8);
}

.results-header.fair {
  background: linear-gradient(135deg, #D97706, #B45309);
}

.results-header.poor {
  background: linear-gradient(135deg, #DC2626, #B91C1C);
}

.results-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 30% 50%, rgba(255,255,255,0.15), transparent 60%);
}

.score-circle {
  position: relative;
  width: 140px;
  height: 140px;
  margin: 0 auto var(--space-lg);
}

.score-circle svg {
  transform: rotate(-90deg);
  width: 140px;
  height: 140px;
}

.score-circle .track {
  fill: none;
  stroke: rgba(255,255,255,0.2);
  stroke-width: 8;
}

.score-circle .fill {
  fill: none;
  stroke: white;
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 408;
  stroke-dashoffset: 408;
  transition: stroke-dashoffset 1.5s var(--ease-out);
}

.score-value {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 800;
  color: white;
  line-height: 1;
}

.score-value .percent {
  font-size: 0.45em;
  font-weight: 600;
  vertical-align: super;
}

.score-label {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.8);
  font-weight: 500;
  margin-bottom: var(--space-xs);
}

.score-category {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
  color: white;
}

/* Detail Scores */
.results-body {
  padding: var(--space-2xl);
}

.detail-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-lg);
}

.detail-scores {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.detail-item {
  display: grid;
  grid-template-columns: 180px 1fr 60px;
  align-items: center;
  gap: var(--space-md);
}

.detail-label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.detail-bar {
  height: 8px;
  background: var(--gray-100);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.detail-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 1s var(--ease-out);
  width: 0%;
}

.detail-bar-fill.excellent { background: var(--success); }
.detail-bar-fill.good { background: var(--info); }
.detail-bar-fill.fair { background: var(--warning); }
.detail-bar-fill.poor { background: var(--danger); }

.detail-value {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary);
  text-align: right;
}

/* Comparison Images */
.comparison-images {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: var(--space-lg);
  align-items: center;
  padding: var(--space-xl);
  background: var(--gray-50);
  border-top: 1px solid var(--gray-200);
}

.comparison-img-box {
  text-align: center;
}

.comparison-img-box img {
  width: 100%;
  max-height: 250px;
  object-fit: contain;
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-200);
  background: white;
}

.comparison-img-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: var(--space-sm);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.comparison-vs {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--text-muted);
  padding: var(--space-sm) var(--space-md);
  background: var(--white);
  border-radius: var(--radius-full);
  border: 1px solid var(--gray-200);
}

/* ---------- Leaderboard ---------- */
.leaderboard-section {
  background: var(--white);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  margin-top: var(--space-2xl);
}

.leaderboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-xl) var(--space-2xl);
  background: var(--dark);
  color: white;
}

.leaderboard-header h3 {
  color: white;
  font-size: 1.15rem;
}

.leaderboard-count {
  font-size: 0.85rem;
  color: var(--text-light);
  background: var(--dark-muted);
  padding: 4px 14px;
  border-radius: var(--radius-full);
  font-weight: 500;
}

.leaderboard-table {
  width: 100%;
  border-collapse: collapse;
}

.leaderboard-table th {
  text-align: left;
  padding: var(--space-md) var(--space-xl);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
}

.leaderboard-table td {
  padding: var(--space-md) var(--space-xl);
  font-size: 0.9rem;
  border-bottom: 1px solid var(--gray-100);
  vertical-align: middle;
}

.leaderboard-table tr:hover td {
  background: var(--cream);
}

.leaderboard-table tr:last-child td {
  border-bottom: none;
}

.rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.85rem;
}

.rank-badge.gold {
  background: linear-gradient(135deg, #F59E0B, #D97706);
  color: white;
  box-shadow: var(--shadow-gold);
}

.rank-badge.silver {
  background: linear-gradient(135deg, #9CA3AF, #6B7280);
  color: white;
}

.rank-badge.bronze {
  background: linear-gradient(135deg, #CD7F32, #A0522D);
  color: white;
}

.rank-badge.normal {
  background: var(--gray-100);
  color: var(--text-secondary);
}

.leaderboard-name {
  font-weight: 600;
  color: var(--text-primary);
}

.leaderboard-no {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.leaderboard-score {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
}

.leaderboard-score.excellent { color: var(--success); }
.leaderboard-score.good { color: var(--info); }
.leaderboard-score.fair { color: var(--warning); }
.leaderboard-score.poor { color: var(--danger); }

.leaderboard-template {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

.leaderboard-time {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.leaderboard-empty {
  text-align: center;
  padding: var(--space-3xl) var(--space-xl);
  color: var(--text-muted);
}

.leaderboard-empty svg {
  width: 56px;
  height: 56px;
  margin-bottom: var(--space-md);
  opacity: 0.3;
}

.leaderboard-empty p {
  font-size: 0.95rem;
}

/* ---------- Admin Styles ---------- */
.admin-hero {
  background: var(--dark);
  padding: var(--space-2xl) 0;
  text-align: center;
}

.admin-hero h1 {
  color: white;
  font-size: 1.8rem;
  margin-bottom: var(--space-xs);
}

.admin-hero p {
  color: var(--text-light);
  font-size: 0.95rem;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
  margin: var(--space-2xl) 0;
}

.admin-upload-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--gray-200);
  transition: all var(--duration-normal) var(--ease-out);
}

.admin-upload-card:hover {
  box-shadow: var(--shadow-lg);
}

.admin-card-header {
  padding: var(--space-md) var(--space-lg);
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.admin-card-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.admin-card-status {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--radius-full);
}

.admin-card-status.empty {
  background: var(--warning-light);
  color: var(--warning);
}

.admin-card-status.uploaded {
  background: var(--success-light);
  color: var(--success);
}

.admin-card-body {
  padding: var(--space-lg);
}

.admin-upload-zone {
  border: 2px dashed var(--gray-300);
  border-radius: var(--radius-md);
  padding: var(--space-2xl) var(--space-md);
  text-align: center;
  cursor: pointer;
  transition: all var(--duration-fast);
  position: relative;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.admin-upload-zone:hover {
  border-color: var(--primary);
  background: var(--red-50);
}

.admin-upload-zone.dragover {
  border-color: var(--primary);
  background: var(--red-100);
}

.admin-upload-zone.has-image {
  border: none;
  padding: 0;
}

.admin-upload-zone.has-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: var(--radius-md);
}

.admin-upload-zone input[type="file"] {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.admin-upload-icon {
  color: var(--text-muted);
  margin-bottom: var(--space-sm);
}

.admin-upload-text {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

.admin-card-footer {
  padding: var(--space-md) var(--space-lg);
  border-top: 1px solid var(--gray-100);
  display: flex;
  gap: var(--space-sm);
}

/* Admin actions bar */
.admin-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: var(--space-xl);
  padding: var(--space-lg);
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.admin-status-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.admin-status-text strong {
  color: var(--text-primary);
}

/* ---------- Toast Notifications ---------- */
.toast-container {
  position: fixed;
  top: var(--space-xl);
  right: var(--space-xl);
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.toast {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  min-width: 320px;
  max-width: 420px;
  animation: toastIn 0.4s var(--ease-out);
  border-left: 4px solid;
}

.toast.removing {
  animation: toastOut 0.3s var(--ease-out) forwards;
}

.toast-success {
  border-left-color: var(--success);
}

.toast-error {
  border-left-color: var(--danger);
}

.toast-warning {
  border-left-color: var(--warning);
}

.toast-info {
  border-left-color: var(--info);
}

.toast-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
}

.toast-content {
  flex: 1;
}

.toast-title {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary);
}

.toast-message {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.toast-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.1rem;
  padding: 4px;
  border-radius: 4px;
  transition: background var(--duration-fast);
}

.toast-close:hover {
  background: var(--gray-100);
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes toastOut {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(40px);
  }
}

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  z-index: var(--z-modal);
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--space-xl);
}

.modal-overlay.show {
  display: flex;
  animation: fadeIn 0.25s var(--ease-out);
}

.modal-content {
  background: var(--white);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 500px;
  box-shadow: var(--shadow-2xl);
  animation: modalIn 0.3s var(--ease-out);
  overflow: hidden;
}

.modal-header {
  padding: var(--space-xl) var(--space-2xl);
  border-bottom: 1px solid var(--gray-100);
}

.modal-header h3 {
  font-size: 1.15rem;
}

.modal-body {
  padding: var(--space-xl) var(--space-2xl);
}

.modal-body p {
  font-size: 0.95rem;
  line-height: 1.7;
}

.modal-footer {
  padding: var(--space-lg) var(--space-2xl);
  border-top: 1px solid var(--gray-100);
  display: flex;
  justify-content: flex-end;
  gap: var(--space-md);
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* ---------- Footer ---------- */
.footer {
  background: var(--dark);
  color: rgba(255,255,255,0.6);
  padding: var(--space-2xl) 0;
  text-align: center;
}

.footer-brand {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.1rem;
  color: white;
  margin-bottom: var(--space-sm);
}

.footer-text {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.4);
}

.footer-text a {
  color: var(--gold-light);
  font-weight: 500;
}

.footer-divider {
  width: 60px;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
  margin: var(--space-lg) auto;
}

/* ---------- Empty State ---------- */
.empty-state {
  text-align: center;
  padding: var(--space-3xl);
  color: var(--text-muted);
}

.empty-state svg {
  width: 72px;
  height: 72px;
  margin-bottom: var(--space-md);
  opacity: 0.3;
}

.empty-state h4 {
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
}

.empty-state p {
  font-size: 0.9rem;
  max-width: 360px;
  margin: 0 auto;
}

/* ---------- Animations ---------- */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.fade-in {
  animation: fadeIn 0.5s var(--ease-out);
}

.slide-up {
  animation: slideUp 0.5s var(--ease-out);
}

.analyzing .progress-text {
  animation: pulse 1.5s infinite;
}

/* ---------- Utility Classes ---------- */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mt-2xl { margin-top: var(--space-2xl); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.hidden { display: none !important; }
.visible { display: block; }

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
  background: var(--gray-300);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gray-400);
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .template-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
  }

  .admin-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
  }

  .detail-item {
    grid-template-columns: 140px 1fr 50px;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0 var(--space-md);
  }

  .hero-section {
    min-height: 420px;
    padding: var(--space-3xl) 0;
  }

  .hero-bg-number {
    font-size: 12rem;
  }

  .step-wizard {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 0 var(--space-lg);
  }

  .step-connector {
    width: 2px;
    height: 20px;
    margin-left: 17px;
  }

  .template-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
  }

  .admin-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
  }

  .comparison-images {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .comparison-vs {
    margin: var(--space-sm) 0;
  }

  .detail-item {
    grid-template-columns: 1fr;
    gap: var(--space-xs);
  }

  .detail-value {
    text-align: left;
  }

  .leaderboard-table th,
  .leaderboard-table td {
    padding: var(--space-sm) var(--space-md);
  }

  .navbar-links {
    display: none;
  }

  .toast {
    min-width: auto;
    max-width: calc(100vw - 40px);
  }

  .toast-container {
    right: var(--space-md);
    left: var(--space-md);
  }

  .admin-actions {
    flex-direction: column;
    gap: var(--space-md);
    text-align: center;
  }

  .leaderboard-header {
    flex-direction: column;
    gap: var(--space-sm);
    padding: var(--space-lg);
  }

  .modal-content {
    margin: var(--space-md);
  }

  .section {
    padding: var(--space-2xl) 0;
  }
}

@media (max-width: 480px) {
  .hero-section {
    min-height: 380px;
    padding: var(--space-2xl) 0;
  }

  .hero-number {
    font-size: 3.5rem;
  }

  .hero-number::before,
  .hero-number::after {
    width: 25px;
    margin: 0 var(--space-sm);
  }

  .score-circle {
    width: 110px;
    height: 110px;
  }

  .score-circle svg {
    width: 110px;
    height: 110px;
  }

  .score-value {
    font-size: 1.8rem;
  }

  .results-header,
  .results-body {
    padding: var(--space-lg);
  }

  .upload-zone {
    padding: var(--space-xl) var(--space-md);
  }

  .btn-lg {
    padding: 14px 28px;
    font-size: 0.95rem;
  }
}

/* ---------- Print Styles ---------- */
@media print {
  .navbar,
  .footer,
  .upload-zone,
  .btn,
  .toast-container {
    display: none !important;
  }

  .hero-section {
    min-height: auto;
    padding: var(--space-lg) 0;
    background: white !important;
    color: black !important;
    print-color-adjust: exact;
  }

  body {
    background: white;
  }

  .results-container {
    box-shadow: none;
    border: 1px solid var(--gray-300);
  }
}
