/* === TrendsOn Presentations — Shared Styles === */
/* Identity: #e76066 coral | #242426 dark bg | Nunito font */

@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;900&display=swap');

:root {
  --primary:    #e76066;
  --primary-lt: #ef8f93;
  --primary-dk: #d04a50;
  --bg:         #242426;
  --surface:    #1a1a1a;
  --surface2:   #252527;
  --border:     #333;
  --text:       #ffffff;
  --muted:      #b0b0b0;
  --accent:     #fbf7f2;
  --green:      #4caf73;
  --blue:       #4a9eff;
  --yellow:     #ffd54f;
  --font:       'Nunito', 'Arial Rounded MT Bold', sans-serif;
  --radius:     8px;
  --shadow:     0 2px 8px rgba(0,0,0,0.4);
  --slide-w:    1280px;
  --slide-h:    720px;
}

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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
}

/* ========== DECK SHELL ========== */
#deck {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
}

#deck-inner {
  position: relative;
  width: var(--slide-w);
  height: var(--slide-h);
  overflow: hidden;
}

/* Progress bar */
#progress-bar {
  position: fixed; top: 0; left: 0; height: 3px;
  background: var(--primary);
  transition: width 0.3s ease;
  z-index: 100;
}

/* Slide counter */
#slide-counter {
  position: fixed; bottom: 16px; right: 20px;
  font-size: 12px; color: var(--muted);
  letter-spacing: 0.05em;
  z-index: 100;
}

/* Nav arrows */
.nav-arrow {
  position: fixed; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  color: var(--muted);
  width: 40px; height: 60px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 18px;
  border-radius: 4px;
  transition: background 0.2s, color 0.2s;
  z-index: 99;
  user-select: none;
}
.nav-arrow:hover { background: rgba(231,96,102,0.15); color: var(--primary); }
#nav-prev { left: 8px; }
#nav-next { right: 8px; }

/* ========== SLIDES ========== */
.slide {
  position: absolute; inset: 0;
  width: var(--slide-w); height: var(--slide-h);
  padding: 48px 64px;
  display: flex; flex-direction: column;
  background: var(--bg);
  opacity: 0; pointer-events: none;
  transition: opacity 0.4s ease;
  overflow: hidden;
}
.slide.active { opacity: 1; pointer-events: auto; }

.slide-title {
  font-size: clamp(20px, 2.2vw, 30px);
  font-weight: 900;
  color: var(--accent);
  margin-bottom: 24px;
  border-bottom: 2px solid var(--primary);
  padding-bottom: 10px;
  flex-shrink: 0;
}

.slide-period {
  font-size: 13px; color: var(--muted);
  margin-top: -16px; margin-bottom: 16px;
}
.slide-annotation {
  font-size: 12px; color: var(--muted);
  margin-top: auto; padding-top: 12px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

/* ========== COVER ========== */
.slide-cover {
  align-items: center; justify-content: center;
  background: radial-gradient(ellipse at 60% 40%, #1e1010 0%, var(--bg) 70%);
}
.cover-inner { text-align: center; }
.cover-logo { height: 60px; margin-bottom: 24px; filter: brightness(1.1); }
.cover-badge {
  display: inline-block;
  background: var(--primary); color: #fff;
  font-size: 12px; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  padding: 4px 14px; border-radius: 2px;
  margin-bottom: 20px;
}
.cover-title {
  font-size: clamp(32px, 4vw, 56px);
  font-weight: 900; color: var(--text);
  line-height: 1.1; margin-bottom: 12px;
}
.cover-subtitle { font-size: 18px; color: var(--muted); margin-bottom: 8px; }
.cover-period { font-size: 14px; color: var(--primary); font-weight: 600; }

/* ========== SECTION DIVIDER ========== */
.slide-divider {
  align-items: center; justify-content: center;
  background: radial-gradient(ellipse at 50% 50%, #1e0e0f 0%, var(--bg) 65%);
}
.divider-inner { text-align: center; }
.divider-line { width: 80px; height: 3px; background: var(--primary); margin: 16px auto; border-radius: 2px; }
.divider-title { font-size: clamp(28px, 4vw, 52px); font-weight: 900; color: var(--accent); }
.divider-subtitle { font-size: 16px; color: var(--muted); margin-top: 12px; }

/* ========== KPI GRID ========== */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
  flex: 1;
  align-content: start;
}
.kpi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 16px;
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
}
.kpi-value {
  font-size: clamp(22px, 2.5vw, 34px);
  font-weight: 900; color: var(--primary);
  line-height: 1;
}
.kpi-label { font-size: 12px; color: var(--muted); margin-top: 6px; font-weight: 600; }

/* ========== INFLUENCERS GRID ========== */
.inf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px; flex: 1; align-content: start;
}
.inf-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 16px;
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
}
.inf-photo-wrap {
  width: 80px; height: 80px;
  border-radius: 50%; overflow: hidden;
  border: 2px solid var(--primary);
  margin-bottom: 12px; flex-shrink: 0;
}
.inf-photo { width: 100%; height: 100%; object-fit: cover; }
.inf-name { font-weight: 700; font-size: 14px; color: var(--accent); }
.inf-stats { margin-top: 8px; display: flex; flex-direction: column; gap: 4px; }
.inf-stat { font-size: 12px; color: var(--muted); }
.inf-stat strong { color: var(--text); }
.inf-cpa { margin-top: 10px; font-size: 13px; color: var(--muted); }
.inf-cpa strong { color: var(--primary); font-size: 15px; }

/* ========== DATA TABLE ========== */
.data-table {
  width: 100%; border-collapse: collapse;
  font-size: 13px;
}
.data-table th {
  background: var(--surface); color: var(--muted);
  font-weight: 700; font-size: 11px; text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 10px 12px; text-align: left;
  border-bottom: 2px solid var(--border);
}
.data-table td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}
.data-table tr:hover td { background: rgba(231,96,102,0.06); }
.row-highlight td { background: rgba(231,96,102,0.12) !important; }
.platform-badge {
  background: var(--surface2); color: var(--muted);
  font-size: 11px; padding: 2px 8px; border-radius: 3px;
  font-weight: 600; text-transform: uppercase;
}

/* ========== ANALYSIS LAYOUT ========== */
.analysis-layout {
  display: flex; gap: 32px; flex: 1; min-height: 0;
}
.analysis-blocks { flex: 1; display: flex; flex-direction: column; gap: 16px; overflow-y: auto; }
.analysis-block {
  background: var(--surface);
  border-left: 3px solid var(--primary);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 14px 18px;
}
.block-title { font-size: 14px; font-weight: 700; color: var(--primary); margin-bottom: 6px; }
.block-text { font-size: 13px; color: var(--muted); line-height: 1.6; }

/* ========== PERFORMANCE TABLE ========== */
.performance-wrap { display: flex; flex-direction: column; gap: 24px; flex: 1; overflow-y: auto; }
.perf-section {}
.perf-header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.perf-photo { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; border: 2px solid var(--primary); }
.perf-name { font-weight: 700; color: var(--accent); }

/* ========== CREATORS INSIGHTS ========== */
.insights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px; flex: 1; align-content: start;
}
.insight-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px; overflow: hidden;
}
.insight-header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.insight-photo { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; border: 2px solid var(--primary); }
.insight-handle { font-weight: 700; font-size: 14px; color: var(--accent); }
.insight-kpi { font-size: 13px; color: var(--muted); }
.insight-kpi strong { color: var(--primary); }
.insight-highlights { list-style: none; font-size: 12px; color: var(--muted); line-height: 1.7; margin-top: 8px; }
.insight-highlights li::before { content: '→ '; color: var(--primary); }
.insight-analysis { font-size: 12px; color: var(--muted); line-height: 1.6; margin-top: 8px; }

/* ========== SENTIMENT ========== */
.sentiment-layout { display: flex; gap: 32px; flex: 1; align-items: center; }
.sentiment-kpis { display: flex; flex-direction: column; gap: 16px; }
.sentiment-kpi { background: var(--surface); border-radius: var(--radius); padding: 16px 20px; }
.sentiment-kpi.positive { border-left: 4px solid var(--green); }
.sentiment-kpi.negative { border-left: 4px solid var(--primary); }
.sentiment-kpi.neutral  { border-left: 4px solid var(--muted); }
.sentiment-kpi.total    { border-left: 4px solid var(--border); }
.sent-value { display: block; font-size: 26px; font-weight: 900; color: var(--text); }
.sent-label { font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; }
.sent-count { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }

/* ========== COMMENTS ========== */
.comments-grid { display: flex; gap: 24px; flex: 1; }
.comments-col { flex: 1; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; }
.comments-col-title { font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 4px; }
.comments-col-title.positive { color: var(--green); }
.comments-col-title.negative { color: var(--primary); }
.comment-card { background: var(--surface); border-radius: var(--radius); padding: 12px 14px; }
.comment-card.comment-positive { border-left: 3px solid var(--green); }
.comment-card.comment-negative { border-left: 3px solid var(--primary); }
.comment-meta { display: flex; justify-content: space-between; margin-bottom: 6px; }
.comment-handle { font-size: 12px; color: var(--primary); font-weight: 600; }
.comment-likes { font-size: 11px; color: var(--muted); }
.comment-text { font-size: 13px; color: var(--muted); line-height: 1.5; font-style: italic; }

/* ========== GENDER ========== */
.gender-layout { display: flex; gap: 32px; flex: 1; align-items: flex-start; }
.gender-aggregate { display: flex; flex-direction: column; align-items: center; gap: 16px; flex-shrink: 0; }
.gender-legend { display: flex; flex-direction: column; gap: 8px; }
.gender-legend-item { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.gender-legend-item .legend-dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.gender-legend-item.female .legend-dot { background: var(--primary); }
.gender-legend-item.male   .legend-dot { background: var(--blue); }
.gender-creators { flex: 1; display: flex; flex-direction: column; gap: 12px; }
.gender-creator {}
.gender-creator-name { font-size: 13px; font-weight: 600; color: var(--accent); }
.gender-bar { display: flex; height: 16px; border-radius: 4px; overflow: hidden; margin: 6px 0 2px; }
.gender-seg.female { background: var(--primary); }
.gender-seg.male   { background: var(--blue); }
.gender-seg.other  { background: var(--muted); }
.gender-label-f, .gender-label-m { font-size: 11px; color: var(--muted); margin-right: 8px; }

/* ========== AGE ========== */
.age-layout { display: flex; gap: 32px; flex: 1; align-items: flex-start; }
.age-table { flex-shrink: 0; width: 220px; }

/* ========== ENGAGEMENT RANKING ========== */
.ranking-layout { display: flex; gap: 24px; flex: 1; min-height: 0; }
.ranking-table { font-size: 12px; }

/* ========== SCATTER ========== */
.scatter-layout { display: flex; gap: 24px; flex: 1; align-items: center; }
.scatter-legend { display: flex; flex-direction: column; gap: 10px; flex-shrink: 0; }
.scatter-legend-item { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.scatter-legend-item .legend-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.chart-scatter-wrap { flex: 1; }

/* ========== RANKING MATRIX ========== */
.slide-ranking-matrix .data-table { font-size: 14px; }

/* ========== CONCLUSIONS ========== */
.conclusions-text { font-size: 15px; color: var(--muted); margin-bottom: 20px; line-height: 1.7; }
.pillars-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 20px; flex: 1;
}
.pillar-card {
  background: var(--surface); border: 1px solid var(--border);
  border-top: 3px solid var(--primary);
  border-radius: var(--radius); padding: 20px;
}
.pillar-icon { font-size: 24px; margin-bottom: 10px; }
.pillar-title { font-size: 16px; font-weight: 700; color: var(--accent); margin-bottom: 8px; }
.pillar-text { font-size: 13px; color: var(--muted); line-height: 1.6; }
.pillar-metric { margin-top: 10px; font-size: 12px; color: var(--primary); font-weight: 600; }
.highlights-list { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.conclusion-highlight {
  display: flex; align-items: flex-start; gap: 10px;
  background: var(--surface); border-radius: var(--radius);
  padding: 12px 16px;
}
.hl-icon { font-size: 16px; flex-shrink: 0; }
.hl-text { font-size: 14px; color: var(--muted); line-height: 1.5; }

/* ========== NEXT STEPS ========== */
.next-pillars-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 20px; flex: 1;
}
.next-pillar {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px;
}
.next-pillar-badge {
  display: inline-block;
  background: var(--primary); color: #fff;
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; padding: 3px 10px; border-radius: 2px;
  margin-bottom: 10px;
}
.next-pillar-title { font-size: 16px; font-weight: 700; color: var(--accent); margin-bottom: 8px; }
.next-pillar-text  { font-size: 13px; color: var(--muted); line-height: 1.6; }
.next-pillar-creator { display: block; margin-top: 10px; font-size: 12px; color: var(--primary); font-weight: 600; }
.steps-list { display: flex; flex-direction: column; gap: 14px; flex: 1; }
.step-item {
  display: flex; gap: 16px; align-items: flex-start;
  background: var(--surface); border-radius: var(--radius); padding: 14px 18px;
}
.step-number {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--primary); color: #fff;
  font-weight: 700; font-size: 13px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.step-title { font-size: 14px; font-weight: 700; color: var(--accent); margin-bottom: 4px; }
.step-text  { font-size: 13px; color: var(--muted); line-height: 1.5; }
.step-deadline { font-size: 11px; color: var(--primary); font-weight: 600; margin-top: 6px; display: block; }

/* ========== THANK YOU ========== */
.slide-thankyou {
  align-items: center; justify-content: center;
  background: radial-gradient(ellipse at 50% 40%, #1e0e0f 0%, var(--bg) 65%);
}
.thankyou-inner { text-align: center; }
.thankyou-logo  { height: 56px; margin-bottom: 28px; }
.thankyou-title { font-size: 52px; font-weight: 900; color: var(--text); }
.thankyou-subtitle { font-size: 16px; color: var(--muted); margin-top: 10px; }
.thankyou-contacts { margin-top: 28px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.thankyou-btn {
  display: inline-block;
  background: var(--primary); color: #fff;
  font-family: var(--font); font-weight: 700; font-size: 14px;
  padding: 12px 28px; border-radius: var(--radius);
  text-decoration: none;
  transition: background 0.2s;
}
.thankyou-btn:hover { background: var(--primary-dk); }
.thankyou-link { font-size: 13px; color: var(--muted); }
.thankyou-email { font-size: 13px; color: var(--muted); }

/* ========== BADGES ========== */
.badge {
  display: inline-block;
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; padding: 2px 8px; border-radius: 2px;
}
.badge-green  { background: rgba(76,175,115,0.2); color: var(--green); }
.badge-red    { background: rgba(231,96,102,0.2); color: var(--primary); }
.badge-yellow { background: rgba(255,213,79,0.2); color: var(--yellow); }

/* ========== CHARTS ========== */
.chart-wrap { display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.chart-bar-wrap { flex: 1; }

/* ========== HOME PAGE ========== */
.home-body {
  background: var(--bg); color: var(--text);
  font-family: var(--font);
  min-height: 100vh; padding: 0;
}
.home-header {
  display: flex; align-items: center; gap: 16px;
  padding: 24px 48px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.home-logo { height: 40px; }
.home-header h1 { font-size: 18px; font-weight: 700; color: var(--accent); }
.home-content { padding: 40px 48px; }
.home-section-title {
  font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--muted);
  margin-bottom: 16px; padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.home-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px; margin-bottom: 40px;
}
.home-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  transition: border-color 0.2s, transform 0.2s;
}
.home-card:hover { border-color: var(--primary); transform: translateY(-2px); }
.home-card-client { font-size: 11px; color: var(--primary); font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 6px; }
.home-card-title  { font-size: 16px; font-weight: 700; color: var(--accent); margin-bottom: 8px; }
.home-card-meta   { font-size: 12px; color: var(--muted); }
.home-card-btn {
  display: inline-block; margin-top: 14px;
  background: var(--primary); color: #fff;
  font-family: var(--font); font-weight: 700; font-size: 13px;
  padding: 8px 18px; border-radius: 4px;
  text-decoration: none;
  transition: background 0.2s;
}
.home-card-btn:hover { background: var(--primary-dk); }

/* Password gate */
#password-gate {
  position: fixed; inset: 0; background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
}
.pw-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 48px;
  text-align: center; max-width: 380px; width: 100%;
}
.pw-logo  { height: 48px; margin-bottom: 24px; }
.pw-title { font-size: 18px; font-weight: 700; color: var(--accent); margin-bottom: 8px; }
.pw-sub   { font-size: 13px; color: var(--muted); margin-bottom: 24px; }
.pw-input {
  width: 100%; padding: 12px 14px;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 4px; color: var(--text);
  font-family: var(--font); font-size: 15px;
  margin-bottom: 12px; outline: none;
  transition: border-color 0.2s;
}
.pw-input:focus { border-color: var(--primary); }
.pw-btn {
  width: 100%; padding: 12px;
  background: var(--primary); color: #fff;
  font-family: var(--font); font-weight: 700; font-size: 15px;
  border: none; border-radius: 4px; cursor: pointer;
  transition: background 0.2s;
}
.pw-btn:hover { background: var(--primary-dk); }
.pw-error { font-size: 12px; color: var(--primary); margin-top: 8px; display: none; }
