:root {
  color-scheme: light;
  font-family: 'SF Pro Display', 'SF Pro Text', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #010101;
  color: #f5f5f7;
  --accent: #0a84ff;
  --accent-soft: rgba(10, 132, 255, 0.12);
  --card-bg: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.18);
  --text-muted: rgba(245, 245, 247, 0.6);
  --success: #32d74b;
  --danger: #ff453a;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(10, 132, 255, 0.35), rgba(0, 0, 0, 0) 55%),
    radial-gradient(circle at top right, rgba(48, 209, 88, 0.25), rgba(0, 0, 0, 0) 45%),
    #000;
  display: flex;
  justify-content: center;
}

.page {
  width: min(1080px, 92vw);
  padding: 48px 0 80px;
}

.top-links {
  position: fixed;
  top: 24px;
  right: 24px;
  display: flex;
  gap: 18px;
  z-index: 200;
}

.rules-button {
  padding: 12px 20px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.06);
  color: #f5f5f7;
  font-size: 16px;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform 150ms ease, border-color 150ms ease, background 150ms ease;
}

.rules-button:hover {
  transform: translateY(-2px);
  border-color: rgba(10, 132, 255, 0.45);
  background: rgba(10, 132, 255, 0.18);
}

.icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  transition: transform 150ms ease, border-color 150ms ease, background 150ms ease;
}

.icon-link:hover {
  transform: translateY(-2px);
  border-color: rgba(10, 132, 255, 0.45);
  background: rgba(10, 132, 255, 0.18);
}

.icon-link svg {
  width: 40px;
  height: 40px;
  fill: #f5f5f7;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(18px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 300;
}

.modal-overlay.hidden {
  display: none;
}

.modal-content {
  width: min(560px, 92vw);
  max-height: 85vh;
  overflow-y: auto;
  padding: 36px 40px;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(22, 22, 24, 0.92);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.45);
  position: relative;
  color: #f5f5f7;
}

.modal-content h2 {
  margin: 0 0 16px;
  font-size: 28px;
  font-weight: 600;
}

.modal-content h3 {
  margin: 24px 0 12px;
  font-size: 18px;
}

.modal-body p,
.modal-body li {
  color: var(--text-muted);
  line-height: 1.6;
  font-size: 15px;
}

.modal-body ul {
  padding-left: 20px;
  margin: 0;
}

.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: #f5f5f7;
  font-size: 22px;
  cursor: pointer;
  transition: background 150ms ease;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

header.hero {
  text-align: center;
  padding-bottom: 64px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 8px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  font-size: 14px;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.hero h1 {
  margin: 32px 0 16px;
  font-size: clamp(42px, 6vw, 72px);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.hero p {
  margin: 0 auto;
  width: min(520px, 92%);
  color: var(--text-muted);
  line-height: 1.6;
  font-size: 18px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  margin-bottom: 56px;
}

.stats-card {
  padding: 28px;
  border-radius: 28px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  backdrop-filter: blur(16px);
  transition: transform 200ms ease, border-color 200ms ease;
}

.stats-card:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 255, 255, 0.32);
}

.stats-card span {
  display: block;
  color: var(--text-muted);
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.stats-card strong {
  font-size: clamp(32px, 4.5vw, 48px);
  font-weight: 600;
}

.milestone-section {
  margin-bottom: 64px;
  padding: 36px;
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(18px);
}

.milestone-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.milestone-header h2 {
  margin: 0;
  font-size: 28px;
  font-weight: 600;
}

.milestone-status {
  color: var(--text-muted);
  font-size: 15px;
}

.milestone-progress {
  position: relative;
  margin-bottom: 28px;
}

.progress-track {
  position: relative;
  height: 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: visible;
}

.progress-fill {
  position: absolute;
  inset: 0;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(120deg, rgba(10, 132, 255, 0.85), rgba(48, 209, 88, 0.85));
  transition: width 320ms ease;
}

.progress-marker {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  pointer-events: none;
}

.progress-marker::before {
  content: '';
  position: absolute;
  top: 2px;
  left: 50%;
  transform: translate(-50%, 0);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.28);
  border: 2px solid rgba(255, 255, 255, 0.55);
  transition: background 200ms ease, border-color 200ms ease;
}

.progress-marker[data-align='start'] {
  transform: translate(0, -50%);
  text-align: left;
}

.progress-marker[data-align='start']::before {
  left: 0;
  transform: translateX(0);
}

.progress-marker[data-align='end'] {
  transform: translate(-100%, -50%);
  text-align: right;
}

.progress-marker[data-align='end']::before {
  left: 100%;
  transform: translateX(-100%);
}

.progress-marker[data-align='center']::before {
  left: 50%;
  transform: translateX(-50%);
}

.progress-marker[data-milestone='100000'] {
  margin-left: -6px;
}

.progress-marker span {
  display: inline-block;
  margin-top: 18px;
  line-height: 1.4;
}

.progress-marker.unlocked {
  color: #f5f5f7;
}

.progress-marker.unlocked::before {
  background: rgba(50, 215, 75, 0.7);
  border-color: rgba(50, 215, 75, 0.9);
}

.milestone-rewards {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.milestone-rewards li {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.milestone-rewards li.unlocked {
  border-color: rgba(50, 215, 75, 0.45);
  background: rgba(50, 215, 75, 0.14);
  color: #f5f5f7;
}

.milestone-rewards .reward-title {
  font-size: 16px;
  font-weight: 600;
  color: #f5f5f7;
}

.milestone-rewards .reward-desc {
  font-size: 14px;
}

.upload-section {
  padding: 48px;
  border-radius: 36px;
  background: linear-gradient(140deg, rgba(10, 132, 255, 0.2), rgba(72, 72, 74, 0.5));
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(18px);
  margin-bottom: 64px;
}

.upload-section h2 {
  margin: 0 0 12px;
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.upload-section p {
  margin: 0 0 32px;
  color: var(--text-muted);
}

.form-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-bottom: 24px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.form-group label {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.82);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="file"] {
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(17, 17, 19, 0.6);
  color: #f5f5f7;
  font-size: 16px;
}

.form-group input[type="file"] {
  padding: 12px;
}

.captcha-group {
  grid-column: 1 / -1;
}

.captcha-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
}

.captcha-wrapper input {
  flex: 1;
}

.captcha-image {
  height: 48px;
  min-width: 120px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(17, 17, 19, 0.6);
}

.captcha-refresh {
  white-space: nowrap;
}

.file-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.btn-ghost {
  padding: 10px 18px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: transparent;
  color: #f5f5f7;
  font-size: 15px;
  cursor: pointer;
  transition: border-color 120ms ease, color 120ms ease, transform 120ms ease;
}

.btn-ghost:hover {
  border-color: rgba(10, 132, 255, 0.5);
  color: #0a84ff;
  transform: translateY(-1px);
}

.compact-hint {
  font-size: 13px;
}

.selected-images {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
}

.selected-images li {
  position: relative;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: #f5f5f7;
  font-size: 13px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.selected-images li strong {
  display: block;
  word-break: break-all;
}

.selected-images .empty-slot {
  grid-column: 1 / -1;
  padding: 18px;
  border-radius: 16px;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  text-align: center;
}

.remove-image {
  align-self: flex-start;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 69, 58, 0.45);
  background: transparent;
  color: #ff453a;
  font-size: 12px;
  cursor: pointer;
  transition: border-color 120ms ease, color 120ms ease;
}

.remove-image:hover {
  border-color: rgba(255, 69, 58, 0.7);
  color: #ff6a63;
}

.form-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}

.btn-primary {
  padding: 14px 32px;
  border-radius: 999px;
  border: none;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: white;
  background: linear-gradient(130deg, #0a84ff, #1c3cde);
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(10, 132, 255, 0.35);
}

.hint {
  color: var(--text-muted);
  font-size: 14px;
}

.participants-section {
  margin-bottom: 80px;
}

.participants-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.participants-header h2 {
  margin: 0;
  font-size: 28px;
  font-weight: 600;
}

.participants-header span {
  color: var(--text-muted);
}

.participants-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.participant-card {
  border-radius: 24px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 160ms ease, border-color 160ms ease;
}

.participant-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.32);
}

.participant-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 18px;
}

.participant-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.participant-meta strong {
  font-size: 18px;
}

.participant-meta span {
  font-size: 14px;
  color: var(--text-muted);
}

footer {
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 36px;
  transform: translateX(-50%) translateY(120%);
  transition: transform 220ms ease, opacity 220ms ease;
  background: rgba(10, 10, 12, 0.85);
  padding: 14px 24px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #f5f5f7;
  backdrop-filter: blur(18px);
  opacity: 0;
  z-index: 99;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

@media (max-width: 720px) {
  .page {
    padding: 32px 0 64px;
  }

  .milestone-section {
    padding: 28px;
  }

  .upload-section {
    padding: 32px;
  }

  .participants-header {
    flex-direction: column;
    align-items: flex-start;
  }
}
