/* ───  DNA Experiences — PERFIL PAGE STYLES ──────────────────────────────────────── */

body { background: var(--white); color: var(--ink); }

/* ─── PROFILE HERO ─── */
.profile-hero {
  margin-top: 58px;
  background: linear-gradient(135deg, #0A1628 0%, #1D3461 60%, #1a4090 100%);
  padding: 48px 5vw 0;
  position: relative; overflow: hidden;
}
.profile-hero::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 80% 50%, rgba(18,175,240,.18) 0%, transparent 60%),
              radial-gradient(circle at 20% 80%, rgba(169,238,59,.1) 0%, transparent 50%);
}
.profile-hero-inner {
  max-width: 1100px; margin: 0 auto;
  display: grid; grid-template-columns: auto 1fr auto;
  align-items: end; gap: 28px; position: relative; z-index: 1;
}
.profile-avatar-wrap { position: relative; flex-shrink: 0; }
.profile-avatar-img {
  width: 100px; height: 100px; border-radius: 50%;
  border: 3px solid rgba(18,175,240,.5);
  object-fit: cover; display: block;
  box-shadow: 0 8px 32px rgba(0,0,0,.3);
}
.profile-verified {
  position: absolute; bottom: 4px; right: 4px;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--dna-cyan); border: 2px solid #0A1628;
  display: flex; align-items: center; justify-content: center; font-size: 12px;
}
.profile-meta { padding-bottom: 24px; }
.profile-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(18,175,240,.15); border: 1px solid rgba(18,175,240,.3);
  border-radius: 20px; padding: 4px 12px; margin-bottom: 10px;
}
.profile-badge span { font-size: .72rem; font-weight: 700; color: var(--dna-cyan); letter-spacing: .08em; text-transform: uppercase; }
.profile-name { font-size: 1.9rem; font-weight: 900; color: #FFF; letter-spacing: -0.04em; line-height: 1.1; }
.profile-sub  { font-size: .85rem; color: rgba(255,255,255,.55); margin-top: 6px; font-weight: 400; }
.profile-stats-row { display: flex; gap: 20px; margin-top: 16px; flex-wrap: wrap; }
.profile-stat { display: flex; flex-direction: column; gap: 2px; }
.profile-stat-val { font-size: 1.1rem; font-weight: 800; color: #fff; letter-spacing: -.02em; }
.profile-stat-lbl { font-size: .7rem; color: rgba(255,255,255,.45); font-weight: 500; text-transform: uppercase; letter-spacing: .06em; }
.profile-score-wrap { display: flex; flex-direction: column; align-items: center; gap: 8px; padding-bottom: 24px; }
.score-ring-cont { position: relative; width: 90px; height: 90px; }
.score-ring-svg { width: 90px; height: 90px; transform: rotate(-90deg); }
.score-ring-bg { fill: none; stroke: rgba(255,255,255,.1); stroke-width: 8; }
.score-ring-fg { fill: none; stroke: var(--dna-lime); stroke-width: 8; stroke-linecap: round; stroke-dasharray: 226; stroke-dashoffset: 49; }
.score-ring-num { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); font-size: 1.4rem; font-weight: 900; color: #fff; letter-spacing: -.04em; }
.score-ring-text { font-size: .68rem; font-weight: 700; color: rgba(255,255,255,.6); text-transform: uppercase; letter-spacing: .06em; text-align: center; }

/* ─── THEME TABS ─── */
.theme-tabs-wrap { position: sticky; top: 58px; z-index: 100; background: var(--white); border-bottom: 1px solid var(--line); box-shadow: 0 2px 12px rgba(29,52,97,.05); overflow: hidden; }
.theme-tabs-wrap::after {
  content: ''; position: absolute; top: 0; right: 0; bottom: 0; width: 44px;
  background: linear-gradient(to right, transparent, var(--white));
  pointer-events: none; z-index: 1;
}
.theme-tabs { max-width: 1100px; margin: 0 auto; display: flex; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.theme-tabs::-webkit-scrollbar { display: none; }
.tab-btn {
  flex-shrink: 0; padding: 14px 22px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: .82rem; font-weight: 700; color: var(--ink-pale);
  background: none; border: none; border-bottom: 3px solid transparent;
  cursor: pointer; white-space: nowrap; transition: all .2s;
  display: flex; align-items: center; gap: 6px;
}
.tab-btn:hover { color: var(--ink); }
.tab-btn.active { color: var(--dna-cyan); border-bottom-color: var(--dna-cyan); }
.tab-btn .tab-icon { font-size: 1rem; }

/* ─── CONTENT AREA ─── */
.content-wrap { max-width: 1100px; margin: 0 auto; padding: 40px 5vw 80px; }
.theme-panel { display: none; }
.theme-panel.active { display: block; }

/* ─── THEME HEADER ─── */
.theme-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 36px; flex-wrap: wrap; gap: 16px; }
.theme-eyebrow { font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--dna-cyan); margin-bottom: 4px; }
.theme-big-title { font-size: 2rem; font-weight: 900; letter-spacing: -.04em; color: var(--dna-head); line-height: 1.1; }
.theme-big-title em { font-style: normal; color: var(--dna-cyan); }
.theme-summary-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.theme-pill { display: flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 50px; font-size: .76rem; font-weight: 700; }
.theme-pill.lime { background: var(--dna-lime-s); color: #4a7a00; }
.theme-pill.cyan { background: var(--dna-cyan-s); color: #006fa8; }
.theme-pill.gray { background: var(--dna-card); color: var(--dna-text); }
.theme-score-badge { display: flex; flex-direction: column; align-items: center; background: var(--dna-card); border-radius: 16px; padding: 16px 20px; min-width: 100px; text-align: center; }
.tsb-num { font-size: 2rem; font-weight: 900; letter-spacing: -.04em; color: var(--dna-head); }
.tsb-lbl { font-size: .68rem; font-weight: 600; color: var(--dna-muted); text-transform: uppercase; letter-spacing: .06em; }
.tsb-bar { width: 60px; height: 4px; border-radius: 4px; background: var(--dna-border); margin-top: 6px; overflow: hidden; transition: width .6s ease; }
.tsb-bar-fill { height: 100%; border-radius: 4px; background: var(--dna-lime); transition: width .6s ease; }

/* ─── TOPIC SECTION ─── */
.topic-section { margin-bottom: 44px; }
.topic-header { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.topic-line { flex: 1; height: 1px; background: var(--dna-border); }
.topic-line-left { width: 24px; }
.topic-title { font-size: .88rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--dna-text); white-space: nowrap; }

/* ─── GENE CARDS ─── */
.gene-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.gene-card {
  background: var(--white); border: 1.5px solid var(--dna-border);
  border-radius: 16px; overflow: hidden;
  transition: box-shadow .2s, transform .2s; position: relative;
  animation: fadeUp .35s ease both;
}
.gene-card:nth-child(2) { animation-delay: .05s; }
.gene-card:nth-child(3) { animation-delay: .10s; }
.gene-card:nth-child(4) { animation-delay: .15s; }
.gene-card:nth-child(5) { animation-delay: .20s; }
.gene-card:nth-child(6) { animation-delay: .25s; }
.gene-card:hover { box-shadow: 0 8px 28px rgba(18,175,240,.12); transform: translateY(-2px); }
.gene-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; }
.gene-card.level-alta::before       { background: var(--dna-lime); }
.gene-card.level-moderada::before   { background: var(--dna-cyan); }
.gene-card.level-baja::before       { background: var(--dna-muted); }
.gene-card.level-intermedia::before { background: #FFD580; }
.gene-card.level-balance::before    { background: #A0C4FF; }

.gc-top    { display: flex; align-items: flex-start; gap: 14px; padding: 18px 18px 0 22px; }
.gc-chip   { flex-shrink: 0; background: var(--dna-cyan); border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; align-items: center; gap: 1px; min-width: 70px; }
.gc-chip-gene   { font-size: .65rem; font-weight: 800; color: #fff; letter-spacing: .04em; text-align: center; line-height: 1.2; }
.gc-chip-snp    { font-size: .6rem;  font-weight: 500; color: rgba(255,255,255,.75); text-align: center; }
.gc-chip-allele { font-size: .9rem;  font-weight: 900; color: #fff; letter-spacing: .06em; margin-top: 4px; line-height: 1; }
.gc-content { flex: 1; min-width: 0; }
.gc-result  { font-size: .92rem; font-weight: 800; color: var(--dna-head); line-height: 1.3; margin-bottom: 4px; }
.gc-level-pill { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 20px; font-size: .65rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 10px; }
.level-alta       .gc-level-pill { background: var(--dna-lime-s); color: #4a7a00; }
.level-moderada   .gc-level-pill { background: var(--dna-cyan-s); color: #006fa8; }
.level-baja       .gc-level-pill { background: var(--dna-card);   color: var(--dna-muted); }
.level-intermedia .gc-level-pill { background: #FFF8E7; color: #8B6000; }
.level-balance    .gc-level-pill { background: #EEF3FF; color: #2B6CF5; }
.gc-divider { margin: 12px 22px 0; height: 1px; background: var(--dna-border); }
.gc-bottom  { padding: 12px 18px 14px 22px; }
.gc-desc-label { font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--dna-muted); margin-bottom: 5px; }
.gc-desc       { font-size: .83rem; color: var(--dna-text); line-height: 1.55; }
.gc-footer  { margin: 12px 18px 14px 22px; display: flex; align-items: center; justify-content: space-between; }
.gc-tus-res { display: inline-flex; align-items: center; gap: 6px; background: var(--dna-cyan); color: #fff; padding: 6px 14px; border-radius: 50px; font-size: .72rem; font-weight: 700; letter-spacing: .04em; cursor: default; }
.gc-tus-res .dot { width: 5px; height: 5px; border-radius: 50%; background: rgba(255,255,255,.5); }

/* ─── INSIGHT BOX ─── */
.theme-insight { background: linear-gradient(135deg, var(--dna-cyan-s), var(--dna-lime-s)); border: 1.5px solid rgba(18,175,240,.2); border-radius: 16px; padding: 20px 24px; margin-top: 28px; display: flex; align-items: flex-start; gap: 14px; }
.ti-icon  { font-size: 1.8rem; flex-shrink: 0; margin-top: 2px; }
.ti-label { font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--dna-cyan); margin-bottom: 4px; }
.ti-body  { font-size: .88rem; color: var(--dna-text); line-height: 1.55; font-weight: 500; }

/* ─── DOWNLOAD BAR ─── */
.download-bar { background: linear-gradient(135deg, #0A1628, #1D3461); border-radius: 20px; padding: 28px 32px; display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 48px; flex-wrap: wrap; }
.dl-text h3 { font-size: 1.1rem; font-weight: 800; color: #fff; letter-spacing: -.02em; margin-bottom: 4px; }
.dl-text p  { font-size: .82rem; color: rgba(255,255,255,.5); }
.dl-btn { display: flex; align-items: center; gap: 8px; background: var(--dna-cyan); color: #fff; padding: 12px 24px; border-radius: 12px; font-family: 'Plus Jakarta Sans', sans-serif; font-size: .88rem; font-weight: 800; border: none; cursor: pointer; transition: opacity .2s; white-space: nowrap; text-decoration: none; }
.dl-btn:hover { opacity: .85; }

/* ─── RESPONSIVE ─── */
@media (max-width: 768px) {
  /* ── Hero ── */
  .profile-hero-inner { grid-template-columns: auto 1fr; grid-template-rows: auto auto; }
  .profile-score-wrap {
    grid-column: 1 / -1; flex-direction: row; justify-content: flex-start;
    align-items: center; gap: 18px;
    padding-bottom: 18px; padding-top: 4px; margin-bottom: 0;
  }
  .score-ring-cont { width: 54px; height: 54px; flex-shrink: 0; }
  .score-ring-svg { width: 54px; height: 54px; }
  .score-ring-num { font-size: .9rem; }
  .score-ring-text { font-size: .58rem; text-align: left; }
  .profile-name { font-size: 1.45rem; }
  .profile-stats-row { gap: 14px; }

  /* ── Content ── */
  .theme-big-title { font-size: 1.5rem; }
  .gene-grid { grid-template-columns: 1fr; }
  .content-wrap { padding: 24px 16px 80px; }
  .theme-score-badge { display: none; }
  .download-bar { padding: 20px; }
  .dl-text h3 { font-size: 1rem; }
  .tab-btn { padding: 12px 16px; font-size: .78rem; }

  /* ── Gene cards: remove redundant label ── */
  .gc-desc-label { display: none; }
  .gc-tus-res { font-size: .65rem; padding: 4px 10px; }

  /* ── Navigation ── */
  .bottom-nav { display: block; }
  body { padding-bottom: calc(60px + env(safe-area-inset-bottom)); }
  .toast { bottom: calc(70px + env(safe-area-inset-bottom)); font-size: .75rem; padding: 10px 18px; }
}

@media (max-width: 480px) {
  .profile-avatar-img { width: 72px; height: 72px; }
  .profile-hero { padding: 28px 16px 0; }
  .profile-name { font-size: 1.25rem; }
  .profile-sub { font-size: .75rem; opacity: .75;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
  .profile-stats-row { gap: 10px; }
  .profile-stat-val { font-size: .95rem; }
  .profile-stat-lbl { font-size: .62rem; }
  .content-wrap { padding: 20px 14px 80px; }
  .tab-btn { padding: 10px 13px; font-size: .73rem; }
  .theme-big-title { font-size: 1.35rem; }
  .theme-header { margin-bottom: 24px; }
  .topic-section { margin-bottom: 32px; }
  .download-bar { flex-direction: column; gap: 14px; text-align: center; }
  .dl-btn { justify-content: center; }
  .theme-insight { padding: 16px 18px; gap: 10px; }
}

@media (max-width: 375px) {
  .profile-hero { padding: 22px 12px 0; }
  .profile-avatar-img { width: 58px; height: 58px; }
  .profile-name { font-size: 1.1rem; }
  .profile-badge { padding: 3px 9px; }
  .profile-badge span { font-size: .6rem; }
  .score-ring-cont { width: 48px; height: 48px; }
  .score-ring-svg { width: 48px; height: 48px; }
  .score-ring-num { font-size: .82rem; }

  .tab-btn { padding: 10px 11px; font-size: .69rem; gap: 4px; }
  .tab-btn .tab-icon { font-size: .88rem; }

  .content-wrap { padding: 16px 12px 80px; }
  .theme-big-title { font-size: 1.2rem; }
  .theme-eyebrow { font-size: .65rem; }
  .theme-pill { font-size: .68rem; padding: 5px 10px; }

  .gc-top { padding: 14px 14px 0 16px; }
  .gc-bottom { padding: 10px 14px 12px 16px; }
  .gc-footer { margin: 10px 14px 12px 16px; }
  .gc-divider { margin: 10px 16px 0; }
  .gc-chip { min-width: 56px; padding: 6px 8px; }
  .gc-chip-allele { font-size: .8rem; }
  .gc-result { font-size: .85rem; }
  .gene-card { border-radius: 12px; }

  .download-bar { padding: 14px; border-radius: 14px; }
  .dl-text h3 { font-size: .88rem; }
  .dl-text p { font-size: .72rem; }
}

@media (prefers-reduced-motion: reduce) {
  .gene-card { animation: none; }
}
