/* ── BUTTONS ── */
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent); color: #fff; text-decoration: none;
  font-family: var(--sans); font-size: 14px; font-weight: 600;
  padding: 13px 28px; border-radius: var(--radius-sm);
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 2px 8px rgba(var(--accent-rgb),0.25);
}
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(var(--accent-rgb),0.3); }
.btn-secondary {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1.5px solid var(--border); color: var(--ink); text-decoration: none;
  font-family: var(--sans); font-size: 14px; font-weight: 600;
  padding: 13px 28px; border-radius: var(--radius-sm);
  transition: all 0.2s; background: var(--bg);
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-light); }

/* ── SECTION BASE ── */
section { padding: 96px 48px; }
.section-rule { display: flex; align-items: center; gap: 16px; margin-bottom: 56px; }
.section-num {
  font-family: var(--sans); font-size: 11px; font-weight: 600;
  letter-spacing: 0.12em; color: var(--accent);
  background: var(--accent-light); padding: 3px 10px; border-radius: 100px;
}
.section-rule hr { flex: 1; border: none; border-top: 1px solid var(--border); }
.section-tag {
  font-family: var(--sans); font-size: 11px; font-weight: 600;
  letter-spacing: 0.12em; color: var(--ink-faint); text-transform: uppercase;
}
h1, h2, h3 { font-family: var(--sans); font-weight: 700; }

/* ── BACK LINK ── */
.back-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--sans); font-size: 13px; font-weight: 500;
  color: var(--accent); text-decoration: none;
  padding: 48px 48px 0; transition: gap 0.2s;
}
.back-link:hover { gap: 10px; }

/* ── HERO ── */
.app-hero {
  padding: 64px 48px 80px;
  background: linear-gradient(135deg, var(--accent-pale) 0%, #ffffff 50%, var(--accent-lighter) 100%);
  position: relative; overflow: hidden;
}
.app-hero::before {
  content: ''; position: absolute; top: -200px; right: -200px;
  width: 600px; height: 600px; border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--accent-rgb),0.07) 0%, transparent 65%);
  pointer-events: none;
}
.app-hero-inner {
  display: grid; grid-template-columns: 1fr 420px;
  gap: 64px; align-items: center; position: relative; z-index: 1;
}
.app-hero-eyebrow {
  font-family: var(--sans); font-size: 12px; font-weight: 600;
  letter-spacing: 0.15em; color: var(--accent);
  margin-bottom: 20px; display: flex; align-items: center; gap: 10px;
  text-transform: uppercase;
}
.app-hero-eyebrow::before {
  content: ''; display: inline-block; width: 24px; height: 2px;
  background: var(--accent); border-radius: 2px;
}
.app-hero-h1 {
  font-family: var(--sans); font-size: clamp(32px, 4vw, 52px);
  font-weight: 700; line-height: 1.15; letter-spacing: -0.02em;
  color: var(--ink); margin-bottom: 20px;
}
.app-hero-desc {
  font-size: 16px; color: var(--ink-light); line-height: 1.85;
  max-width: 480px; margin-bottom: 36px;
}
.app-hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* phone mockup */
.phone-mockup {
  width: 220px; margin: 0 auto;
  background: #0d0f14; border-radius: 36px;
  padding: 12px; box-shadow: 0 24px 64px rgba(0,0,0,0.22), 0 4px 16px rgba(0,0,0,0.12);
  border: 2px solid #2a2d38; position: relative;
}
.phone-screen {
  border-radius: 26px; overflow: hidden;
  background: linear-gradient(160deg, #5b3fa5 0%, #3b5ead 50%, #2563eb 100%);
  aspect-ratio: 9/19.5;
  display: flex; flex-direction: column; padding: 20px 16px 16px;
  position: relative;
}
.phone-notch {
  width: 80px; height: 20px; background: #0d0f14;
  border-radius: 0 0 14px 14px;
  margin: -20px auto 12px; position: relative; z-index: 2;
}
.phone-quiz-label {
  font-family: var(--sans); font-size: 8px; color: rgba(255,255,255,0.5);
  letter-spacing: 0.1em; margin-bottom: 4px;
}
.phone-progress-bar {
  height: 3px; background: rgba(255,255,255,0.15); border-radius: 2px; margin-bottom: 10px;
}
.phone-progress-bar-fill {
  height: 100%; width: 55%; border-radius: 2px;
  background: linear-gradient(90deg, #00d4ff, #2563eb);
}
.phone-skill-token {
  font-family: var(--sans); font-size: 7px; color: rgba(255,255,255,0.55);
  margin-bottom: 2px;
}
.phone-rank { font-family: var(--sans); font-size: 7px; color: rgba(255,255,255,0.55); margin-bottom: 8px; }
.phone-question-card {
  background: rgba(255,255,255,0.1); border-radius: 10px;
  padding: 10px 10px 8px; margin-bottom: 8px; flex: 1;
  border: 1px solid rgba(255,255,255,0.15);
}
.phone-q-label { font-family: var(--sans); font-size: 7.5px; font-weight: 600; color: #fff; line-height: 1.5; margin-bottom: 8px; }
.phone-choice {
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.2);
  border-radius: 20px; padding: 4px 8px; margin-bottom: 4px;
  font-size: 6.5px; color: rgba(255,255,255,0.85); text-align: center; line-height: 1.4;
}
.phone-tabbar {
  display: flex; justify-content: space-around; align-items: center;
  padding-top: 8px; border-top: 1px solid rgba(255,255,255,0.1);
}
.phone-tab { width: 16px; height: 16px; opacity: 0.5; }
.phone-tab.active { opacity: 1; }
.phone-tab svg { width: 14px; height: 14px; fill: rgba(255,255,255,0.7); display: block; }
.phone-tab.active svg { fill: #fff; }

/* app hero right: screenshots mosaic */
.screenshots-mosaic {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 12px; align-items: start;
}
.screenshot-frame {
  border-radius: 20px; overflow: hidden;
  box-shadow: 0 8px 24px rgba(0,0,0,0.14);
  background: #1a1d2e;
  aspect-ratio: 9/19;
}
.screenshot-frame img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.screenshot-frame:nth-child(2) { margin-top: 28px; }

/* ── FEATURES ── */
#features { background: var(--bg-soft); border-bottom: 1px solid var(--border); }
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.feature-card {
  background: var(--bg-card); padding: 32px 28px;
  border-radius: var(--radius); border: 1px solid var(--border);
  box-shadow: var(--shadow); transition: box-shadow 0.2s, transform 0.2s;
}
.feature-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.feature-icon {
  width: 44px; height: 44px; border-radius: var(--radius-sm);
  background: var(--accent-light); display: flex; align-items: center; justify-content: center;
  font-size: 20px; margin-bottom: 18px;
}
.feature-label {
  font-family: var(--sans); font-size: 11px; font-weight: 600;
  letter-spacing: 0.1em; color: var(--accent);
  background: var(--accent-light); display: inline-block;
  padding: 3px 10px; border-radius: 100px; margin-bottom: 12px;
}
.feature-card h3 { font-size: 17px; font-weight: 700; margin-bottom: 10px; line-height: 1.4; }
.feature-card p { font-size: 14px; color: var(--ink-light); line-height: 1.8; }

/* ── QUIZ ── */
#quiz { border-bottom: 1px solid var(--border); }
.quiz-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.quiz-visual {
  background: linear-gradient(145deg, #5b3fa5, #2563eb);
  border-radius: var(--radius); padding: 32px 24px;
  box-shadow: 0 8px 32px rgba(var(--accent-rgb),0.2);
}
.quiz-visual-label {
  font-family: var(--sans); font-size: 10px; letter-spacing: 0.15em;
  color: rgba(255,255,255,0.5); text-transform: uppercase; margin-bottom: 6px;
}
.quiz-visual-sub {
  font-family: var(--sans); font-size: 12px; color: rgba(255,255,255,0.4);
  margin-bottom: 16px;
}
.quiz-q-card {
  background: rgba(255,255,255,0.1); border-radius: var(--radius-sm);
  padding: 16px 18px; margin-bottom: 12px;
  border: 1px solid rgba(255,255,255,0.15);
}
.quiz-q-text { font-family: var(--sans); font-size: 14px; font-weight: 600; color: #fff; line-height: 1.55; margin-bottom: 12px; }
.quiz-choice {
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.18);
  border-radius: 100px; padding: 8px 14px; margin-bottom: 6px;
  font-size: 12px; color: rgba(255,255,255,0.85); text-align: center;
  transition: background 0.2s; cursor: default;
}
.quiz-choice:last-child { margin-bottom: 0; }
.quiz-choice.correct { background: rgba(22,163,74,0.25); border-color: rgba(22,163,74,0.5); color: #6ee7a8; }
.quiz-progress {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--sans); font-size: 10px; color: rgba(255,255,255,0.45);
  margin-bottom: 10px;
}
.quiz-bar { flex: 1; height: 3px; background: rgba(255,255,255,0.12); border-radius: 2px; }
.quiz-bar-fill { height: 100%; width: 40%; background: linear-gradient(90deg, #00d4ff, #2563eb); border-radius: 2px; }

.quiz-text h2 { font-size: clamp(24px, 3vw, 36px); margin-bottom: 16px; line-height: 1.35; }
.quiz-text p { font-size: 15px; color: var(--ink-light); line-height: 1.9; margin-bottom: 24px; }
.quiz-stat-row { display: flex; gap: 32px; margin-top: 28px; }
.quiz-stat-num { font-family: var(--sans); font-size: 36px; font-weight: 700; color: var(--accent); line-height: 1; }
.quiz-stat-label { font-size: 12px; color: var(--ink-faint); margin-top: 4px; }

/* ── COURSES ── */
#courses { background: var(--bg-soft); border-bottom: 1px solid var(--border); }
.courses-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.course-card {
  display: flex; align-items: center; gap: 16px;
  padding: 18px 22px; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--bg-card);
  box-shadow: var(--shadow); transition: box-shadow 0.2s, transform 0.2s;
}
.course-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.course-icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}
.course-info {}
.course-name { font-family: var(--sans); font-size: 14px; font-weight: 600; color: var(--ink); margin-bottom: 3px; }
.course-desc { font-size: 12px; color: var(--ink-faint); line-height: 1.5; }

/* ── RANKING ── */
#ranking { border-bottom: 1px solid var(--border); }
.ranking-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.ranking-visual {
  background: linear-gradient(160deg, #4a2d7a, #2b4db5);
  border-radius: var(--radius); padding: 28px 24px;
  box-shadow: 0 8px 32px rgba(74,45,122,0.2);
}
.ranking-tabs {
  display: flex; gap: 8px; margin-bottom: 20px;
}
.ranking-tab {
  font-family: var(--sans); font-size: 11px; font-weight: 600;
  padding: 5px 14px; border-radius: 100px; cursor: default;
  border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.5);
}
.ranking-tab.active { background: rgba(255,255,255,0.15); color: #fff; }
.ranking-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,0.08);
}
.ranking-item:last-child { border-bottom: none; }
.ranking-pos {
  width: 24px; height: 24px; border-radius: 50%;
  background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.15);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--sans); font-size: 10px; font-weight: 600; color: rgba(255,255,255,0.6);
  flex-shrink: 0;
}
.ranking-pos.top { background: rgba(255,196,0,0.2); border-color: rgba(255,196,0,0.4); color: #ffd700; }
.ranking-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(255,255,255,0.15); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
}
.ranking-name { font-family: var(--sans); font-size: 12px; font-weight: 600; color: #fff; flex: 1; }
.ranking-pts { font-family: var(--sans); font-size: 11px; color: rgba(255,255,255,0.5); }

.ranking-text h2 { font-size: clamp(24px, 3vw, 36px); margin-bottom: 16px; line-height: 1.35; }
.ranking-text p { font-size: 15px; color: var(--ink-light); line-height: 1.9; margin-bottom: 24px; }
.ranking-points { display: flex; flex-direction: column; gap: 12px; margin-top: 28px; }
.ranking-point-item { display: flex; align-items: flex-start; gap: 12px; }
.ranking-point-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--accent);
  flex-shrink: 0; margin-top: 7px;
}
.ranking-point-text { font-size: 14px; color: var(--ink-light); line-height: 1.75; }

/* ── SKILLMAP ── */
#skillmap { background: var(--bg-soft); border-bottom: 1px solid var(--border); }
.skillmap-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.skillmap-visual {
  background: linear-gradient(160deg, #3b1f6a, #1e3a8a);
  border-radius: var(--radius); padding: 28px 24px;
  box-shadow: 0 8px 32px rgba(var(--accent-rgb),0.18);
}
.skillmap-title-label {
  font-family: var(--sans); font-size: 14px; font-weight: 700; color: #fff;
  margin-bottom: 16px;
}
.skill-bar-item { margin-bottom: 10px; }
.skill-bar-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.skill-bar-name { font-size: 10px; color: rgba(255,255,255,0.7); }
.skill-bar-pt { font-family: var(--sans); font-size: 10px; font-weight: 600; color: rgba(255,255,255,0.6); }
.skill-bar-bg { height: 5px; background: rgba(255,255,255,0.1); border-radius: 3px; }
.skill-bar-fill { height: 100%; border-radius: 3px; }
.title-section { margin-top: 16px; }
.title-label-sm { font-size: 10px; color: rgba(255,255,255,0.4); letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 8px; }
.title-badges { display: flex; gap: 8px; flex-wrap: wrap; }
.title-badge {
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-sm); padding: 8px 12px;
  display: flex; align-items: center; gap: 8px;
  font-size: 10px; color: rgba(255,255,255,0.75);
}
.title-badge-icon { font-size: 14px; }

.skillmap-text h2 { font-size: clamp(24px, 3vw, 36px); margin-bottom: 16px; line-height: 1.35; }
.skillmap-text p { font-size: 15px; color: var(--ink-light); line-height: 1.9; margin-bottom: 24px; }

/* ── PROJECTS (案件) ── */
#projects-app { border-bottom: 1px solid var(--border); }
.projects-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.project-list-visual {
  display: flex; flex-direction: column; gap: 16px;
}
.project-item-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); transition: box-shadow 0.2s, transform 0.2s;
}
.project-item-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.project-img-placeholder {
  height: 100px; display: flex; align-items: center; justify-content: center;
  font-size: 28px; position: relative; overflow: hidden;
}
.project-img-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, transparent 40%, rgba(0,0,0,0.6));
}
.project-item-body { padding: 14px 16px; }
.project-item-company { font-size: 11px; color: var(--ink-faint); margin-bottom: 4px; }
.project-item-title { font-family: var(--sans); font-size: 13px; font-weight: 700; color: var(--ink); line-height: 1.45; margin-bottom: 6px; }
.project-item-desc { font-size: 12px; color: var(--ink-light); line-height: 1.65; }
.project-tag-row { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.project-tag {
  font-family: var(--sans); font-size: 10px; font-weight: 600;
  color: var(--accent); background: var(--accent-light);
  padding: 2px 8px; border-radius: 100px;
}

.projects-text h2 { font-size: clamp(24px, 3vw, 36px); margin-bottom: 16px; line-height: 1.35; }
.projects-text p { font-size: 15px; color: var(--ink-light); line-height: 1.9; margin-bottom: 24px; }

/* ── DOWNLOAD CTA ── */
#download {
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 50%, #4a2d7a 100%);
  text-align: center; padding: 96px 48px;
}
.download-label {
  font-family: var(--sans); font-size: 12px; font-weight: 600;
  letter-spacing: 0.15em; color: rgba(255,255,255,0.6);
  text-transform: uppercase; margin-bottom: 20px;
}
.download-h2 {
  font-family: var(--sans); font-size: clamp(28px, 4vw, 44px);
  font-weight: 700; color: #fff; line-height: 1.25;
  margin-bottom: 16px; letter-spacing: -0.01em;
}
.download-desc { font-size: 16px; color: rgba(255,255,255,0.65); line-height: 1.85; margin-bottom: 40px; }
.download-btns { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.btn-download {
  display: inline-flex; align-items: center; gap: 10px;
  background: #fff; color: var(--ink); text-decoration: none;
  font-family: var(--sans); font-size: 14px; font-weight: 700;
  padding: 14px 28px; border-radius: var(--radius-sm);
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}
.btn-download:hover { background: var(--accent-lighter); transform: translateY(-1px); box-shadow: 0 6px 24px rgba(0,0,0,0.2); }
.btn-download-outline {
  display: inline-flex; align-items: center; gap: 10px;
  border: 2px solid rgba(255,255,255,0.4); color: #fff; text-decoration: none;
  font-family: var(--sans); font-size: 14px; font-weight: 600;
  padding: 14px 28px; border-radius: var(--radius-sm);
  transition: all 0.2s;
}
.btn-download-outline:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.7); }

.btn-secondary.is-disabled,
.btn-download-outline.is-disabled {
  cursor: not-allowed; opacity: 0.55;
  pointer-events: none;
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .back-link { padding: 32px 24px 0; }
  .app-hero { padding: 40px 24px 60px; }
  .app-hero-inner { grid-template-columns: 1fr; }
  .screenshots-mosaic {
    grid-template-columns: 1fr;
    max-width: 220px;
    margin: 32px auto 0;
  }
  .screenshots-mosaic .screenshot-frame:nth-child(n+2) {
    display: none;
  }
  section { padding: 64px 24px; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .quiz-layout, .ranking-layout, .skillmap-layout, .projects-layout { grid-template-columns: 1fr; }
  .courses-grid { grid-template-columns: 1fr; }
  #download { padding: 64px 24px; }
}

@media (max-width: 500px) {
  .back-link { padding: 24px 16px 0; }
  .app-hero { padding: 32px 16px 48px; }
  section { padding: 48px 16px; }
  .features-grid { grid-template-columns: 1fr; }
  #download { padding: 48px 16px; }
}
