@import url('https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300..800;1,300..800&display=swap');
@import url('variables.css');

@font-face {
  font-family: 'Google Sans';
  font-style: normal;
  font-weight: 400;
  src: url('https://fonts.gstatic.com/s/googlesans/v58/4UaGr8FqJR-EuMqiU4B456U4.woff2') format('woff2');
}

@font-face {
  font-family: 'Google Sans';
  font-style: normal;
  font-weight: 500;
  src: url('https://fonts.gstatic.com/s/googlesans/v58/4Uabr8FqJR-EuMqiU4B452744vk.woff2') format('woff2');
}

@font-face {
  font-family: 'Google Sans';
  font-style: normal;
  font-weight: 700;
  src: url('https://fonts.gstatic.com/s/googlesans/v58/4Uabr8FqJR-EuMqiU4B456344vk.woff2') format('woff2');
}

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

body {
  background-color: var(--surface-void);
  color: #e2e3e9;
  font-family: var(--font-main);
  font-size: 16px;
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

.container {
  max-width: var(--page-max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* CHAOTIC ANIMATED MESH AURORA GLOW (ORGANIC ORBS) */
@keyframes meshFloat1 {
  0% { transform: translate(0px, 0px) scale(1); }
  33% { transform: translate(60px, -80px) scale(1.2); }
  66% { transform: translate(-40px, 50px) scale(0.9); }
  100% { transform: translate(0px, 0px) scale(1); }
}

@keyframes meshFloat2 {
  0% { transform: translate(0px, 0px) scale(1); }
  33% { transform: translate(-70px, 60px) scale(1.15); }
  66% { transform: translate(50px, -40px) scale(0.85); }
  100% { transform: translate(0px, 0px) scale(1); }
}

@keyframes meshFloat3 {
  0% { transform: translate(0px, 0px) scale(1); }
  50% { transform: translate(80px, 40px) scale(1.3); }
  100% { transform: translate(0px, 0px) scale(1); }
}

.mesh-aurora-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}

.aurora-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.45;
}

.orb-1 {
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, #a855f7 0%, #ec4899 100%);
  top: 20%;
  left: 25%;
  animation: meshFloat1 14s infinite ease-in-out;
}

.orb-2 {
  width: 380px;
  height: 380px;
  background: radial-gradient(circle, #3b82f6 0%, #10b981 100%);
  bottom: 20%;
  right: 25%;
  animation: meshFloat2 18s infinite ease-in-out;
}

.orb-3 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, #f43f5e 0%, #a855f7 100%);
  top: 45%;
  right: 35%;
  animation: meshFloat3 12s infinite ease-in-out;
}

/* GRADIENT TEXT ACCENT */
@keyframes textGradientMove {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.gradient-text {
  background: linear-gradient(135deg, #a855f7, #ec4899, #3b82f6, #10b981, #f43f5e, #a855f7);
  background-size: 300% 300%;
  animation: textGradientMove 8s ease infinite;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

/* NAVBAR */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8, 8, 10, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--color-graphite);
  padding: 16px 0;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #ffffff;
}

.brand-icon {
  font-size: 24px;
}

.brand-title {
  font-family: var(--font-main);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #ffffff;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav-link {
  color: #acafb9;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav-link:hover, .nav-link.active {
  color: #ffffff;
}

/* FLUID GLOWING BUTTONS (NO HOVER JUMPING) */
@keyframes glowPulse {
  0% { box-shadow: 0 0 20px rgba(168, 85, 247, 0.4), 0 0 40px rgba(236, 72, 153, 0.2); }
  50% { box-shadow: 0 0 30px rgba(59, 130, 246, 0.6), 0 0 50px rgba(16, 185, 129, 0.3); }
  100% { box-shadow: 0 0 20px rgba(168, 85, 247, 0.4), 0 0 40px rgba(236, 72, 153, 0.2); }
}

.btn-primary-gradient {
  background: linear-gradient(135deg, #a855f7, #ec4899, #3b82f6, #10b981, #f43f5e);
  background-size: 300% 300%;
  animation: textGradientMove 8s ease infinite, glowPulse 4s ease-in-out infinite;
  color: #ffffff;
  font-family: var(--font-main);
  font-size: 15px;
  font-weight: 700;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.2s ease, filter 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary-gradient:hover {
  filter: brightness(1.1);
  opacity: 0.95;
}

.btn-ghost {
  background: transparent;
  color: #ffffff;
  font-family: var(--font-main);
  font-size: 14px;
  font-weight: 500;
  padding: 10px 20px;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-steel);
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.2s ease, color 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-ghost:hover {
  border-color: #ffffff;
}

.pill-tag-gradient {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
  background: linear-gradient(135deg, #a855f7, #ec4899, #3b82f6);
  background-size: 200% 200%;
  animation: textGradientMove 6s ease infinite;
}

/* USER PROFILE BADGE */
.user-profile-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 14px 4px 6px;
  background: var(--surface-panel);
  border: 1px solid var(--color-graphite);
  border-radius: var(--radius-full);
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--color-slate);
}

.user-name {
  font-size: 14px;
  font-weight: 500;
  color: #ffffff;
}

.btn-logout {
  background: none;
  border: none;
  color: var(--color-ash);
  cursor: pointer;
  font-size: 14px;
  margin-left: 4px;
  transition: color 0.2s ease;
}

.btn-logout:hover {
  color: #ef4444;
}

/* HERO SECTION */
.hero {
  padding: 100px 0 80px 0;
  text-align: center;
  position: relative;
  z-index: 1;
}

.category-eyebrow {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 16px;
}

.hero-title {
  font-family: var(--font-main);
  font-size: var(--text-heading-lg);
  font-weight: 700;
  line-height: var(--leading-heading-lg);
  color: #ffffff;
  max-width: 840px;
  margin: 0 auto 24px auto;
}

.hero-description {
  font-size: var(--text-body);
  color: #c7c9d1;
  max-width: 620px;
  margin: 0 auto 40px auto;
}

/* TESTS HUB CATALOG SECTION */
.section {
  padding: 80px 0;
  position: relative;
  z-index: 1;
}

.section-header {
  margin-bottom: 48px;
}

.section-title {
  font-family: var(--font-main);
  font-size: var(--text-heading);
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 12px;
}

.section-subtitle {
  font-size: var(--text-body-sm);
  color: #acafb9;
}

.tests-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 28px;
}

/* NO HOVER JUMPING ON CARDS */
.test-card {
  background: #0e0f16;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  padding: var(--card-padding);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 270px;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
  position: relative;
  overflow: hidden;
}

.test-card:hover {
  border-color: rgba(168, 85, 247, 0.6);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.7), 0 0 24px rgba(168, 85, 247, 0.2);
}

.test-card-title {
  font-family: var(--font-main);
  font-size: 22px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 10px;
}

.test-card-desc {
  font-size: 15px;
  color: #e2e3e9;
  line-height: 1.6;
}

.test-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 18px;
  margin-top: 24px;
}

.test-meta {
  font-size: 13px;
  color: #acafb9;
  font-weight: 500;
}

/* DEDICATED TEST LANDING PAGE (/tests/bread) */
.test-landing-card {
  background: #0e0f16;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 24px;
  padding: 56px 48px;
  max-width: 920px;
  margin: 0 auto;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.8);
}

.test-landing-badge {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.test-landing-title {
  font-family: var(--font-main);
  font-size: 44px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.2;
  margin-bottom: 16px;
}

.test-landing-subtitle {
  font-size: 18px;
  color: #e2e3e9;
  line-height: 1.6;
  max-width: 760px;
}

.methodology-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}

.methodology-card {
  background: #141620;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 24px;
}

.methodology-title {
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 10px;
}

.methodology-text {
  font-size: 14px;
  color: #acafb9;
  line-height: 1.6;
}

/* DEDICATED TEST RUNNER PAGE (/tests/bread/run) */
.test-runner-card {
  background: #0e0f16;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 24px;
  padding: 48px;
  max-width: 800px;
  margin: 0 auto;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.85);
}

.test-progress-bar-bg {
  width: 100%;
  height: 8px;
  background: #1a1c27;
  border-radius: 9999px;
  overflow: hidden;
  margin-bottom: 32px;
}

.test-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #a855f7, #ec4899, #3b82f6);
  transition: width 0.35s ease;
}

.test-question-counter {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #a855f7;
}

.test-question-title {
  font-family: var(--font-main);
  font-size: 26px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.4;
  margin-bottom: 48px;
  min-height: 80px;
}

/* HORIZONTAL CIRCULAR RATING BUTTONS (5 CIRCLES IN A SINGLE ROW - NO JUMPING) */
.rating-scale-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  margin-top: 20px;
}

.rating-circles-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  width: 100%;
}

.circle-btn {
  border-radius: 50%;
  border: 2px solid transparent;
  background: #141620;
  color: #ffffff;
  font-family: var(--font-main);
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
  user-select: none;
}

.circle-2minus {
  width: 64px;
  height: 64px;
  font-size: 18px;
  border-color: #ef4444;
  color: #ef4444;
}

.circle-2minus:hover {
  background: #ef4444;
  color: #ffffff;
  box-shadow: 0 0 24px rgba(239, 68, 68, 0.6);
}

.circle-1minus {
  width: 54px;
  height: 54px;
  font-size: 16px;
  border-color: #f59e0b;
  color: #f59e0b;
}

.circle-1minus:hover {
  background: #f59e0b;
  color: #ffffff;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.6);
}

.circle-zero {
  width: 46px;
  height: 46px;
  font-size: 18px;
  border-color: #9194a1;
  color: #9194a1;
}

.circle-zero:hover {
  background: #9194a1;
  color: #ffffff;
  box-shadow: 0 0 16px rgba(145, 148, 161, 0.5);
}

.circle-1plus {
  width: 54px;
  height: 54px;
  font-size: 16px;
  border-color: #3b82f6;
  color: #3b82f6;
}

.circle-1plus:hover {
  background: #3b82f6;
  color: #ffffff;
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.6);
}

.circle-2plus {
  width: 64px;
  height: 64px;
  font-size: 18px;
  border-color: #10b981;
  color: #10b981;
}

.circle-2plus:hover {
  background: #10b981;
  color: #ffffff;
  box-shadow: 0 0 24px rgba(16, 185, 129, 0.6);
}

.rating-scale-labels {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  font-size: 14px;
  font-weight: 600;
  padding: 0 12px;
}

/* RESULT WINDOW WITH SIDE IMAGE & OVERLAY GRADIENT */
.result-card-container {
  background: #0d0e15;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 24px;
  width: 100%;
  max-width: 900px;
  display: flex;
  overflow: hidden;
  position: relative;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.95), 0 0 60px rgba(168, 85, 247, 0.2);
}

.result-image-col {
  flex: 1.1;
  position: relative;
  min-height: 480px;
  background-size: cover;
  background-position: center;
}

.result-image-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(90deg, rgba(13, 14, 21, 0) 0%, rgba(13, 14, 21, 0.95) 100%),
              linear-gradient(180deg, rgba(13, 14, 21, 0.2) 0%, rgba(13, 14, 21, 0.8) 100%);
}

.result-content-col {
  flex: 1.3;
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  z-index: 2;
}

.result-badge-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.match-score-pill {
  background: linear-gradient(135deg, #10b981, #3b82f6);
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: var(--radius-full);
}

.result-title {
  font-family: var(--font-main);
  font-size: 36px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 8px;
  line-height: 1.2;
}

.result-tagline {
  font-size: 18px;
  font-weight: 600;
  color: #ec4899;
  margin-bottom: 24px;
}

.result-description {
  font-size: 15px;
  color: #e2e3e9;
  line-height: 1.7;
  margin-bottom: 32px;
}

.result-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* STRICT AUTH GATE */
.auth-gate-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #06070a;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow: hidden;
}

.auth-gate-card {
  background: rgba(14, 15, 22, 0.85);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 48px 36px;
  width: 100%;
  max-width: 480px;
  text-align: center;
  position: relative;
  z-index: 10;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.9), 0 0 40px rgba(168, 85, 247, 0.15);
}

.gate-brand-icon {
  font-size: 48px;
  margin-bottom: 16px;
  display: inline-block;
  filter: drop-shadow(0 4px 12px rgba(168, 85, 247, 0.4));
}

.gate-title {
  font-family: var(--font-main);
  font-size: 30px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 14px;
  letter-spacing: -0.5px;
}

.gate-desc {
  font-size: 15px;
  color: #e2e3e9;
  margin-bottom: 32px;
  line-height: 1.6;
}

.gate-desc b {
  color: #ffffff;
  font-weight: 700;
}

.gate-input-group {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 24px;
}

.gate-input {
  width: 100%;
  background: #141620;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-full);
  padding: 15px 24px;
  color: #ffffff;
  font-size: 18px;
  font-family: var(--font-main);
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  text-align: center;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.gate-input:focus {
  border-color: #a855f7;
  box-shadow: 0 0 16px rgba(168, 85, 247, 0.35);
}

.gate-hint {
  font-size: 13px;
  color: #c7c9d1;
  line-height: 1.5;
}

/* FOOTER */
.footer {
  border-top: 1px solid var(--color-graphite);
  padding: 40px 0;
  margin-top: 80px;
  color: #9194a1;
  font-size: 14px;
  position: relative;
  z-index: 1;
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

@media (max-width: 860px) {
  .result-card-container {
    flex-direction: column;
  }
  .result-image-col {
    min-height: 260px;
  }
  .result-content-col {
    padding: 32px 24px;
  }
  .test-landing-card, .test-runner-card {
    padding: 32px 24px;
  }
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 36px;
  }
  .nav-links {
    display: none;
  }
  .tests-grid {
    grid-template-columns: 1fr;
  }
  .rating-circles-row {
    gap: 14px;
  }
}
