/* Traits v5.1 — Frosted Glass Edition */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');

:root {
  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.15);
  --glass-hover: rgba(255, 255, 255, 0.1);
  --shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.15);
  --shadow-lg: 0 12px 48px rgba(0, 0, 0, 0.2);
  --highlight-glow: 0 0 40px rgba(255, 255, 255, 0.15);
}

* { box-sizing: border-box; }

/* Video Background */
.traits-wrapper {
  position: relative;
  width: 100%;
  min-height: 100vh;
  overflow: hidden;
  padding: 60px 20px;
}

.traits-video-bg {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
  overflow: hidden;
}

.traits-video-bg video {
  position: absolute;
  top: 50%; left: 50%;
  min-width: 100%; min-height: 100%;
  transform: translate(-50%, -50%);
  object-fit: cover;
}

.traits-video-overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1;
}

/* Main container */
.traits {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  position: relative;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  color: white;
  z-index: 2;
}

.traits-header {
  text-align: center;
  padding: 0 20px 30px;
}

.traits-header h2 {
  font-size: clamp(32px, 5vw, 60px);
  font-weight: 600;
  color: white;
  margin: 0 0 16px;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
  animation: fadeInDown 0.8s ease;
}

.traits-header .lead {
  font-size: clamp(16px, 2vw, 20px);
  font-weight: 300;
  color: rgba(255, 255, 255, 0.95);
  max-width: 680px;
  margin: 0 auto;
  line-height: 1.6;
  animation: fadeInUp 0.8s ease 0.2s both;
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-30px); }
  to { opacity: 1; transform: translateY(0); }
}

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

/* Progress bar */
.traits-progressbar {
  max-width: 760px;
  margin: 0 auto 32px;
  height: 8px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  overflow: hidden;
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-sm);
}

.traits-progressbar .bar {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 1) 100%);
  border-radius: 12px;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
}

#traits-form {
  max-width: 760px;
  margin: 0 auto;
}

.traits-progress {
  text-align: center;
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 24px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.traits-steps {
  position: relative;
  min-height: 280px;
  margin-bottom: 24px;
}

/* Step cards */
.step {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  opacity: 0;
  transform: translateX(60px);
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.4s ease;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border-radius: 24px;
  padding: 40px 20px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--glass-border);
}

.step.active {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
  position: relative;
}

.step h3 {
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 600;
  color: white;
  margin: 0 0 32px;
  line-height: 1.4;
  text-align: center;
}

/* Likert scale */
.likert {
  list-style: none;
  padding: 0; margin: 0;
  display: grid;
  grid-template-columns: auto repeat(5, 64px) auto;
  justify-content: center;
  align-items: center;
  column-gap: 20px;
}

.likert li { margin: 0; }

.likert .label-left,
.likert .label-right {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.85);
  white-space: nowrap;
}

.likert .label-left { grid-column: 1; text-align: right; padding-right: 16px; }
.likert .label-right { grid-column: 7; text-align: left; padding-left: 16px; }

.likert li:not(.label-left):not(.label-right) { grid-row: 1; }
.likert li:nth-child(2) { grid-column: 2; }
.likert li:nth-child(3) { grid-column: 3; }
.likert li:nth-child(4) { grid-column: 4; }
.likert li:nth-child(5) { grid-column: 5; }
.likert li:nth-child(6) { grid-column: 6; }

.likert label {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px; height: 64px;
  border: 2px solid var(--glass-border);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 600;
  font-size: 20px;
  color: white;
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
}

.likert label:hover {
  border-color: rgba(255, 255, 255, 0.5);
  background: var(--glass-hover);
  transform: translateY(-4px) scale(1.05);
}

.likert input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0; height: 0;
}

.likert label:has(input:checked) {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(255, 255, 255, 0.95);
  color: #1e293b;
  transform: scale(1.15);
  box-shadow: 0 8px 32px rgba(255, 255, 255, 0.4);
}

/* Buttons */
.traits-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
}

.btn {
  padding: 14px 32px;
  font-size: 16px;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #ffffff;
  box-shadow: 
    0 8px 32px 0 rgba(255, 255, 255, 0.1),
    0 0 15px rgba(255, 255, 255, 0.1),
    inset 0 0 20px rgba(255, 255, 255, 0.1);
  text-decoration: none;
}

.btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 
    0 8px 40px 0 rgba(255, 255, 255, 0.2),
    0 0 25px rgba(255, 255, 255, 0.2),
    inset 0 0 30px rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.btn:disabled { opacity: 0.4; cursor: not-allowed; }

.btn.next, .btn.submit {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.5);
  font-weight: 700;
  box-shadow: 
    0 8px 32px 0 rgba(255, 255, 255, 0.15),
    0 0 20px rgba(255, 255, 255, 0.15),
    inset 0 0 25px rgba(255, 255, 255, 0.12);
}

.btn.next:hover, .btn.submit:hover {
  background: rgba(255, 255, 255, 0.35);
  box-shadow: 
    0 8px 40px 0 rgba(255, 255, 255, 0.25),
    0 0 30px rgba(255, 255, 255, 0.2),
    inset 0 0 35px rgba(255, 255, 255, 0.18);
}

/* ============================================
   RESULTS PAGE
   ============================================ */

#traits-result {
  max-width: 1000px;
  margin: 0 auto;
  animation: fadeIn 0.6s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.traits-result-inner {
  padding: 0 20px;
}

/* Result header */
.result-header {
  text-align: center;
  margin-bottom: 50px;
}

.result-header h1 {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 700;
  color: white;
  margin: 0;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

/* === PROFILE FAN LAYOUT === */
.profile-fan {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 0;
  margin-bottom: 50px;
  padding: 40px 0 20px;
  position: relative;
  min-height: 480px;
}

.fan-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 32px 24px;
  text-align: center;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.fan-card:hover {
  box-shadow: var(--shadow-lg);
}

/* Center card - primary (largest, on top) */
.fan-primary {
  width: 380px;
  z-index: 3;
  border: 2px solid rgba(140, 80, 255, 0.6);
  box-shadow: 
    0 0 30px rgba(140, 80, 255, 0.3),
    0 0 60px rgba(140, 80, 255, 0.15),
    0 0 100px rgba(140, 80, 255, 0.08),
    var(--shadow-lg);
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(0);
  order: 2;
}

.fan-primary:hover {
  transform: translateY(-8px);
  box-shadow: 
    0 0 40px rgba(140, 80, 255, 0.4),
    0 0 80px rgba(140, 80, 255, 0.2),
    0 0 120px rgba(140, 80, 255, 0.1),
    var(--shadow-lg);
}

/* Left card - secondary */
.fan-secondary {
  width: 310px;
  z-index: 2;
  transform: rotate(-6deg) translateX(20px) translateY(10px);
  order: 1;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.fan-secondary:hover {
  transform: rotate(0deg) translateX(10px) translateY(-12px) scale(1.04);
  z-index: 10;
  box-shadow: var(--shadow-lg), var(--highlight-glow);
  border-color: rgba(255, 255, 255, 0.35);
}

/* Right card - tertiary */
.fan-tertiary {
  width: 310px;
  z-index: 1;
  transform: rotate(6deg) translateX(-20px) translateY(10px);
  order: 3;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.fan-tertiary:hover {
  transform: rotate(0deg) translateX(-10px) translateY(-12px) scale(1.04);
  z-index: 10;
  box-shadow: var(--shadow-lg), var(--highlight-glow);
  border-color: rgba(255, 255, 255, 0.35);
}

/* Fan card internals */
.fan-image {
  width: 160px;
  height: 160px;
  margin: 0 auto 16px;
  overflow: hidden;
  background: transparent;
  border: none;
  border-radius: 0;
}

.fan-primary .fan-image {
  width: 200px;
  height: 200px;
}

.fan-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.fan-role {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 6px;
}

.fan-primary .fan-role {
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.15);
  padding: 4px 12px;
  border-radius: 20px;
  display: inline-block;
  margin-bottom: 10px;
}

.fan-name {
  font-size: 18px;
  font-weight: 700;
  color: white;
  margin-bottom: 4px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

.fan-primary .fan-name {
  font-size: 24px;
}

.fan-pct {
  font-size: 16px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 24px;
}

.fan-primary .fan-pct {
  font-size: 20px;
  color: rgba(255, 255, 255, 0.9);
}

.fan-link {
  font-size: 13px;
  padding: 10px 20px;
  margin-top: auto;
}

/* === RESULTS GRID: Storyline + Sidebar === */
.results-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 40px;
  align-items: stretch;
}

/* === STORYLINE SECTION (left column) === */
.storyline-section {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 32px;
  box-shadow: var(--shadow-md);
}

.storyline-title {
  font-size: 22px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 16px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

.storyline-text {
  font-size: 16px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.9);
  margin: 0;
}

.storyline-text strong {
  color: #fff;
  font-weight: 600;
}

/* === SIDEBAR (right column): email block === */
.results-sidebar {
  display: flex;
  flex-direction: column;
}

/* === EMAIL SECTION (in sidebar) === */
.email-section {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 32px;
  box-shadow: var(--shadow-md);
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.email-section h3 {
  font-size: 22px;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 16px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

.email-section > p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 16px;
  line-height: 1.7;
  margin: 0 0 24px;
}

.email-form {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.email-input {
  padding: 0 24px;
  height: 52px;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  border-radius: 50px;
  font-size: 16px;
  font-family: inherit;
  width: 100%;
  color: white;
  transition: all 0.3s ease;
}

.email-input::placeholder { color: rgba(255, 255, 255, 0.5); }

.email-input:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.5);
  background: var(--glass-hover);
}

#traits-email-send {
  height: 52px;
  padding: 0 36px;
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 50px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  font-family: inherit;
  font-size: 15px;
  transition: all 0.3s ease;
  box-shadow: 
    0 8px 32px 0 rgba(255, 255, 255, 0.1),
    inset 0 0 20px rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

#traits-email-send:hover {
  background: rgba(255, 255, 255, 0.35);
  border-color: rgba(255, 255, 255, 0.6);
  box-shadow: 
    0 8px 40px 0 rgba(255, 255, 255, 0.2),
    0 0 25px rgba(255, 255, 255, 0.2),
    inset 0 0 30px rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.traits-email-status {
  margin-top: 16px;
  font-size: 14px;
  font-weight: 500;
  min-height: 20px;
}

.traits-email-status.success { color: #6ee7b7; }
.traits-email-status.error { color: #fca5a5; }

/* === RESPONSIVE === */
@media (max-width: 900px) {
  .profile-fan {
    flex-direction: column;
    align-items: center;
    gap: 16px;
    min-height: auto;
    padding: 20px 0;
  }
  
  .fan-primary,
  .fan-secondary,
  .fan-tertiary {
    width: 100%;
    max-width: 340px;
    transform: none !important;
  }
  
  .fan-primary { order: 1; }
  .fan-secondary { order: 2; }
  .fan-tertiary { order: 3; }
  
  .fan-primary:hover,
  .fan-secondary:hover,
  .fan-tertiary:hover {
    transform: translateY(-4px) !important;
  }
  
  .results-columns {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .step { padding: 32px 20px; }
  
  .likert {
    grid-template-columns: auto repeat(5, 56px) auto;
    column-gap: 12px;
  }
  
  .likert .label-left, .likert .label-right {
    font-size: 12px;
    padding: 0 8px;
  }
  
  .likert label { width: 56px; height: 56px; font-size: 18px; }
  
  .storyline-section,
  .email-section { 
    padding: 24px 20px; 
  }
}

@media (max-width: 580px) {
  .likert {
    display: block;
    text-align: center;
  }
  
  .likert .label-left {
    display: block;
    text-align: center;
    padding: 0;
    margin-bottom: 16px;
    white-space: normal;
  }
  
  .likert .label-right {
    display: block;
    text-align: center;
    padding: 0;
    margin-top: 16px;
    white-space: normal;
  }
  
  .likert li:not(.label-left):not(.label-right) {
    display: inline-block;
    margin: 0 2px;
  }
  
  .likert label { width: 42px; height: 42px; font-size: 14px; }
}

/* Error & animations */
.step.error {
  border-color: rgba(255, 100, 100, 0.5);
  box-shadow: 0 0 0 4px rgba(255, 100, 100, 0.2);
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-10px); }
  75% { transform: translateX(10px); }
}

/* === Newsletter opt-in === */
.traits-newsletter-optin {
  margin-top: 14px;
}

.traits-optin-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.5;
}

.traits-optin-label input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  min-width: 18px;
  border: 1px solid rgba(145, 3, 233, 0.5);
  border-radius: 4px;
  background: rgba(145, 3, 233, 0.1);
  cursor: pointer;
  margin-top: 2px;
  transition: all 0.2s ease;
  position: relative;
}

.traits-optin-label input[type="checkbox"]:checked {
  background: rgba(145, 3, 233, 0.6);
  border-color: rgba(145, 3, 233, 0.9);
}

.traits-optin-label input[type="checkbox"]:checked::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

.traits-optin-label:hover span {
  color: rgba(255, 255, 255, 0.85);
}
