﻿:root {
  --bb-blue: #3b62f1;
  --bb-green: #2ecc71;
  --bb-orange: #ff9800;
  --bb-red: #e74c3c;

  /* Default Accent (will be overridden) */
  --active-accent: var(--bb-green);
  --active-bg: rgba(46, 204, 113, 0.1);
  --active-border: rgba(46, 204, 113, 0.2);

  --card-bg: #111a21;
  --border-color: rgba(255, 255, 255, 0.08);
  --text-dim: #8fa3ad;
  --font-heading: 'Roboto', sans-serif;
  --font-body: 'Roboto', sans-serif;
}

/* Theme Classes */
.theme-ecto {
  --active-accent: var(--bb-orange);
  --active-bg: rgba(255, 152, 0, 0.1);
  --active-border: rgba(255, 152, 0, 0.2);
}

.theme-meso {
  --active-accent: var(--bb-green);
  --active-bg: rgba(46, 204, 113, 0.1);
  --active-border: rgba(46, 204, 113, 0.2);
}

.theme-endo {
  --active-accent: var(--bb-red);
  --active-bg: rgba(231, 76, 60, 0.1);
  --active-border: rgba(231, 76, 60, 0.2);
}

[data-theme="light"] {
  --card-bg: #ffffff;
  --border-color: rgba(15, 23, 42, 0.1);
  --text-dim: #718396;
}

[data-theme="light"] .quiz-card,
[data-theme="light"] .main-result-card,
[data-theme="light"] .comp-card {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.08);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

[data-theme="light"] .option-label {
  background: #f2f5f8;
  border-color: rgba(15, 23, 42, 0.08);
  color: #1f2937;
}

[data-theme="light"] .option-label:hover {
  background: #e9eef5;
  border-color: rgba(59, 98, 241, 0.28);
}

[data-theme="light"] .question-title,
[data-theme="light"] .res-main-title,
[data-theme="light"] .section-subtitle,
[data-theme="light"] .dist-info,
[data-theme="light"] .comp-card p,
[data-theme="light"] .expert-content p,
[data-theme="light"] .rec-card p {
  color: #1f2937;
}

[data-theme="light"] .res-description,
[data-theme="light"] .dist-title,
[data-theme="light"] .trait-item,
[data-theme="light"] .img-overlay-text {
  color: #5f7388;
}

[data-theme="light"] .dist-container,
[data-theme="light"] .rec-card {
  background: #f8fafc;
  border-color: rgba(15, 23, 42, 0.08);
}

[data-theme="light"] .dist-bar-bg {
  background: rgba(148, 163, 184, 0.28);
}

[data-theme="light"] .expert-bar {
  border-top-color: rgba(15, 23, 42, 0.08);
}

[data-theme="light"] .theme-ecto .expert-bar {
  background: #fff4e8;
}

[data-theme="light"] .theme-meso .expert-bar {
  background: #ecfdf3;
}

[data-theme="light"] .theme-endo .expert-bar {
  background: #fff0ee;
}

[data-theme="light"] .btn-retest {
  background: #ffffff;
  color: #334155;
  border-color: rgba(15, 23, 42, 0.1);
}

[data-theme="light"] .btn-retest:hover {
  background: #f8fafc;
}

[data-theme="light"] .compare-row .comp-card {
  background: #ffffff;
}

[data-theme="light"] #card-ecto.active {
  background: #fff7ed;
  border-color: rgba(249, 115, 22, 0.35);
}

[data-theme="light"] #card-meso.active {
  background: #ecfdf5;
  border-color: rgba(34, 197, 94, 0.35);
}

[data-theme="light"] #card-endo.active {
  background: #fff1f2;
  border-color: rgba(239, 68, 68, 0.35);
}

[data-theme="light"] #card-ecto p,
[data-theme="light"] #card-meso p,
[data-theme="light"] #card-endo p,
[data-theme="light"] .comp-card.active p {
  color: #475569;
  opacity: 1;
}

[data-theme="light"] .badge-current {
  color: #ffffff;
}

body {
  background: var(--bg-primary);
  font-family: 'Roboto', sans-serif !important;
}

#wrapper {
  width: 100%;
}

.main-content {
  width: auto;
  max-width: calc(100vw - var(--sidebar-width));
  padding: 0;
  box-sizing: border-box;
  overflow-x: hidden;
}


.bodypro-layout {
  display: grid;
  grid-template-columns: 460px 1fr;
  gap: 30px;
  width: auto;
  padding: 20px;
  max-width: 1400px;
  margin: 0 auto;
  align-items: start;
  box-sizing: border-box;
}

@media (max-width: 1200px) {
  .bodypro-layout {
    width: 100%;
    max-width: 100%;
    grid-template-columns: 1fr;
  }
}

/* Left: Quiz Area */
.quiz-column {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

.quiz-card {
  background: var(--bg-secondary);
  border-radius: 20px;
  border: 1px solid var(--border);
  padding: 28px;
  display: flex;
  flex-direction: column;
  height: fit-content;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.quiz-card:hover,
.main-result-card:hover,
.somato-card:hover {
  border-color: rgba(93, 184, 228, 0.2);
}

.bodypro-layout.results-view {
  max-width: 1400px;
}

/* On mobile/tablet, stack them. On PC, keep 2 columns but align better */
@media (max-width: 1200px) {
  .bodypro-layout.results-view {
    grid-template-columns: 1fr;
  }
}

.bodypro-layout.results-view .quiz-card {
  opacity: 1;
}

.bodypro-layout.results-view .quiz-card .quiz-header,
.bodypro-layout.results-view .quiz-card .question-title,
.bodypro-layout.results-view .quiz-card .options-stack,
.bodypro-layout.results-view .quiz-card .btn-next-quiz,
.bodypro-layout.results-view .quiz-card .btn-back-quiz,
.bodypro-layout.results-view .quiz-card .btn-finish {
  opacity: 0.45;
}

.bodypro-layout.results-view .quiz-card .option-label,
.bodypro-layout.results-view .quiz-card .btn-next-quiz,
.bodypro-layout.results-view .quiz-card .btn-back-quiz,
.bodypro-layout.results-view .quiz-card .btn-finish {
  pointer-events: none;
}

.bodypro-layout.results-view .quiz-card [data-embed-trigger] {
  pointer-events: auto;
  opacity: 1;
}

.quiz-actions-panel {
  display: none;
  background: var(--bg-secondary);
  border-radius: 20px;
  border: 1px solid var(--border);
  padding: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.bodypro-layout.results-view .quiz-actions-panel {
  display: block;
}

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

.quiz-counter {
  font-size: 13px;
  font-weight: 800;
  color: var(--bb-blue);
  background: rgba(59, 98, 241, 0.1);
  padding: 4px 12px;
  border-radius: 4px;
}

.question-title {
  font-size: 24px;
  font-weight: 900;
  margin-bottom: 24px;
  line-height: 1.3;
  color: white;
  white-space: normal !important;
  overflow: visible !important;
  display: block !important;
}

.options-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.option-label {
  background: #1c262f;
  border: 1px solid var(--border-color);
  padding: 16px 20px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  cursor: pointer;
  transition: all 0.2s;
}

.option-label:hover {
  border-color: var(--bb-blue);
  background: #25313d;
}

.option-label input {
  display: none;
}

.radio-circle {
  width: 18px;
  height: 18px;
  border: 2px solid var(--text-dim);
  border-radius: 50%;
  margin-right: 14px;
  flex-shrink: 0;
  position: relative;
}

.option-label.selected {
  border-color: var(--bb-blue);
  background: rgba(59, 98, 241, 0.05);
}

.option-label.selected .radio-circle {
  border-color: var(--bb-blue);
  background: var(--bb-blue);
}

/* Right: Final Results */
.result-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
}

.main-result-card {
  background: var(--bg-secondary);
  border-radius: 20px;
  border: 1px solid var(--border);
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  min-height: 600px;
  min-width: 0;
}

.res-header {
  padding: 30px 30px 0;
  position: relative;
}

.res-label-top {
  font-size: 14px;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--active-accent);
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.res-main-title {
  font-size: 56px;
  font-weight: 950;
  color: white;
  margin-bottom: 32px;
  line-height: 1;
}

.ideal-match-pill {
  position: absolute;
  top: 32px;
  right: 40px;
  background: var(--active-bg);
  color: var(--active-accent);
  padding: 6px 16px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  border: 1px solid var(--active-border);
}

/* 2-Column Result Content */
.res-content-grid {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 36px;
  padding: 0 30px 30px;
}

.res-image-card {
  width: 100%;
  background: var(--bg-input);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  position: relative;
  height: 440px;
  overflow: hidden;
}

.image-slider {
  width: 100%;
  height: 100%;
  position: relative;
}

.image-slider img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  transition: opacity 0.4s ease;
  background: #0d141a;
}

.image-slider img.active {
  opacity: 0.9;
  position: relative;
}

.img-overlay-text {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
  color: white;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  letter-spacing: 0.5px;
}

.pagination-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2c3e50;
  cursor: pointer;
  transition: all 0.3s ease;
}

.dot:hover {
  background: #3d5166;
}

.dot.active {
  width: 24px;
  border-radius: 4px;
  background: var(--active-accent);
}

/* Right Side: Traits & Recommendations */
.res-right-side {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.res-description {
  font-size: 15px;
  color: var(--text-dim);
  line-height: 1.6;
  margin-bottom: 24px;
  font-weight: 500;
}

/* Distribution Progress Bars */
.dist-container {
  margin-bottom: 32px;
  background: rgba(255, 255, 255, 0.03);
  padding: 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.dist-title {
  font-size: 11px;
  font-weight: 900;
  color: var(--text-dim);
  text-transform: uppercase;
  margin-bottom: 12px;
  letter-spacing: 1px;
}

.dist-row {
  margin-bottom: 8px;
}

.dist-info {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 4px;
  color: white;
}

.dist-bar-bg {
  height: 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
  overflow: hidden;
}

.dist-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.section-subtitle {
  font-size: 16px;
  font-weight: 800;
  color: white;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-subtitle::before {
  content: '';
  width: 4px;
  height: 20px;
  background: var(--active-accent);
  border-radius: 2px;
}

.traits-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 40px;
}

.trait-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  color: var(--text-dim);
  font-weight: 600;
}

.trait-item i {
  color: var(--active-accent);
  font-size: 18px;
}

.rec-cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.rec-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 20px;
  border-radius: 12px;
}

.rec-card h4 {
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--active-accent);
}

.rec-card p {
  font-size: 14px;
  line-height: 1.5;
  color: white;
  font-weight: 600;
}

/* Expert Bar */
.expert-bar {
  margin-top: auto;
  background: #111e26;
  padding: 24px 30px;
  display: flex;
  align-items: flex-start;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.theme-ecto .expert-bar {
  background: #261e11;
  border-top-color: rgba(255, 152, 0, 0.1);
}

.theme-meso .expert-bar {
  background: #112a1e;
  border-top-color: rgba(46, 204, 113, 0.1);
}

.theme-endo .expert-bar {
  background: #2a1111;
  border-top-color: rgba(231, 76, 60, 0.1);
}

.expert-text {
  display: flex;
  align-items: center;
  gap: 20px;
  flex: 1;
}

.expert-icon {
  width: 44px;
  height: 44px;
  background: var(--active-bg);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--active-accent);
  font-size: 20px;
}

.expert-content h5 {
  font-size: 12px;
  color: var(--active-accent);
  text-transform: uppercase;
  font-weight: 900;
  margin-bottom: 4px;
}

.expert-content p {
  font-size: 14px;
  color: white;
  font-weight: 600;
}

.btn-save-res {
  background: var(--active-accent);
  color: #111;
  border: none;
  padding: 14px 24px;
  border-radius: 10px;
  font-weight: 900;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-save-res:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.btn-save-res:active {
  transform: translateY(0);
}

.btn-retest {
  background: rgba(255, 255, 255, 0.05);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 14px 24px;
  border-radius: 10px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  margin-right: 12px;
}

/* Bottom Cards */
.compare-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.comp-card {
  background: #151e26;
  border: 1px solid var(--border-color);
  padding: 24px;
  border-radius: 20px;
  position: relative;
  transition: 0.3s;
}

.comp-card h4 {
  font-size: 12px;
  font-weight: 900;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Specific Card Colors */
#card-ecto h4 {
  color: var(--bb-orange);
}

#card-ecto h4::before {
  background: var(--bb-orange);
}

#card-meso h4 {
  color: var(--bb-green);
}

#card-meso h4::before {
  background: var(--bb-green);
}

#card-endo h4 {
  color: var(--bb-red);
}

#card-endo h4::before {
  background: var(--bb-red);
}

.comp-card h4::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.comp-card p {
  font-size: 14px;
  color: white;
  font-weight: 600;
  line-height: 1.4;
  opacity: 0.8;
}

/* Active State Colors */
#card-ecto.active {
  border-color: var(--bb-orange);
  background: #261e11;
}

#card-meso.active {
  border-color: var(--bb-green);
  background: #112a1e;
}

#card-endo.active {
  border-color: var(--bb-red);
  background: #2a1111;
}

.badge-current {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--active-accent);
  color: #111;
  font-size: 10px;
  font-weight: 900;
  padding: 4px 12px;
  border-radius: 99px;
  text-transform: uppercase;
  display: none;
}

.comp-card.active .badge-current {
  display: block;
}

/* States */
.res-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 600px;
  text-align: center;
  color: var(--text-dim);
}

.res-active-ui {
  display: none;
}

.btn-finish {
  flex: 1;
  background: var(--bb-blue);
  color: white;
  padding: 16px;
  border-radius: 12px;
  font-weight: 900;
  font-size: 16px;
  border: none;
  cursor: pointer;
}

.btn-nav-row {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.btn-nav-row--stack {
  display: grid;
  grid-template-columns: 1fr;
}

.btn-back-quiz {
  background: #1c262f;
  color: white;
  padding: 16px;
  border-radius: 12px;
}


.btn-next-quiz {
  flex: 1;
  background: var(--bb-blue);
  color: white;
  padding: 16px;
  border-radius: 12px;
  font-weight: 800;
  border: none;
  cursor: pointer;
  font-size: 16px;
}

.quiz-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
}

.quiz-actions .btn-retest,
.quiz-actions .btn-save-res,
.quiz-actions .btn-embed-res {
  width: 100%;
  justify-content: center;
  margin-right: 0;
}

.btn-embed-res {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(59, 98, 241, 0.12);
  color: #dfeeff;
  border: 1px solid rgba(59, 98, 241, 0.24);
  padding: 14px 24px;
  border-radius: 10px;
  font-weight: 800;
  cursor: pointer;
  opacity: 1;
  appearance: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-embed-res:hover {
  transform: translateY(-2px);
  border-color: rgba(59, 98, 241, 0.4);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-embed-res:disabled {
  opacity: 1;
  cursor: pointer;
  filter: none;
}

.embed-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(5, 10, 18, 0.72);
  z-index: 9999;
}

.embed-modal.is-open {
  display: flex;
}

.embed-dialog {
  width: min(720px, 100%);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}

.embed-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 22px 24px 16px;
  border-bottom: 1px solid var(--border);
}

.embed-dialog-head h3 {
  margin: 0;
  color: var(--text-primary);
  font-size: 20px;
  font-weight: 900;
}

.embed-dialog-close {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  cursor: pointer;
}

.embed-dialog-body {
  padding: 20px 24px 24px;
}

.embed-dialog-body p {
  margin: 0 0 14px;
  color: var(--text-dim);
  line-height: 1.6;
}

.embed-code-box {
  width: 100%;
  min-height: 160px;
  resize: vertical;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.2);
  color: var(--text-primary);
  padding: 16px;
  font: 13px/1.6 Consolas, Monaco, monospace;
}

.embed-dialog-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
}

.embed-copy-btn {
  border: none;
  background: var(--bb-blue);
  color: white;
  padding: 14px 18px;
  border-radius: 12px;
  font-weight: 900;
  cursor: pointer;
}

.embed-copy-status {
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 700;
}

@media (max-width: 768px) {
  .main-content {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
  }



  .bodypro-layout {
    width: 100%;
    max-width: 100%;
    padding: 16px;
    gap: 20px;
    grid-template-columns: 1fr;
  }

  .quiz-card {
    padding: 20px;
  }

  .res-header {
    padding: 24px 24px 0;
  }

  .ideal-match-pill {
    position: static;
    display: inline-flex;
    margin-top: 12px;
  }

  .res-main-title {
    font-size: clamp(40px, 14vw, 64px);
    line-height: 0.95;
    overflow-wrap: anywhere;
  }

  .main-result-card {
    min-height: auto;
  }

  .res-empty-state {
    min-height: 320px;
  }

  .res-content-grid {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 0 24px 24px;
  }

  .res-left-col,
  .res-right-side,
  .dist-container,
  .rec-card,
  .comp-card {
    min-width: 0;
  }

  .res-image-card {
    height: min(72vw, 420px);
  }

  .rec-cards-grid,
  .compare-row {
    grid-template-columns: 1fr;
  }

  .expert-bar {
    padding: 20px 24px;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .expert-text {
    width: 100%;
  }

  .quiz-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
  }

  .btn-retest,
  .btn-save-res,
  .btn-embed-res {
    width: 100%;
    justify-content: center;
    margin-right: 0;
  }

  .embed-dialog-actions {
    flex-direction: column;
    align-items: stretch;
  }
}

.bodytype-shell {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
  overflow-x: hidden;
}