/* ============================================================
   FTLH Quiz Portal – Premium Frontend v2.0
   Future Tech Learning Hub – Professional Edition
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800;900&family=Orbitron:wght@700;800;900&display=swap');

:root {
  --ftlh-green:       #7ed321;
  --ftlh-green2:      #22c55e;
  --ftlh-green3:      #16a34a;
  --ftlh-blue:        #20a8ff;
  --ftlh-blue2:       #0ea5e9;
  --ftlh-cyan:        #20e3ff;
  --ftlh-gold:        #f5c842;
  --ftlh-dark:        #071426;
  --ftlh-dark2:       #060f1e;
  --ftlh-dark3:       #030b17;
  --ftlh-card:        rgba(255,255,255,.08);
  --ftlh-card-hover:  rgba(255,255,255,.13);
  --ftlh-border:      rgba(255,255,255,.12);
  --ftlh-border2:     rgba(255,255,255,.20);
  --ftlh-text:        #eef8ff;
  --ftlh-muted:       #94b8cc;
  --ftlh-muted2:      #c5dde8;
  --grad-green-blue:  linear-gradient(135deg, var(--ftlh-green2), var(--ftlh-blue));
  --grad-hero:        linear-gradient(135deg, #071426 0%, #08385d 50%, #09572e 100%);
  --grad-card:        linear-gradient(160deg, rgba(255,255,255,.10) 0%, rgba(255,255,255,.04) 100%);
  --glow-green:       0 0 40px rgba(34,197,94,.35);
  --glow-blue:        0 0 40px rgba(32,168,255,.35);
  --shadow-card:      0 20px 60px rgba(0,0,0,.40), 0 4px 16px rgba(0,0,0,.25);
  --shadow-btn:       0 12px 35px rgba(32,168,255,.30);
  --ease-smooth:      cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-spring:      cubic-bezier(0.34, 1.56, 0.64, 1);
}

#ftlh-portal-root,
#ftlh-portal-root * { box-sizing: border-box; margin: 0; padding: 0; }
#ftlh-portal-root {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  min-height: 100vh;
  font-family: 'Poppins', sans-serif;
  color: var(--ftlh-text);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
#ftlh-portal-root a { text-decoration: none; }

/* ── HERO ── */
.ftlh-hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  overflow: hidden;
  background: var(--ftlh-dark3);
}
.ftlh-hero-bg { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.ftlh-hero-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 60% at 15% 20%, rgba(32,168,255,.22) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 85% 25%, rgba(126,211,33,.18) 0%, transparent 55%),
    radial-gradient(ellipse 50% 70% at 50% 90%, rgba(14,165,233,.15) 0%, transparent 60%),
    linear-gradient(160deg, #030b17 0%, #071e3d 40%, #063520 75%, #030b17 100%);
}
.ftlh-hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(32,168,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(32,168,255,.05) 1px, transparent 1px);
  background-size: 50px 50px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.5) 0%, rgba(0,0,0,.1) 100%);
  animation: ftlh-grid-pulse 8s ease-in-out infinite alternate;
}
@keyframes ftlh-grid-pulse { 0% { opacity:.4; } 100% { opacity:1; } }

.ftlh-hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  pointer-events: none;
  z-index: 0;
  animation: ftlh-orb-float ease-in-out infinite alternate;
}
.ftlh-hero-orb-1 { width:500px;height:500px;top:-150px;left:-120px;background:radial-gradient(circle,rgba(32,168,255,.18),transparent 70%);animation-duration:7s; }
.ftlh-hero-orb-2 { width:400px;height:400px;top:-80px;right:-100px;background:radial-gradient(circle,rgba(126,211,33,.14),transparent 70%);animation-duration:9s;animation-delay:-3s; }
.ftlh-hero-orb-3 { width:300px;height:300px;bottom:0;left:50%;transform:translateX(-50%);background:radial-gradient(circle,rgba(20,227,255,.10),transparent 70%);animation-duration:11s;animation-delay:-5s; }
@keyframes ftlh-orb-float { 0%{transform:translate(0,0) scale(1);} 100%{transform:translate(30px,-40px) scale(1.08);} }

.ftlh-hero-content {
  position: relative;
  z-index: 2;
  width: min(860px, 100%);
  text-align: center;
  padding: 52px 40px 46px;
  border-radius: 36px;
  background: linear-gradient(160deg, rgba(255,255,255,.10) 0%, rgba(255,255,255,.04) 100%);
  border: 1px solid rgba(255,255,255,.13);
  box-shadow: 0 40px 100px rgba(0,0,0,.50), 0 0 0 1px rgba(255,255,255,.05) inset, inset 0 1px 0 rgba(255,255,255,.16);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  animation: ftlh-hero-enter .85s var(--ease-smooth) both;
}
.ftlh-hero-content::before {
  content: '';
  position: absolute;
  top: 0; left: 10%; right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(32,168,255,.6), rgba(126,211,33,.6), transparent);
  border-radius: 0 0 4px 4px;
}
@keyframes ftlh-hero-enter { from{opacity:0;transform:translateY(36px) scale(.97);} to{opacity:1;transform:translateY(0) scale(1);} }

/* ── Logo ── */
.ftlh-logo-wrap {
  position: relative;
  width: 168px;
  height: 168px;
  margin: 0 auto 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: ftlh-logo-appear .9s var(--ease-spring) .2s both;
}
.ftlh-logo-wrap::before {
  content: '';
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--ftlh-green2) 0deg, var(--ftlh-blue) 120deg, var(--ftlh-cyan) 180deg, var(--ftlh-green) 240deg, var(--ftlh-green2) 360deg);
  animation: ftlh-ring-spin 6s linear infinite;
  opacity: .65;
}
.ftlh-logo-wrap::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 50%;
  background: var(--ftlh-dark2);
  box-shadow: 0 0 0 2px rgba(32,168,255,.20), 0 0 55px rgba(126,211,33,.28), 0 0 110px rgba(32,168,255,.18);
}
@keyframes ftlh-ring-spin { to { transform: rotate(360deg); } }
@keyframes ftlh-logo-appear { from{opacity:0;transform:scale(.6) rotate(-10deg);} to{opacity:1;transform:scale(1) rotate(0deg);} }

.ftlh-logo {
  width: 138px; height: 138px;
  object-fit: contain;
  display: block;
  position: relative;
  z-index: 2;
  filter: drop-shadow(0 0 22px rgba(32,168,255,.55)) drop-shadow(0 0 44px rgba(126,211,33,.35)) drop-shadow(0 8px 20px rgba(0,0,0,.5));
  transition: transform .4s var(--ease-spring), filter .4s ease;
}
.ftlh-logo-wrap:hover .ftlh-logo {
  transform: scale(1.07);
  filter: drop-shadow(0 0 32px rgba(32,168,255,.75)) drop-shadow(0 0 65px rgba(126,211,33,.55)) drop-shadow(0 12px 28px rgba(0,0,0,.5));
}

.ftlh-hero-tagline {
  font-family: 'Orbitron', sans-serif;
  font-size: .70rem;
  font-weight: 700;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--ftlh-green);
  margin-bottom: 12px;
  opacity: .85;
  animation: ftlh-fade-up .7s ease .3s both;
}
.ftlh-hero-title {
  color: #fff;
  font-size: clamp(2.4rem, 6vw, 4.4rem);
  line-height: 1.0;
  font-weight: 900;
  letter-spacing: -2.5px;
  margin-bottom: 16px;
  animation: ftlh-fade-up .7s ease .4s both;
}
.ftlh-hero-title span {
  background: linear-gradient(90deg, var(--ftlh-green2) 0%, var(--ftlh-cyan) 50%, var(--ftlh-blue) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.ftlh-hero-sub {
  max-width: 600px; margin: 0 auto 36px;
  color: var(--ftlh-muted2);
  font-size: clamp(.95rem, 2vw, 1.10rem);
  font-weight: 400; line-height: 1.7; opacity: .85;
  animation: ftlh-fade-up .7s ease .5s both;
}

/* ── Search ── */
.ftlh-search-wrap { max-width: 620px; margin: 0 auto; animation: ftlh-fade-up .7s ease .6s both; }
.ftlh-search-bar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 8px 8px 8px 20px;
  border-radius: 100px;
  background: rgba(255,255,255,.08);
  border: 1.5px solid rgba(255,255,255,.18);
  box-shadow: 0 8px 32px rgba(0,0,0,.30), inset 0 1px 0 rgba(255,255,255,.10);
  transition: border-color .25s ease, box-shadow .25s ease;
}
.ftlh-search-bar:focus-within {
  border-color: rgba(32,168,255,.60);
  box-shadow: 0 0 0 4px rgba(32,168,255,.12), 0 8px 32px rgba(0,0,0,.30);
}
.ftlh-search-icon { font-size: 1.1rem; opacity: .7; flex-shrink: 0; }
.ftlh-search-bar input {
  width: 100%; height: 50px; border: 0; outline: 0;
  background: transparent; color: #fff;
  font-family: 'Poppins', sans-serif; font-weight: 600; font-size: 1rem;
}
.ftlh-search-bar input::placeholder { color: rgba(238,248,255,.42); font-weight: 400; }
.ftlh-search-bar button {
  height: 50px; border: 0; border-radius: 100px; padding: 0 28px; cursor: pointer;
  background: var(--grad-green-blue); color: white;
  font-family: 'Poppins', sans-serif; font-weight: 800; font-size: .95rem;
  box-shadow: 0 8px 24px rgba(32,168,255,.35);
  transition: transform .2s var(--ease-spring), box-shadow .2s ease, opacity .2s;
  white-space: nowrap; flex-shrink: 0;
}
.ftlh-search-bar button:hover { transform:translateY(-2px) scale(1.02); box-shadow:0 14px 34px rgba(32,168,255,.45); }
.ftlh-search-bar button:active { transform:scale(.98); }
.ftlh-search-bar button:disabled { opacity:.6; cursor:not-allowed; transform:none; }
.ftlh-search-hint { margin: 14px 0 0; color: rgba(238,248,255,.48); font-size: .87rem; }
.ftlh-search-error { min-height: 22px; margin-top: 10px; color: #ff8fa3; font-weight: 700; font-size: .9rem; }

.ftlh-hero-badges {
  display: flex; gap: 12px; justify-content: center;
  margin-top: 34px;
  animation: ftlh-fade-up .7s ease .7s both;
  flex-wrap: wrap;
}
.ftlh-hero-badge {
  display: flex; align-items: center; gap: 7px;
  padding: 9px 18px; border-radius: 100px;
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.11);
  font-size: .83rem; font-weight: 600; color: var(--ftlh-muted2);
}
.ftlh-hero-badge span { font-size: 1rem; }

/* ── MODALS ── */
.ftlh-overlay {
  position: fixed; inset: 0; z-index: 999999;
  background: rgba(3,11,23,.86);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.ftlh-modal {
  width: min(440px, 96vw); text-align: center; border-radius: 30px;
  padding: 42px 34px 36px;
  background: linear-gradient(160deg, rgba(12,43,78,.98) 0%, rgba(7,74,42,.95) 100%);
  border: 1px solid rgba(255,255,255,.13);
  box-shadow: 0 50px 120px rgba(0,0,0,.65), inset 0 1px 0 rgba(255,255,255,.14);
  animation: ftlh-modal-in .35s var(--ease-spring) both;
  position: relative; overflow: hidden;
}
.ftlh-modal::before {
  content: ''; position: absolute; top: 0; left: 15%; right: 15%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(32,168,255,.7), rgba(126,211,33,.7), transparent);
}
@keyframes ftlh-modal-in { from{opacity:0;transform:scale(.88) translateY(20px);} to{opacity:1;transform:scale(1) translateY(0);} }

.ftlh-modal-icon { font-size: 3.4rem; margin-bottom: 16px; display: block; animation: ftlh-bounce-in .5s var(--ease-spring) .2s both; }
@keyframes ftlh-bounce-in { from{transform:scale(0) rotate(-20deg);} to{transform:scale(1) rotate(0deg);} }

.ftlh-modal h2 { color: #fff; font-weight: 800; font-size: 1.55rem; margin-bottom: 8px; }
.ftlh-modal p { color: var(--ftlh-muted); margin-bottom: 26px; font-size: .98rem; line-height: 1.6; }
.ftlh-modal input {
  width: 100%; height: 54px; border-radius: 16px;
  border: 1.5px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.08); color: #fff;
  padding: 0 18px; font-family: 'Poppins'; font-size: 1rem; font-weight: 500;
  outline: 0; margin-bottom: 18px;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.ftlh-modal input:focus { border-color: rgba(32,168,255,.6); box-shadow: 0 0 0 3px rgba(32,168,255,.12); }
.ftlh-modal input::placeholder { color: rgba(238,248,255,.35); }

.ftlh-modal-btn {
  display: flex; justify-content: center; align-items: center;
  width: 100%; height: 54px; border-radius: 16px; border: 0;
  background: var(--grad-green-blue); color: white !important;
  font-weight: 800; font-family: 'Poppins'; font-size: 1rem; cursor: pointer;
  box-shadow: 0 12px 34px rgba(32,168,255,.30);
  transition: transform .2s var(--ease-spring), box-shadow .2s ease;
}
.ftlh-modal-btn:hover { transform: translateY(-2px) scale(1.01); box-shadow: 0 18px 42px rgba(32,168,255,.40); }
.ftlh-modal-btn:active { transform: scale(.98); }

/* ── TEST SECTION ── */
.ftlh-test-section {
  min-height: 100vh; padding-bottom: 80px;
  background:
    radial-gradient(ellipse 80% 40% at 50% 0%, rgba(32,168,255,.12) 0%, transparent 60%),
    linear-gradient(160deg, #030b17 0%, #071426 40%, #063018 80%, #030b17 100%);
}
.ftlh-test-header {
  position: sticky; top: 0; z-index: 50;
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px; flex-wrap: wrap;
  padding: 14px max(20px, calc((100vw - 960px) / 2));
  background: rgba(3,11,23,.90);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 4px 24px rgba(0,0,0,.35);
}
.ftlh-test-title-bar { display: flex; align-items: center; gap: 14px; }
.ftlh-header-logo {
  width: 50px; height: 50px; object-fit: contain;
  filter: drop-shadow(0 0 12px rgba(32,168,255,.5)) drop-shadow(0 0 24px rgba(126,211,33,.3));
}
.ftlh-test-title-bar h2 { margin: 0; color: white; font-size: 1.2rem; font-weight: 800; line-height: 1.2; }
.ftlh-test-title-bar span { color: var(--ftlh-green); font-weight: 600; font-size: .85rem; display: block; margin-top: 1px; }
.ftlh-test-meta { display: flex; gap: 8px; flex-wrap: wrap; }
.ftlh-test-meta span {
  padding: 8px 16px; border-radius: 100px;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12);
  font-weight: 700; color: var(--ftlh-muted2); font-size: .84rem;
}

.ftlh-questions-container { width: min(900px, 100%); margin: 36px auto; padding: 0 20px; display: flex; flex-direction: column; gap: 18px; }

.ftlh-question-card {
  border-radius: 24px; padding: 28px 30px;
  background: var(--grad-card);
  border: 1px solid var(--ftlh-border);
  box-shadow: var(--shadow-card);
  position: relative; overflow: hidden;
  animation: ftlh-card-enter .5s var(--ease-smooth) both;
  transition: border-color .25s ease, box-shadow .25s ease;
}
.ftlh-question-card:hover { border-color: rgba(255,255,255,.18); box-shadow: 0 24px 70px rgba(0,0,0,.50), 0 4px 16px rgba(0,0,0,.30); }
.ftlh-question-card::before {
  content: ''; position: absolute; top: 0; left: 0;
  width: 3px; height: 100%;
  background: var(--grad-green-blue); opacity: .7;
}
@keyframes ftlh-card-enter { from{opacity:0;transform:translateY(16px);} to{opacity:1;transform:translateY(0);} }

.ftlh-q-num {
  color: var(--ftlh-green); font-size: .78rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: 1.2px; margin-bottom: 10px;
  display: flex; align-items: center; gap: 8px;
}
.ftlh-q-num::after { content:''; flex:1; height:1px; background:linear-gradient(to right,rgba(126,211,33,.3),transparent); }
.ftlh-q-text { color: white; font-size: 1.08rem; line-height: 1.60; font-weight: 700; margin-bottom: 20px; }

.ftlh-options { display: grid; gap: 10px; }
.ftlh-option {
  display: grid; grid-template-columns: 38px 1fr auto; align-items: center;
  gap: 14px; min-height: 58px; padding: 12px 16px; border-radius: 16px;
  background: rgba(255,255,255,.06); border: 1.5px solid rgba(255,255,255,.10);
  cursor: pointer; color: var(--ftlh-muted2);
  transition: transform .18s var(--ease-smooth), border-color .18s ease, background .18s ease, box-shadow .18s ease;
  position: relative; overflow: hidden;
}
.ftlh-option:hover { transform:translateX(5px); border-color:rgba(32,168,255,.5); background:rgba(32,168,255,.10); box-shadow:0 4px 20px rgba(32,168,255,.12); color:#fff; }
.ftlh-option.selected { border-color:rgba(126,211,33,.65); background:linear-gradient(135deg,rgba(34,197,94,.15),rgba(32,168,255,.12)); box-shadow:0 4px 24px rgba(126,211,33,.18); color:#fff; transform:translateX(4px); }

.ftlh-opt-badge {
  width: 38px; height: 38px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: .88rem;
  background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.15);
  flex-shrink: 0; transition: background .2s ease, transform .2s var(--ease-spring);
}
.ftlh-option:hover .ftlh-opt-badge { background:rgba(32,168,255,.2); border-color:rgba(32,168,255,.4); transform:scale(1.05); }
.ftlh-option.selected .ftlh-opt-badge { background:var(--grad-green-blue); border-color:transparent; color:#fff; box-shadow:0 4px 14px rgba(32,168,255,.35); transform:scale(1.08); }

.ftlh-opt-text { font-size: .97rem; font-weight: 600; line-height: 1.5; flex: 1; position: relative; z-index: 1; }
.ftlh-tick {
  opacity: 0; font-size: 1.1rem; font-weight: 900; color: var(--ftlh-green2);
  transform: scale(0) rotate(-20deg); flex-shrink: 0;
  transition: opacity .25s ease, transform .3s var(--ease-spring);
}
.ftlh-option.selected .ftlh-tick { opacity: 1; transform: scale(1) rotate(0); }

.ftlh-submit-wrap { text-align: center; padding: 16px 20px 0; }
.ftlh-submit-btn {
  height: 58px; border: 0; border-radius: 100px; padding: 0 52px;
  background: var(--grad-green-blue); color: #fff;
  font-family: 'Poppins'; font-weight: 900; font-size: 1.05rem;
  cursor: pointer; box-shadow: 0 16px 42px rgba(32,168,255,.30);
  transition: transform .2s var(--ease-spring), box-shadow .2s ease;
  position: relative; overflow: hidden; letter-spacing: .7px;
}
.ftlh-submit-btn::before { content:''; position:absolute; top:0; left:-100%; width:100%; height:100%; background:linear-gradient(90deg,transparent,rgba(255,255,255,.15),transparent); transition:left .5s ease; }
.ftlh-submit-btn:hover { transform:translateY(-3px) scale(1.02); box-shadow:0 22px 52px rgba(126,211,33,.35); }
.ftlh-submit-btn:hover::before { left: 100%; }
.ftlh-submit-btn:active { transform:scale(.99); }
.ftlh-submit-btn:disabled { opacity:.6; cursor:not-allowed; transform:none; }

/* ── RESULT ── */
.ftlh-result-modal {
  width: min(480px, 96vw); text-align: center; border-radius: 32px;
  padding: 46px 36px 40px;
  background: linear-gradient(160deg, rgba(12,43,78,.99) 0%, rgba(7,74,42,.97) 100%);
  border: 1px solid rgba(255,255,255,.14);
  box-shadow: 0 60px 140px rgba(0,0,0,.70), inset 0 1px 0 rgba(255,255,255,.15);
  animation: ftlh-modal-in .4s var(--ease-spring) both;
  position: relative; overflow: hidden;
}
.ftlh-result-modal::before {
  content: ''; position: absolute; top: 0; left: 10%; right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(32,168,255,.7), rgba(126,211,33,.7), transparent);
}

.ftlh-result-emoji { font-size: 4.2rem; margin-bottom: 10px; display: block; animation: ftlh-bounce-in .55s var(--ease-spring) .15s both; }
.ftlh-result-name { margin: 0 0 24px; color: #fff; font-weight: 800; font-size: 1.15rem; }

.ftlh-result-score-wrap { margin-bottom: 24px; }
.ftlh-score-circle {
  width: 150px; height: 150px; border-radius: 50%; margin: 0 auto;
  background: conic-gradient(var(--ftlh-green2) 0%, var(--ftlh-blue) var(--pct,0%), rgba(255,255,255,.10) var(--pct,0%));
  display: flex; align-items: center; justify-content: center;
  position: relative;
  box-shadow: 0 0 60px rgba(34,197,94,.30), 0 0 30px rgba(32,168,255,.20);
}
.ftlh-score-circle::before {
  content: ''; position: absolute; inset: 13px; border-radius: 50%;
  background: linear-gradient(160deg, rgba(12,43,78,.98), rgba(7,74,42,.98));
}
.ftlh-score-inner { position: relative; z-index: 2; display: flex; align-items: baseline; gap: 2px; }
.ftlh-score-obtained { font-size: 2.4rem; font-weight: 900; color: #fff; }
.ftlh-score-slash { font-size: 1.3rem; color: var(--ftlh-muted); font-weight: 700; }
.ftlh-score-total { font-size: 1.3rem; color: var(--ftlh-muted); font-weight: 700; }

.ftlh-result-msg { font-weight: 800; font-size: 1.15rem; margin: 0 0 22px; background: linear-gradient(90deg,var(--ftlh-green2),var(--ftlh-cyan)); -webkit-background-clip:text; background-clip:text; color:transparent; }

.ftlh-result-breakdown { display: flex; gap: 12px; justify-content: center; margin-bottom: 18px; }
.ftlh-rb {
  min-width: 120px; padding: 16px 14px; border-radius: 18px;
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12);
  display: flex; flex-direction: column; gap: 4px;
  color: var(--ftlh-muted); font-weight: 700; font-size: .83rem;
  transition: transform .2s ease;
}
.ftlh-rb:hover { transform: translateY(-2px); }
.ftlh-rb-num { font-size: 1.75rem; font-weight: 900; color: white; line-height: 1; }
.ftlh-rb.correct .ftlh-rb-num { color: var(--ftlh-green2); }
.ftlh-rb.wrong .ftlh-rb-num { color: #f87171; }
.ftlh-result-sub { color: var(--ftlh-muted); margin-bottom: 26px; font-size: .92rem; line-height: 1.6; }

.ftlh-home-btn {
  display: inline-flex; justify-content: center; align-items: center;
  height: 52px; padding: 0 32px; border-radius: 100px; border: 0;
  background: var(--grad-green-blue); color: white !important;
  font-weight: 800; font-family: 'Poppins'; font-size: .98rem; cursor: pointer;
  box-shadow: var(--shadow-btn);
  transition: transform .2s var(--ease-spring), box-shadow .2s ease;
}
.ftlh-home-btn:hover { transform: translateY(-2px) scale(1.02); box-shadow: 0 18px 44px rgba(126,211,33,.38); }

.ftlh-confetti { position:absolute; inset:0; pointer-events:none; overflow:hidden; z-index:0; }
.ftlh-confetto { position:absolute; top:-12px; width:7px; height:13px; border-radius:3px; animation:ftlh-confetti-fall linear forwards; }

/* ── KEYFRAMES ── */
@keyframes ftlh-fade-up { from{opacity:0;transform:translateY(22px);} to{opacity:1;transform:translateY(0);} }
@keyframes ftlh-pop { from{opacity:0;transform:scale(.88);} to{opacity:1;transform:scale(1);} }
@keyframes ftlh-confetti-fall { 0%{transform:translateY(-20px) rotate(0deg);opacity:1;} 100%{transform:translateY(540px) rotate(720deg);opacity:0;} }

/* ── RESPONSIVE ── */
@media (max-width: 700px) {
  .ftlh-hero { padding: 50px 14px; }
  .ftlh-hero-content { padding: 36px 20px 30px; border-radius: 26px; }
  .ftlh-logo-wrap { width: 130px; height: 130px; }
  .ftlh-logo { width: 108px; height: 108px; }
  .ftlh-hero-title { letter-spacing: -1.5px; }
  .ftlh-search-bar { grid-template-columns: auto 1fr; border-radius: 20px; padding: 8px 10px 8px 16px; }
  .ftlh-search-bar button { grid-column: 1 / 3; width: 100%; margin-top: 4px; border-radius: 14px; }
  .ftlh-test-header { align-items: flex-start; }
  .ftlh-question-card { padding: 22px 18px; border-radius: 20px; }
  .ftlh-option { grid-template-columns: 34px 1fr auto; gap: 10px; }
  .ftlh-submit-btn { width: min(360px, 100%); padding: 0 28px; }
  .ftlh-result-breakdown { flex-direction: column; }
  .ftlh-rb { width: 100%; }
  .ftlh-result-modal { padding: 36px 24px 30px; }
}
@media (max-width: 400px) {
  .ftlh-hero-content { padding: 28px 14px 24px; }
  .ftlh-hero-badges { display: none; }
}

/* ============================================================
   FTLH Professional Frontend Alignment Fix v1.0
   - Centered layouts
   - Poppins everywhere
   - Proper spacing from top
   - Responsive buttons/text
   - Transparent logo support
   ============================================================ */
html body #ftlh-portal-root,
html body #ftlh-portal-root *{
  font-family:'Poppins', Arial, sans-serif !important;
}

html body #ftlh-portal-root{
  width:100% !important;
  max-width:100% !important;
  margin:0 !important;
  overflow-x:hidden !important;
}

html body #ftlh-portal-root .ftlh-hero{
  width:100% !important;
  min-height:100vh !important;
  padding:95px 20px 70px !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
}

html body.admin-bar #ftlh-portal-root .ftlh-hero{
  min-height:calc(100vh - 32px) !important;
  padding-top:105px !important;
}

html body #ftlh-portal-root .ftlh-hero-content{
  width:min(880px, 94vw) !important;
  margin:0 auto !important;
  text-align:center !important;
}

html body #ftlh-portal-root .ftlh-logo-wrap{
  margin-left:auto !important;
  margin-right:auto !important;
  background:transparent !important;
}

html body #ftlh-portal-root .ftlh-logo-wrap::after{
  background:radial-gradient(circle, rgba(3,11,23,.72) 0%, rgba(3,11,23,.35) 52%, transparent 72%) !important;
}

html body #ftlh-portal-root .ftlh-logo{
  background:transparent !important;
  border-radius:0 !important;
}

html body #ftlh-portal-root .ftlh-search-wrap,
html body #ftlh-portal-root .ftlh-search-bar{
  width:100% !important;
  max-width:640px !important;
  margin-left:auto !important;
  margin-right:auto !important;
}

html body #ftlh-portal-root button,
html body #ftlh-portal-root .ftlh-home-btn{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  text-align:center !important;
  line-height:1.2 !important;
  min-width:max-content !important;
  white-space:nowrap !important;
  overflow:visible !important;
}

html body #ftlh-portal-root .ftlh-search-bar button{
  min-width:112px !important;
  padding:0 26px !important;
}

html body #ftlh-portal-root .ftlh-submit-btn,
html body #ftlh-portal-root .ftlh-home-btn,
html body #ftlh-portal-root .ftlh-modal-btn{
  min-height:54px !important;
  padding-left:30px !important;
  padding-right:30px !important;
}

html body #ftlh-portal-root .ftlh-submit-btn span{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  gap:8px !important;
  width:auto !important;
  white-space:nowrap !important;
}

html body #ftlh-portal-root .ftlh-test-section{
  width:100% !important;
  min-height:100vh !important;
  padding:88px 18px 90px !important;
  display:flex !important;
  flex-direction:column !important;
  align-items:center !important;
  justify-content:flex-start !important;
  overflow-x:hidden !important;
}

html body.admin-bar #ftlh-portal-root .ftlh-test-section{
  padding-top:108px !important;
}

html body #ftlh-portal-root .ftlh-test-header{
  position:relative !important;
  top:auto !important;
  width:min(980px, 100%) !important;
  margin:0 auto 28px !important;
  padding:18px 22px !important;
  border-radius:24px !important;
  background:linear-gradient(160deg, rgba(255,255,255,.10), rgba(255,255,255,.04)) !important;
  border:1px solid rgba(255,255,255,.13) !important;
}

html body #ftlh-portal-root .ftlh-test-title-bar{
  flex:1 1 auto !important;
  min-width:0 !important;
}

html body #ftlh-portal-root .ftlh-header-logo{
  background:transparent !important;
  border-radius:0 !important;
  flex:0 0 auto !important;
}

html body #ftlh-portal-root .ftlh-test-title-bar h2,
html body #ftlh-portal-root .ftlh-test-title-bar span{
  word-break:break-word !important;
}

html body #ftlh-portal-root .ftlh-questions-container{
  width:min(920px, 100%) !important;
  margin:0 auto 22px !important;
  padding:0 !important;
}

html body #ftlh-portal-root .ftlh-question-card{
  width:100% !important;
  margin:0 auto !important;
}

html body #ftlh-portal-root .ftlh-submit-wrap{
  width:100% !important;
  max-width:920px !important;
  text-align:center !important;
  display:flex !important;
  justify-content:center !important;
  padding-top:12px !important;
}

html body #ftlh-portal-root .ftlh-option{
  width:100% !important;
  min-width:0 !important;
}

html body #ftlh-portal-root .ftlh-opt-text{
  min-width:0 !important;
  overflow-wrap:anywhere !important;
}

html body #ftlh-portal-root .ftlh-overlay{
  padding:30px 16px !important;
  overflow-y:auto !important;
}

html body #ftlh-portal-root .ftlh-result-modal{
  margin:auto !important;
  width:min(520px, 94vw) !important;
}

@media (max-width: 782px){
  html body.admin-bar #ftlh-portal-root .ftlh-hero{ min-height:calc(100vh - 46px) !important; }
  html body.admin-bar #ftlh-portal-root .ftlh-test-section{ padding-top:100px !important; }
}

@media (max-width: 700px){
  html body #ftlh-portal-root .ftlh-hero{ padding:72px 14px 52px !important; }
  html body #ftlh-portal-root .ftlh-hero-content{ width:100% !important; padding:34px 18px 28px !important; }
  html body #ftlh-portal-root .ftlh-hero-title{ font-size:clamp(2.15rem, 11vw, 3rem) !important; line-height:1.08 !important; letter-spacing:-1px !important; }
  html body #ftlh-portal-root .ftlh-search-bar{ display:grid !important; grid-template-columns:auto 1fr !important; gap:8px !important; border-radius:22px !important; }
  html body #ftlh-portal-root .ftlh-search-bar button{ grid-column:1 / -1 !important; width:100% !important; min-width:0 !important; border-radius:16px !important; }
  html body #ftlh-portal-root .ftlh-test-section{ padding:64px 12px 70px !important; }
  html body #ftlh-portal-root .ftlh-test-header{ flex-direction:column !important; align-items:center !important; text-align:center !important; padding:16px !important; }
  html body #ftlh-portal-root .ftlh-test-title-bar{ flex-direction:column !important; text-align:center !important; gap:8px !important; }
  html body #ftlh-portal-root .ftlh-test-meta{ justify-content:center !important; }
  html body #ftlh-portal-root .ftlh-question-card{ padding:22px 16px !important; }
  html body #ftlh-portal-root .ftlh-q-text{ font-size:1rem !important; }
  html body #ftlh-portal-root .ftlh-option{ grid-template-columns:34px 1fr auto !important; padding:12px 12px !important; gap:10px !important; }
  html body #ftlh-portal-root .ftlh-submit-btn{ width:min(360px, 100%) !important; min-width:0 !important; padding-left:22px !important; padding-right:22px !important; }
  html body #ftlh-portal-root .ftlh-home-btn{ width:auto !important; max-width:100% !important; min-width:0 !important; padding-left:24px !important; padding-right:24px !important; }
}

@media (max-width: 420px){
  html body #ftlh-portal-root .ftlh-option{ grid-template-columns:32px 1fr !important; }
  html body #ftlh-portal-root .ftlh-tick{ grid-column:2 !important; justify-self:end !important; }
  html body #ftlh-portal-root .ftlh-result-breakdown{ width:100% !important; }
  html body #ftlh-portal-root .ftlh-rb{ min-width:0 !important; }
}

/* ============================================================
   FTLH Final Frontend Polish v1.1
   - Hero subtitle centered
   - Full-bleed portal background to remove page section side gaps
   - Proper test start/end margins
   - Option tick no longer cuts from the right side
   ============================================================ */
html body #ftlh-portal-root{
  width:100vw !important;
  max-width:100vw !important;
  margin-left:calc(50% - 50vw) !important;
  margin-right:calc(50% - 50vw) !important;
  background:#030b17 !important;
  overflow-x:hidden !important;
}

html body #ftlh-portal-root .ftlh-hero-sub{
  display:block !important;
  width:min(620px, 100%) !important;
  margin-left:auto !important;
  margin-right:auto !important;
  text-align:center !important;
}

html body #ftlh-portal-root .ftlh-test-section{
  padding-left:clamp(18px, 4vw, 46px) !important;
  padding-right:clamp(18px, 4vw, 46px) !important;
  background:
    radial-gradient(ellipse 80% 40% at 50% 0%, rgba(32,168,255,.12) 0%, transparent 60%),
    linear-gradient(160deg, #030b17 0%, #071426 40%, #063018 80%, #030b17 100%) !important;
}

html body #ftlh-portal-root .ftlh-test-header,
html body #ftlh-portal-root .ftlh-questions-container,
html body #ftlh-portal-root .ftlh-submit-wrap{
  width:min(980px, 100%) !important;
  max-width:980px !important;
}

html body #ftlh-portal-root .ftlh-questions-container{
  padding:0 !important;
  margin-left:auto !important;
  margin-right:auto !important;
}

html body #ftlh-portal-root .ftlh-question-card{
  overflow:visible !important;
  padding-left:30px !important;
  padding-right:30px !important;
}

html body #ftlh-portal-root .ftlh-option{
  grid-template-columns:38px minmax(0, 1fr) 32px !important;
  padding-right:20px !important;
  overflow:visible !important;
}

html body #ftlh-portal-root .ftlh-tick{
  justify-self:center !important;
  width:24px !important;
  text-align:center !important;
  margin-right:0 !important;
}

html body #ftlh-portal-root .ftlh-logo,
html body #ftlh-portal-root .ftlh-header-logo{
  background:transparent !important;
}

@media (max-width:700px){
  html body #ftlh-portal-root .ftlh-test-section{
    padding-left:14px !important;
    padding-right:14px !important;
  }
  html body #ftlh-portal-root .ftlh-question-card{
    padding-left:18px !important;
    padding-right:18px !important;
  }
  html body #ftlh-portal-root .ftlh-option{
    grid-template-columns:34px minmax(0, 1fr) 28px !important;
    padding-right:14px !important;
  }
}

@media (max-width:420px){
  html body #ftlh-portal-root .ftlh-option{
    grid-template-columns:32px minmax(0, 1fr) 26px !important;
  }
  html body #ftlh-portal-root .ftlh-tick{
    grid-column:auto !important;
  }
}
