:root {
  --bg: #0d0d1a;
  --bg-card: #1a1a2e;
  --bg-card-hover: #222240;
  --pink: #ff6b9d;
  --pink-dim: rgba(255, 107, 157, 0.15);
  --pink-glow: rgba(255, 107, 157, 0.3);
  --red: #ff4757;
  --red-dim: rgba(255, 71, 87, 0.12);
  --yellow: #ffa502;
  --yellow-dim: rgba(255, 165, 2, 0.12);
  --green: #2ed573;
  --green-dim: rgba(46, 213, 115, 0.12);
  --text: #e8e8f0;
  --text-dim: #8888a8;
  --text-muted: #55557a;
  --border: rgba(255, 255, 255, 0.06);
  --border-pink: rgba(255, 107, 157, 0.2);
  --radius: 16px;
  --radius-sm: 10px;
}

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

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 16px;
  padding-bottom: 80px;
}

::selection {
  background: var(--pink);
  color: #fff;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.header {
  text-align: center;
  padding: 60px 24px 40px;
  position: relative;
  overflow: hidden;
}

.header::before {
  content: '';
  position: absolute;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--pink-glow) 0%, transparent 70%);
  opacity: 0.3;
  pointer-events: none;
}

.header-icon {
  font-size: 48px;
  margin-bottom: 16px;
  display: inline-block;
  animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.header h1 {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #fff 0%, var(--pink) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
}

.header .subtitle {
  font-size: 16px;
  color: var(--text-dim);
  font-weight: 400;
  max-width: 500px;
  margin: 0 auto 20px;
  line-height: 1.6;
}

/* Navigation */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13, 13, 26, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
  margin-bottom: 40px;
}

.nav-inner {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 0 24px;
  max-width: 848px;
  margin: 0 auto;
  align-items: center;
}

.nav-inner::-webkit-scrollbar { display: none; }

.nav-link {
  white-space: nowrap;
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 13px;
  color: var(--text-dim);
  text-decoration: none;
  transition: all 0.2s;
  border: 1px solid transparent;
}

.nav-link:hover, .nav-link.active {
  color: var(--pink);
  background: var(--pink-dim);
  border-color: var(--border-pink);
}

.nav-home {
  font-size: 18px;
  text-decoration: none;
  margin-right: 8px;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.nav-home:hover { opacity: 1; }

/* Sections */
.section {
  margin-bottom: 48px;
  animation: fadeIn 0.6s ease-out both;
}

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

.section-title {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.3px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-title .icon { font-size: 26px; }

.section-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

/* Cards */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 16px;
  transition: all 0.3s;
}

.card:hover {
  border-color: var(--border-pink);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.card-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 16px;
  color: #fff;
}

/* Dashboard Grid */
.dash-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.dash-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  text-decoration: none;
  color: var(--text);
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dash-card:hover {
  border-color: var(--border-pink);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(255, 107, 157, 0.1);
}

.dash-card .dash-icon {
  font-size: 36px;
}

.dash-card .dash-title {
  font-size: 18px;
  font-weight: 600;
  color: #fff;
}

.dash-card .dash-desc {
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.5;
}

.dash-card .dash-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 100px;
  width: fit-content;
}

.dash-badge.red { background: var(--red-dim); color: var(--red); }
.dash-badge.yellow { background: var(--yellow-dim); color: var(--yellow); }
.dash-badge.green { background: var(--green-dim); color: var(--green); }
.dash-badge.pink { background: var(--pink-dim); color: var(--pink); }

/* Profile Grid */
.profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.profile-stat {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px 16px;
  text-align: center;
  transition: all 0.2s;
}

.profile-stat:hover { border-color: var(--border-pink); }

.profile-stat .value {
  font-size: 28px;
  font-weight: 700;
  color: var(--pink);
  display: block;
  margin-bottom: 4px;
}

.profile-stat .label {
  font-size: 13px;
  color: var(--text-dim);
}

/* Tags */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  background: var(--pink-dim);
  border: 1px solid var(--border-pink);
  color: var(--pink);
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 13px;
  line-height: 1.4;
}

.tag.muted {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border);
  color: var(--text-dim);
}

/* Tables */
.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 14px;
}

.data-table th {
  text-align: left;
  padding: 12px 16px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  font-weight: 600;
}

.data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  line-height: 1.5;
}

.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: rgba(255, 255, 255, 0.02); }

/* Status badges */
.status {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.status.red { background: var(--red-dim); color: var(--red); border: 1px solid rgba(255, 71, 87, 0.25); }
.status.yellow { background: var(--yellow-dim); color: var(--yellow); border: 1px solid rgba(255, 165, 2, 0.25); }
.status.green { background: var(--green-dim); color: var(--green); border: 1px solid rgba(46, 213, 115, 0.25); }

/* Dynamics */
.dynamics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

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

.dynamics-item:hover { border-color: var(--border-pink); }
.dynamics-item .name { font-size: 13px; color: var(--text-dim); margin-bottom: 8px; }
.dynamics-item .values { display: flex; align-items: center; gap: 8px; font-size: 20px; font-weight: 700; }
.dynamics-item .arrow { font-size: 18px; }
.dynamics-item .old { color: var(--text-muted); font-weight: 400; font-size: 16px; }

/* Lists */
.checklist { list-style: none; padding: 0; }
.checklist li { padding: 10px 0; border-bottom: 1px solid var(--border); display: flex; gap: 12px; align-items: flex-start; font-size: 15px; }
.checklist li:last-child { border-bottom: none; }
.checklist .bullet { flex-shrink: 0; width: 8px; height: 8px; border-radius: 50%; margin-top: 8px; }
.checklist .bullet.pink { background: var(--pink); }
.checklist .bullet.green { background: var(--green); }

/* Supplement rows */
.supp-row { display: flex; align-items: flex-start; padding: 20px 0; border-bottom: 1px solid var(--border); gap: 16px; }
.supp-row:last-child { border-bottom: none; }
.supp-icon { width: 48px; height: 48px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0; }
.supp-info { flex: 1; }
.supp-name { font-weight: 600; font-size: 16px; color: #fff; margin-bottom: 4px; }
.supp-dose { font-size: 14px; color: var(--text-dim); line-height: 1.6; }
.supp-time { font-size: 12px; color: var(--pink); font-weight: 500; white-space: nowrap; padding-top: 2px; }
.supp-source { font-size: 13px; color: var(--pink); margin-top: 8px; line-height: 1.6; }
.supp-photo { margin-top: 12px; border-radius: var(--radius-sm); border: 1px solid var(--border); max-width: 300px; }

/* Timeline */
.timeline { position: relative; padding-left: 32px; }
.timeline::before { content: ''; position: absolute; left: 8px; top: 0; bottom: 0; width: 2px; background: linear-gradient(to bottom, var(--pink), var(--pink-dim), transparent); }
.timeline-item { position: relative; padding: 12px 0 12px 16px; }
.timeline-item::before { content: ''; position: absolute; left: -28px; top: 18px; width: 10px; height: 10px; border-radius: 50%; background: var(--pink); border: 2px solid var(--bg); box-shadow: 0 0 0 3px var(--pink-dim); }
.timeline-time { font-size: 14px; font-weight: 700; color: var(--pink); margin-bottom: 4px; }
.timeline-text { font-size: 14px; color: var(--text-dim); line-height: 1.6; }

/* Food columns */
.food-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.food-block { background: rgba(255, 255, 255, 0.03); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 20px; }
.food-block h4 { font-size: 14px; font-weight: 600; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.food-block ul { list-style: none; padding: 0; }
.food-block li { padding: 4px 0; font-size: 14px; color: var(--text-dim); line-height: 1.6; }
.food-block li::before { content: '\b7'; margin-right: 8px; color: var(--text-muted); font-weight: 700; }
.remove-block h4 { color: var(--red); }
.add-block h4 { color: var(--green); }

/* Meal cards */
.meal-card { background: rgba(255, 255, 255, 0.03); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 20px; margin-bottom: 12px; }
.meal-card h4 { font-size: 15px; font-weight: 600; margin-bottom: 10px; color: var(--pink); }
.meal-card p { font-size: 14px; color: var(--text-dim); line-height: 1.7; }

/* Day tabs for meal plan */
.day-tabs { display: flex; gap: 8px; margin-bottom: 24px; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
.day-tabs::-webkit-scrollbar { display: none; }
.day-tab { padding: 8px 16px; border-radius: 100px; font-size: 14px; font-weight: 500; cursor: pointer; border: 1px solid var(--border); background: transparent; color: var(--text-dim); transition: all 0.2s; white-space: nowrap; }
.day-tab:hover { border-color: var(--border-pink); color: var(--pink); }
.day-tab.active { background: var(--pink-dim); border-color: var(--border-pink); color: var(--pink); }
.day-plan { display: none; }
.day-plan.active { display: block; }

/* Training blocks */
.train-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.train-block { border-radius: var(--radius-sm); padding: 20px; border: 1px solid var(--border); }
.train-block.allowed { background: var(--green-dim); border-color: rgba(46, 213, 115, 0.15); }
.train-block.forbidden { background: var(--red-dim); border-color: rgba(255, 71, 87, 0.15); }
.train-block h4 { font-size: 15px; font-weight: 600; margin-bottom: 12px; }
.train-block.allowed h4 { color: var(--green); }
.train-block.forbidden h4 { color: var(--red); }
.train-block ul { list-style: none; padding: 0; }
.train-block li { padding: 3px 0; font-size: 14px; color: var(--text-dim); }

/* Test groups */
.test-group { margin-bottom: 20px; }
.test-group-title { font-size: 14px; font-weight: 600; color: var(--pink); margin-bottom: 10px; padding-bottom: 6px; border-bottom: 1px solid var(--border); }
.test-group ul { list-style: none; padding: 0; }
.test-group li { padding: 5px 0; font-size: 14px; color: var(--text-dim); padding-left: 16px; position: relative; }
.test-group li::before { content: ''; position: absolute; left: 0; top: 12px; width: 6px; height: 6px; border-radius: 50%; background: var(--text-muted); }

/* Normal values */
.normal-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.normal-item { background: rgba(46, 213, 115, 0.05); border: 1px solid rgba(46, 213, 115, 0.1); border-radius: var(--radius-sm); padding: 14px 16px; font-size: 14px; display: flex; align-items: center; gap: 10px; }
.normal-item .check { color: var(--green); font-size: 16px; flex-shrink: 0; }
.normal-item .n-name { font-weight: 500; color: var(--text); }
.normal-item .n-val { color: var(--text-dim); font-size: 13px; }

/* Skin care steps */
.skin-step { display: flex; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--border); align-items: flex-start; }
.skin-step:last-child { border-bottom: none; }
.skin-num { width: 36px; height: 36px; border-radius: 12px; background: var(--pink-dim); color: var(--pink); display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; flex-shrink: 0; }
.skin-text { font-size: 14px; color: var(--text-dim); line-height: 1.7; }
.skin-text strong { color: var(--text); font-weight: 600; }

/* Recipe card */
.recipe-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; margin-bottom: 16px; }
.recipe-card h4 { font-size: 16px; font-weight: 600; color: #fff; margin-bottom: 12px; }
.recipe-card .recipe-meta { display: flex; gap: 16px; margin-bottom: 14px; }
.recipe-card .meta-tag { font-size: 12px; color: var(--text-dim); background: rgba(255, 255, 255, 0.04); padding: 4px 10px; border-radius: 100px; }
.recipe-card ol, .recipe-card ul { padding-left: 20px; color: var(--text-dim); font-size: 14px; line-height: 1.8; }
.recipe-card .ingredients { margin-bottom: 12px; }
.recipe-card .ingredients li { padding: 2px 0; }

/* Notes */
.note { background: var(--pink-dim); border-left: 3px solid var(--pink); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; padding: 16px 20px; font-size: 14px; color: var(--text-dim); margin: 16px 0; line-height: 1.7; }
.note strong { color: var(--pink); }
.warning-note { background: var(--red-dim); border-left: 3px solid var(--red); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; padding: 16px 20px; font-size: 14px; color: var(--text-dim); margin: 16px 0; line-height: 1.7; }
.warning-note strong { color: var(--red); }

/* Footer */
.footer { text-align: center; padding: 60px 24px 40px; border-top: 1px solid var(--border); margin-top: 60px; }
.footer p { font-size: 13px; color: var(--text-muted); line-height: 1.8; max-width: 600px; margin: 0 auto; }
.footer .back-link { display: inline-block; margin-bottom: 20px; color: var(--pink); text-decoration: none; font-size: 14px; }
.footer .back-link:hover { text-decoration: underline; }

/* Responsive */
@media (max-width: 600px) {
  .header h1 { font-size: 28px; }
  .section-title { font-size: 22px; }
  .profile-grid { grid-template-columns: repeat(2, 1fr); }
  .dynamics-grid { grid-template-columns: 1fr; }
  .card { padding: 20px; }
  .data-table { font-size: 13px; }
  .data-table td, .data-table th { padding: 10px; }
  .normal-grid { grid-template-columns: 1fr; }
  .food-columns { grid-template-columns: 1fr; }
  .train-grid { grid-template-columns: 1fr; }
  .dash-grid { grid-template-columns: 1fr; }
  .supp-row { flex-direction: column; }
  .supp-time { align-self: flex-start; }
}

/* Scroll animations */
.reveal { opacity: 0; transform: translateY(24px); transition: all 0.7s cubic-bezier(0.16, 1, 0.3, 1); }
.reveal.visible { opacity: 1; transform: translateY(0); }
