/* =========================================================
   STUDENT BATTLE KHP — PROFESSIONAL DARK/GOLD UI
========================================================= */

*,*::before,*::after{box-sizing:border-box}

:root{
  --bg:#090909;
  --panel:#121212;
  --panel-2:#181818;
  --gold:#f4b400;
  --gold-light:#ffd25c;
  --text:#f7f7f7;
  --muted:#9b9b9b;
  --border:rgba(255,255,255,.09);
  --success:#39c36b;
  --danger:#ef5350;
  --shadow:0 25px 80px rgba(0,0,0,.48);
  --container:1028px;
}

html{
  scroll-behavior:smooth;
  background:var(--bg);
  overflow-x:hidden;
}

body{
  margin:0;
  min-height:100vh;
  width:100%;
  max-width:100%;
  overflow-x:hidden;
  background:
    radial-gradient(
      850px 450px at 82% -5%,
      rgba(244,180,0,.06),
      transparent 62%
    ),
    radial-gradient(
      700px 450px at -10% 35%,
      rgba(244,180,0,.025),
      transparent 65%
    ),
    var(--bg);
  color:var(--text);
  font-family:"DM Sans",-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  line-height:1.5;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}

body::before{
  content:"";
  position:fixed;
  inset:0;
  pointer-events:none;
  z-index:-1;
  background:linear-gradient(
    90deg,
    transparent,
    rgba(255,255,255,.01),
    transparent
  );
}

button,
input,
select{
  font:inherit;
}

button{
  cursor:pointer;
}

button:disabled{
  cursor:not-allowed;
  opacity:.65;
}

button:focus-visible,
input:focus-visible,
select:focus-visible{
  outline:2px solid var(--gold);
  outline-offset:3px;
}

::selection{
  background:rgba(244,180,0,.25);
  color:#fff;
}


/* =========================================================
   HEADER
========================================================= */

.site-header{
  position:sticky;
  top:0;
  z-index:100;
  min-height:78px;
  width:100%;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  padding:14px max(5%,calc((100% - var(--container))/2));
  background:rgba(9,9,9,.84);
  border-bottom:1px solid rgba(255,255,255,.075);
  backdrop-filter:blur(22px);
  -webkit-backdrop-filter:blur(22px);
}

.site-header::after{
  content:"";
  position:absolute;
  left:0;
  right:0;
  bottom:-1px;
  height:1px;
  background:linear-gradient(
    90deg,
    transparent,
    rgba(244,180,0,.18),
    transparent
  );
}

.brand{
  display:flex;
  align-items:center;
  gap:12px;
  min-width:0;
  flex-shrink:1;
}

.brand-mark{
  width:44px;
  height:44px;
  flex:0 0 44px;
  display:grid;
  place-items:center;
  border:1px solid rgba(244,180,0,.22);
  border-radius:13px;
  background:linear-gradient(
    145deg,
    var(--gold-light),
    var(--gold)
  );
  color:#111;
  font-size:21px;
  font-weight:900;
  box-shadow:0 8px 24px rgba(244,180,0,.14);
}

.brand-title{
  color:var(--text);
  font-size:16px;
  font-weight:800;
  line-height:1.1;
  letter-spacing:-.35px;
  white-space:nowrap;
}

.brand-title span{
  color:var(--gold);
}

.brand-subtitle{
  margin-top:4px;
  color:var(--muted);
  font-size:10px;
  font-weight:500;
  letter-spacing:.35px;
  white-space:nowrap;
}

.nav{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:7px;
  flex-shrink:0;
}

.nav>button:not(.nav-cta){
  position:relative;
  padding:9px 11px;
  border:0;
  border-radius:9px;
  background:transparent;
  color:#cfcfcf;
  font-size:13px;
  font-weight:600;
  transition:.2s;
  white-space:nowrap;
}

.nav>button:not(.nav-cta)::after{
  content:"";
  position:absolute;
  left:11px;
  right:11px;
  bottom:4px;
  height:2px;
  border-radius:2px;
  background:var(--gold);
  transform:scaleX(0);
  transition:.2s;
}

.nav>button:not(.nav-cta):hover{
  color:var(--gold-light);
  background:rgba(255,255,255,.035);
}

.nav>button:not(.nav-cta):hover::after{
  transform:scaleX(1);
}

#userArea{
  position:relative;
  display:flex;
  align-items:center;
  margin-left:8px;
  flex-shrink:0;
}

.nav-cta,
.primary-btn{
  min-height:44px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:10px 16px;
  border:1px solid rgba(244,180,0,.35);
  border-radius:11px;
  background:linear-gradient(
    145deg,
    var(--gold-light),
    var(--gold)
  );
  color:#111!important;
  font-size:13px;
  font-weight:800;
  box-shadow:0 8px 22px rgba(244,180,0,.12);
  transition:.2s;
}

.nav-cta:hover,
.primary-btn:hover{
  background:var(--gold-light);
  transform:translateY(-1px);
  box-shadow:0 12px 28px rgba(244,180,0,.18);
}


/* =========================================================
   MAIN / HERO
========================================================= */

main{
  width:100%;
  max-width:100%;
  overflow:hidden;
}

.hero{
  position:relative;
  width:min(var(--container),90%);
  min-height:690px;
  margin:auto;
  padding:96px 0 88px;
  display:grid;
  grid-template-columns:minmax(0,1.06fr) minmax(390px,.94fr);
  gap:78px;
  align-items:center;
}

.hero::before{
  content:"";
  position:absolute;
  width:520px;
  height:520px;
  left:-210px;
  top:30px;
  border-radius:50%;
  background:radial-gradient(
    circle,
    rgba(244,180,0,.055),
    transparent 68%
  );
  pointer-events:none;
}

.hero-copy{
  position:relative;
  z-index:1;
}

.eyebrow{
  display:inline-flex;
  align-items:center;
  gap:8px;
  color:var(--gold);
  font-size:11px;
  font-weight:800;
  letter-spacing:2px;
  text-transform:uppercase;
}

.eyebrow::before{
  content:"";
  width:22px;
  height:2px;
  border-radius:2px;
  background:var(--gold);
}

.hero h1,
.section-heading h2,
.modal-box h2,
.battle-top h2{
  font-family:"Playfair Display",Georgia,serif;
}

.hero h1{
  max-width:780px;
  margin:17px 0 21px;
  color:var(--text);
  font-size:clamp(48px,6vw,76px);
  font-weight:800;
  line-height:.98;
  letter-spacing:-2.8px;
}

.hero h1 span{
  color:var(--gold);
}

.hero-copy>p{
  max-width:620px;
  margin:0;
  color:var(--muted);
  font-size:16px;
  line-height:1.75;
}

.hero-actions{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  margin-top:31px;
}

.primary-btn{
  min-height:46px;
  padding:12px 18px;
}

.secondary-btn{
  min-height:46px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:12px 18px;
  border:1px solid var(--border);
  border-radius:11px;
  background:rgba(255,255,255,.025);
  color:#eee;
  font-size:13px;
  font-weight:800;
  transition:.2s;
}

.secondary-btn:hover{
  border-color:rgba(244,180,0,.4);
  background:rgba(244,180,0,.055);
  color:var(--gold-light);
  transform:translateY(-2px);
}

.full{
  width:100%;
}

.hero-stats{
  display:flex;
  flex-wrap:wrap;
  margin-top:39px;
}

.hero-stats>div{
  min-width:110px;
  display:grid;
  gap:2px;
  padding-right:28px;
  margin-right:28px;
  border-right:1px solid var(--border);
}

.hero-stats>div:last-child{
  padding-right:0;
  margin-right:0;
  border-right:0;
}

.hero-stats strong{
  color:var(--gold);
  font-size:24px;
  font-weight:800;
  line-height:1.1;
}

.hero-stats span{
  color:var(--muted);
  font-size:11px;
  font-weight:600;
  text-transform:uppercase;
  letter-spacing:.7px;
}


/* =========================================================
   HERO CARD
========================================================= */

.hero-card{
  position:relative;
  overflow:hidden;
  padding:34px;
  border:1px solid rgba(255,255,255,.085);
  border-radius:30px;
  background:linear-gradient(
    145deg,
    rgba(28,28,28,.96),
    rgba(15,15,15,.98)
  );
  box-shadow:0 35px 100px rgba(0,0,0,.55);
  isolation:isolate;
}

.hero-card::before{
  content:"";
  position:absolute;
  inset:0;
  border-radius:inherit;
  background:linear-gradient(
    145deg,
    rgba(244,180,0,.045),
    transparent 42%
  );
  pointer-events:none;
}

.hero-card::after{
  content:"";
  position:absolute;
  left:25px;
  right:25px;
  bottom:0;
  height:1px;
  background:linear-gradient(
    90deg,
    transparent,
    rgba(244,180,0,.35),
    transparent
  );
}

.card-glow{
  position:absolute;
  width:230px;
  height:230px;
  right:-105px;
  top:-105px;
  border-radius:50%;
  background:rgba(244,180,0,.13);
  filter:blur(25px);
  pointer-events:none;
}

.battle-card-top{
  position:relative;
  z-index:1;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
}

.battle-card-top span:first-child{
  color:var(--gold);
  font-size:10px;
  font-weight:900;
  letter-spacing:1.8px;
}

.live-dot{
  color:var(--danger);
  font-size:12px;
  filter:drop-shadow(
    0 0 6px rgba(239,83,80,.4)
  );
}

.hero-card h3{
  position:relative;
  z-index:1;
  margin:38px 0 7px;
  font-family:"Playfair Display",Georgia,serif;
  font-size:29px;
  line-height:1.15;
}

.hero-card>p{
  position:relative;
  z-index:1;
  margin:0;
  color:var(--muted);
  font-size:13px;
}

.versus{
  position:relative;
  z-index:1;
  display:grid;
  grid-template-columns:1fr auto 1fr;
  align-items:center;
  gap:16px;
  margin:32px 0;
}

.player{
  text-align:center;
}

.avatar{
  width:64px;
  height:64px;
  display:grid;
  place-items:center;
  margin:0 auto 10px;
  border:1px solid rgba(244,180,0,.35);
  border-radius:18px;
  background:linear-gradient(
    145deg,
    var(--gold-light),
    var(--gold)
  );
  color:#111;
  font-size:25px;
  font-weight:900;
  box-shadow:0 10px 25px rgba(244,180,0,.12);
}

.avatar.alt{
  border-color:rgba(255,255,255,.16);
  background:linear-gradient(
    145deg,
    #eee,
    #ccc
  );
  color:#111;
  box-shadow:0 10px 25px rgba(0,0,0,.22);
}

.player strong{
  font-size:14px;
}

.player small{
  display:block;
  margin-top:3px;
  color:var(--muted);
  font-size:10px;
  font-weight:600;
  letter-spacing:.7px;
  text-transform:uppercase;
}

.vs{
  width:42px;
  height:42px;
  display:grid;
  place-items:center;
  border:1px solid rgba(244,180,0,.22);
  border-radius:50%;
  background:rgba(244,180,0,.055);
  color:var(--gold);
  font-size:11px;
  font-weight:900;
}


/* =========================================================
   SECTIONS / CARDS
========================================================= */

.section{
  width:min(var(--container),90%);
  margin:auto;
  padding:92px 0;
}

.section-heading{
  max-width:720px;
  margin-bottom:34px;
}

.section-heading h2{
  margin:9px 0 10px;
  font-size:clamp(34px,4vw,46px);
  line-height:1.05;
  letter-spacing:-1.5px;
}

.section-heading p{
  max-width:650px;
  margin:0;
  color:var(--muted);
  font-size:14px;
  line-height:1.7;
}

.institute-grid,
.category-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:16px;
}

.institute-card,
.category-card{
  position:relative;
  overflow:hidden;
  border:1px solid var(--border);
  border-radius:20px;
  background:linear-gradient(
    145deg,
    rgba(24,24,24,.95),
    rgba(15,15,15,.95)
  );
  box-shadow:0 10px 35px rgba(0,0,0,.14);
  transition:.25s;
}

.institute-card{
  min-height:215px;
  padding:25px;
}

.institute-card::before{
  content:"";
  position:absolute;
  width:150px;
  height:150px;
  right:-75px;
  top:-75px;
  border-radius:50%;
  background:rgba(244,180,0,.045);
  filter:blur(10px);
}

.institute-card:hover,
.category-card:hover{
  transform:translateY(-5px);
  border-color:rgba(244,180,0,.28);
  box-shadow:0 18px 45px rgba(0,0,0,.25);
}

.institute-card.featured{
  border-color:rgba(244,180,0,.32);
  background:linear-gradient(
    145deg,
    rgba(29,26,15,.98),
    rgba(18,18,18,.98)
  );
}

.rank{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:38px;
  height:27px;
  padding:0 9px;
  border:1px solid rgba(244,180,0,.2);
  border-radius:8px;
  background:rgba(244,180,0,.07);
  color:var(--gold);
  font-size:11px;
  font-weight:900;
  letter-spacing:.8px;
}

.institute-card h3{
  max-width:100%;
  margin:40px 0 4px;
  font-size:20px;
  line-height:1.2;
  overflow-wrap:anywhere;
}

.institute-card p{
  margin:0 0 8px;
  color:var(--gold);
  font-size:13px;
  font-weight:800;
}

.institute-card>span{
  color:var(--muted);
  font-size:12px;
}

.category-card{
  min-height:178px;
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  padding:24px;
  color:var(--text);
  text-align:left;
}

.category-card::before{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(
    145deg,
    rgba(244,180,0,.055),
    transparent 45%
  );
  opacity:0;
  transition:.25s;
}

.category-card::after{
  content:"→";
  position:absolute;
  right:20px;
  bottom:19px;
  color:#777;
  font-size:18px;
  transition:.25s;
}

.category-card:hover::before{
  opacity:1;
}

.category-card:hover::after{
  color:var(--gold);
  transform:translateX(3px);
}

.category-card span{
  position:relative;
  z-index:1;
  width:48px;
  height:48px;
  display:grid;
  place-items:center;
  margin-bottom:23px;
  border:1px solid rgba(244,180,0,.15);
  border-radius:14px;
  background:rgba(244,180,0,.07);
  font-size:22px;
}

.category-card strong,
.category-card small{
  position:relative;
  z-index:1;
}

.category-card strong{
  font-size:15px;
  font-weight:800;
}

.category-card small{
  margin-top:5px;
  color:var(--muted);
  font-size:11px;
  font-weight:600;
}


/* =========================================================
   FOOTER
========================================================= */

.site-footer{
  position:relative;
  margin-top:30px;
  padding:58px 5% 32px;
  border-top:1px solid var(--border);
  background:
    linear-gradient(
      180deg,
      rgba(255,255,255,.008),
      rgba(0,0,0,.12)
    );
  text-align:center;
  color:var(--muted);
}

.site-footer::before{
  content:"";
  position:absolute;
  top:-1px;
  left:50%;
  width:130px;
  height:1px;
  transform:translateX(-50%);
  background:linear-gradient(
    90deg,
    transparent,
    var(--gold),
    transparent
  );
}

.footer-inner{
  width:min(100%,var(--container));
  margin:0 auto;
}

.footer-brand{
  color:#fff;
  font-size:21px;
  font-weight:800;
  letter-spacing:-.4px;
}

.footer-brand span{
  color:var(--gold);
}

.footer-tagline{
  margin:8px 0 0;
  color:var(--muted);
  font-size:12px;
  font-weight:500;
}

.footer-divider{
  width:46px;
  height:1px;
  margin:24px auto 20px;
  background:rgba(255,255,255,.12);
}

.footer-copyright{
  margin:0;
  color:#777;
  font-size:11px;
  font-weight:500;
  letter-spacing:.2px;
}


/* =========================================================
   MODALS
========================================================= */

.modal-overlay{
  position:fixed;
  inset:0;
  z-index:1000;
  display:none;
  align-items:center;
  justify-content:center;
  padding:20px;
  background:rgba(0,0,0,.78);
  backdrop-filter:blur(14px);
  -webkit-backdrop-filter:blur(14px);
}

.modal-overlay.open{
  display:flex;
  animation:overlayIn .18s ease;
}

@keyframes overlayIn{
  from{opacity:0}
  to{opacity:1}
}

.modal-box{
  position:relative;
  width:min(100%,520px);
  max-height:min(92vh,850px);
  overflow-y:auto;
  padding:34px;
  border:1px solid rgba(255,255,255,.09);
  border-radius:26px;
  background:linear-gradient(
    145deg,
    rgba(27,27,27,.99),
    rgba(12,12,12,.99)
  );
  box-shadow:
    0 35px 110px rgba(0,0,0,.72),
    0 0 0 1px rgba(244,180,0,.035);
  animation:modalIn .22s ease;
  scrollbar-width:thin;
  scrollbar-color:#333 transparent;
}

.auth-box{
  width:min(100%,430px);
  padding:30px 30px 25px;
}

.modal-box::before{
  content:"";
  position:absolute;
  width:220px;
  height:220px;
  right:-110px;
  top:-110px;
  border-radius:50%;
  background:rgba(244,180,0,.08);
  filter:blur(22px);
  pointer-events:none;
}

@keyframes modalIn{
  from{
    opacity:0;
    transform:translateY(18px) scale(.975);
  }
  to{
    opacity:1;
    transform:translateY(0) scale(1);
  }
}

.modal-close{
  position:absolute;
  top:15px;
  right:15px;
  width:38px;
  height:38px;
  display:grid;
  place-items:center;
  padding:0;
  border:1px solid rgba(255,255,255,.07);
  border-radius:10px;
  background:rgba(255,255,255,.045);
  color:#999;
  font-size:23px;
  line-height:1;
  transition:.2s;
}

.modal-close:hover{
  border-color:rgba(244,180,0,.22);
  background:rgba(244,180,0,.09);
  color:var(--gold-light);
  transform:rotate(3deg);
}

.modal-icon{
  width:58px;
  height:58px;
  display:grid;
  place-items:center;
  margin-bottom:19px;
  border:1px solid rgba(244,180,0,.25);
  border-radius:16px;
  background:linear-gradient(
    145deg,
    var(--gold-light),
    var(--gold)
  );
  color:#111;
  font-size:26px;
  box-shadow:0 12px 30px rgba(244,180,0,.14);
}

.modal-box h2{
  position:relative;
  z-index:1;
  margin:9px 0 7px;
  color:var(--text);
  font-size:32px;
  line-height:1.12;
  letter-spacing:-.7px;
}

.modal-subtitle{
  position:relative;
  z-index:1;
  margin:0;
  color:var(--muted);
  font-size:13px;
  line-height:1.65;
}

#registrationForm,
#loginForm{
  position:relative;
  z-index:1;
  margin-top:22px;
}

.form-group{
  margin:15px 0;
}

.form-group label{
  display:block;
  margin-bottom:7px;
  color:#ddd;
  font-size:12px;
  font-weight:700;
}

.form-group input,
.form-group select{
  width:100%;
  min-height:46px;
  padding:11px 13px;
  border:1px solid rgba(255,255,255,.09);
  border-radius:10px;
  outline:none;
  background:rgba(7,7,7,.82);
  color:#fff;
  font-size:13px;
  transition:.2s;
}

.form-group input::placeholder{
  color:#5f5f5f;
}

.form-group input:focus,
.form-group select:focus{
  border-color:var(--gold);
  background:#0b0b0b;
  box-shadow:0 0 0 3px rgba(244,180,0,.075);
}

.form-group select option{
  background:#111;
  color:#fff;
}

.auth-message{
  min-height:18px;
  margin:12px 0 0;
  text-align:center;
  color:var(--muted);
  font-size:11px;
  line-height:1.45;
}

.auth-message.error{
  color:#ffaaa7;
}

.auth-message.success{
  color:#9ee8b6;
}

.modal-note{
  position:relative;
  z-index:1;
  margin:12px 0 0;
  color:#777;
  font-size:11px;
  line-height:1.55;
  text-align:center;
}

.auth-switch{
  border:0;
  background:none;
  padding:0;
  color:var(--gold);
  font-size:inherit;
  font-weight:700;
}

.auth-switch:hover{
  color:var(--gold-light);
}


/* =========================================================
   PROFILE
========================================================= */

.profile-box{
  width:min(100%,560px);
}

.profile-details{
  display:grid;
  gap:10px;
  margin:25px 0 19px;
}

.profile-details>div{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  min-height:61px;
  padding:13px 15px;
  border:1px solid rgba(255,255,255,.075);
  border-radius:13px;
  background:rgba(255,255,255,.025);
  transition:.2s;
}

.profile-details>div:hover{
  border-color:rgba(244,180,0,.16);
  background:rgba(244,180,0,.035);
}

.profile-details span{
  color:var(--muted);
  font-size:12px;
  font-weight:600;
}

.profile-details strong{
  max-width:65%;
  color:var(--text);
  font-size:13px;
  font-weight:700;
  text-align:right;
  overflow-wrap:anywhere;
}

.profile-details>div:nth-child(3) strong,
.profile-details>div:nth-child(4) strong{
  color:var(--gold);
  font-size:15px;
}


/* =========================================================
   QUIZ
========================================================= */

.battle-modal{
  width:min(100%,760px);
}

.battle-top{
  position:relative;
  z-index:1;
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:20px;
  padding-right:36px;
}

.battle-top h2{
  margin:7px 0 0;
  font-size:30px;
  line-height:1.1;
}

.battle-top>strong{
  flex:0 0 auto;
  padding:8px 11px;
  border:1px solid rgba(244,180,0,.18);
  border-radius:9px;
  background:rgba(244,180,0,.055);
  color:var(--gold);
  font-size:11px;
  font-weight:800;
  white-space:nowrap;
}

.progress-track{
  position:relative;
  height:7px;
  margin:25px 0 34px;
  overflow:hidden;
  border-radius:999px;
  background:#242424;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.025);
}

.progress-bar{
  height:100%;
  width:2%;
  border-radius:inherit;
  background:linear-gradient(
    90deg,
    var(--gold),
    var(--gold-light)
  );
  box-shadow:0 0 15px rgba(244,180,0,.18);
  transition:width .25s ease;
}

.question-text{
  position:relative;
  margin:0;
  color:var(--text);
  font-size:22px;
  font-weight:700;
  line-height:1.45;
  letter-spacing:-.25px;
  overflow-wrap:anywhere;
}

.answers{
  display:grid;
  gap:10px;
  margin-top:24px;
}

.answer{
  position:relative;
  width:100%;
  min-height:54px;
  display:flex;
  align-items:center;
  padding:14px 16px;
  border:1px solid rgba(255,255,255,.08);
  border-radius:12px;
  background:rgba(255,255,255,.025);
  color:#eee;
  text-align:left;
  font-size:13px;
  font-weight:600;
  transition:.18s;
}

.answer:hover:not(:disabled){
  border-color:rgba(244,180,0,.38);
  background:rgba(244,180,0,.055);
  color:#fff;
  transform:translateX(3px);
}

.answer.correct{
  border-color:var(--success);
  background:rgba(57,195,107,.13);
  color:#baf2cc;
}

.answer.wrong{
  border-color:var(--danger);
  background:rgba(239,83,80,.13);
  color:#ffc1bf;
}

.quiz-result{
  min-height:20px;
  margin-top:17px;
  color:var(--gold);
  font-size:12px;
  font-weight:700;
  line-height:1.5;
  text-align:center;
}


/* =========================================================
   SCROLLBAR
========================================================= */

::-webkit-scrollbar{
  width:9px;
  height:9px;
}

::-webkit-scrollbar-track{
  background:#080808;
}

::-webkit-scrollbar-thumb{
  background:#303030;
  border:2px solid #080808;
  border-radius:999px;
}

::-webkit-scrollbar-thumb:hover{
  background:#4a4a4a;
}


/* =========================================================
   COMPETITION STATUS / REAL DATA ONLY
========================================================= */

.status-dot{
  color:var(--muted);
  font-size:12px;
}

.competition-placeholder{
  position:relative;
  z-index:1;
  display:flex;
  align-items:center;
  gap:13px;
  margin:28px 0 20px;
  padding:15px;
  border:1px solid rgba(255,255,255,.07);
  border-radius:14px;
  background:rgba(255,255,255,.025);
}

.placeholder-icon{
  width:42px;
  height:42px;
  flex:0 0 42px;
  display:grid;
  place-items:center;
  border-radius:12px;
  background:rgba(244,180,0,.08);
  border:1px solid rgba(244,180,0,.16);
  color:var(--gold);
}

.competition-placeholder strong,
.competition-placeholder small{
  display:block;
}

.competition-placeholder strong{
  color:var(--text);
  font-size:13px;
}

.competition-placeholder small{
  margin-top:3px;
  color:var(--muted);
  font-size:11px;
  line-height:1.5;
}


/* =========================================================
   UNIVERSITY CARDS
========================================================= */

.institute-card h3{
  max-width:100%;
  font-size:20px;
  line-height:1.2;
}

.institute-card p{
  margin-bottom:8px;
}


/* =========================================================
   LEADERBOARD
========================================================= */

#leaderboardSection[hidden]{
  display:none!important;
}

.leaderboard-list{
  display:grid;
  gap:10px;
}

.leaderboard-row{
  display:grid;
  grid-template-columns:58px minmax(0,1fr) 110px 100px;
  align-items:center;
  gap:16px;
  min-height:70px;
  padding:13px 16px;
  border:1px solid var(--border);
  border-radius:14px;
  background:rgba(255,255,255,.025);
}

.leaderboard-row:first-child{
  border-color:rgba(244,180,0,.32);
  background:rgba(244,180,0,.045);
}

.leaderboard-rank{
  color:var(--gold);
  font-weight:900;
  text-align:center;
}

.leaderboard-student strong,
.leaderboard-student span,
.leaderboard-score strong,
.leaderboard-score span{
  display:block;
}

.leaderboard-student strong{
  color:var(--text);
  font-size:14px;
  overflow-wrap:anywhere;
}

.leaderboard-student span,
.leaderboard-score span,
.leaderboard-battles{
  color:var(--muted);
  font-size:11px;
}

.leaderboard-score{
  text-align:right;
}

.leaderboard-score strong{
  color:var(--gold);
  font-size:19px;
}

.leaderboard-battles{
  text-align:right;
}


/* =========================================================
   TABLET
========================================================= */

@media(max-width:980px){

  .site-header{
    padding-left:4%;
    padding-right:4%;
  }

  .hero{
    grid-template-columns:1fr;
    width:min(720px,90%);
    padding-top:70px;
    gap:48px;
  }

  .hero-card{
    max-width:620px;
    width:100%;
    margin:0 auto;
  }

  .institute-grid,
  .category-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .section{
    width:min(720px,90%);
  }
}


/* =========================================================
   MOBILE — 700px AND BELOW
========================================================= */

@media(max-width:700px){

  html,
  body{
    width:100%;
    max-width:100%;
    overflow-x:hidden;
  }

  .site-header{
    min-height:68px;
    width:100%;
    padding:10px 3%;
    gap:6px;
  }

  .brand{
    gap:7px;
    min-width:0;
    max-width:42%;
  }

  .brand-mark{
    width:38px;
    height:38px;
    flex:0 0 38px;
    border-radius:10px;
    font-size:18px;
  }

  .brand-title{
    min-width:0;
    font-size:12px;
    letter-spacing:-.25px;
    overflow:hidden;
    text-overflow:ellipsis;
  }

  .brand-subtitle{
    font-size:8px;
    letter-spacing:.15px;
    overflow:hidden;
    text-overflow:ellipsis;
  }

  /* -----------------------------------------
     MOBILE NAV
  ----------------------------------------- */

  .nav{
    min-width:0;
    display:flex;
    align-items:center;
    justify-content:flex-end;
    gap:2px;
    flex-shrink:0;
  }

  .nav>button:not(.nav-cta){
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:32px;
    padding:6px 5px;
    border-radius:7px;
    font-size:8px;
    font-weight:700;
    letter-spacing:-.1px;
    white-space:nowrap;
  }

  .nav>button:not(.nav-cta)::after{
    left:6px;
    right:6px;
    bottom:2px;
  }

  #userArea{
    margin-left:1px;
    flex-shrink:0;
  }

  .nav-cta{
    min-height:33px;
    padding:7px 8px;
    border-radius:8px;
    font-size:8px;
    font-weight:800;
    white-space:nowrap;
  }

  /* -----------------------------------------
     HERO
  ----------------------------------------- */

  .hero{
    width:90%;
    min-height:auto;
    padding:58px 0 50px;
    gap:40px;
  }

  .hero::before{
    width:360px;
    height:360px;
    left:-190px;
    top:0;
  }

  .eyebrow{
    font-size:9px;
    letter-spacing:1.6px;
  }

  .eyebrow::before{
    width:17px;
  }

  .hero h1{
    max-width:100%;
    margin:15px 0 18px;
    font-size:clamp(40px,11.5vw,56px);
    letter-spacing:-2px;
    line-height:1;
  }

  .hero-copy>p{
    max-width:100%;
    font-size:13px;
    line-height:1.7;
  }

  .hero-actions{
    flex-direction:column;
    align-items:stretch;
    gap:10px;
    margin-top:25px;
  }

  .hero-actions .primary-btn,
  .hero-actions .secondary-btn{
    width:100%;
  }

  .hero-stats{
    margin-top:29px;
    gap:16px 0;
  }

  .hero-stats>div{
    min-width:0;
    padding-right:15px;
    margin-right:15px;
  }

  .hero-stats strong{
    font-size:20px;
  }

  .hero-stats span{
    font-size:8px;
    letter-spacing:.45px;
  }

  /* -----------------------------------------
     HERO CARD
  ----------------------------------------- */

  .hero-card{
    width:100%;
    padding:24px 20px;
    border-radius:21px;
  }

  .battle-card-top{
    gap:10px;
  }

  .battle-card-top span:first-child{
    font-size:9px;
    letter-spacing:1.3px;
  }

  .live-dot{
    font-size:10px;
  }

  .hero-card h3{
    margin:30px 0 6px;
    font-size:24px;
  }

  .hero-card>p{
    font-size:12px;
  }

  .versus{
    gap:8px;
    margin:27px 0;
  }

  .avatar{
    width:55px;
    height:55px;
    border-radius:15px;
    font-size:21px;
  }

  .player strong{
    font-size:12px;
  }

  .player small{
    font-size:8px;
  }

  .vs{
    width:36px;
    height:36px;
    font-size:9px;
  }

  /* -----------------------------------------
     SECTIONS
  ----------------------------------------- */

  .section{
    width:90%;
    padding:65px 0;
  }

  .section-heading{
    margin-bottom:25px;
  }

  .section-heading h2{
    font-size:35px;
    letter-spacing:-1.1px;
  }

  .section-heading p{
    font-size:13px;
    line-height:1.65;
  }

  .institute-grid,
  .category-grid{
    grid-template-columns:1fr;
    gap:13px;
  }

  .institute-card{
    min-height:185px;
    padding:22px;
  }

  .institute-card h3{
    margin-top:34px;
    font-size:19px;
  }

  .category-card{
    min-height:150px;
    padding:21px;
  }

  /* -----------------------------------------
     FOOTER
  ----------------------------------------- */

  .site-footer{
    margin-top:20px;
    padding:48px 5% 27px;
  }

  .footer-brand{
    font-size:18px;
  }

  .footer-tagline{
    font-size:11px;
  }

  .footer-copyright{
    font-size:10px;
  }

  /* -----------------------------------------
     MODALS
  ----------------------------------------- */

  .modal-overlay{
    align-items:center;
    padding:12px;
  }

  .modal-box{
    width:100%;
    max-width:100%;
    max-height:94vh;
    padding:27px 19px;
    border-radius:21px;
  }

  .auth-box{
    width:100%;
    padding:24px 18px 20px;
  }

  .modal-close{
    top:12px;
    right:12px;
    width:35px;
    height:35px;
  }

  .modal-icon{
    width:52px;
    height:52px;
    margin-bottom:16px;
    border-radius:14px;
    font-size:23px;
  }

  .modal-box h2{
    margin-top:7px;
    font-size:27px;
  }

  .modal-subtitle{
    font-size:12px;
    line-height:1.6;
  }

  #registrationForm,
  #loginForm{
    margin-top:19px;
  }

  .form-group{
    margin:13px 0;
  }

  .form-group label{
    font-size:11px;
  }

  .form-group input,
  .form-group select{
    min-height:45px;
    font-size:12px;
  }

  /* -----------------------------------------
     PROFILE
  ----------------------------------------- */

  .profile-box{
    width:100%;
  }

  .profile-details{
    margin:21px 0 17px;
  }

  .profile-details>div{
    align-items:flex-start;
    flex-direction:column;
    gap:4px;
    min-height:auto;
    padding:12px 13px;
  }

  .profile-details span{
    font-size:11px;
  }

  .profile-details strong{
    max-width:100%;
    text-align:left;
    font-size:12px;
  }

  /* -----------------------------------------
     QUIZ / BATTLE MODAL
  ----------------------------------------- */

  .battle-modal{
    width:100%;
  }

  .battle-top{
    align-items:flex-start;
    flex-direction:column;
    gap:11px;
    padding-right:31px;
  }

  .battle-top h2{
    font-size:26px;
  }

  .battle-top>strong{
    padding:7px 10px;
    font-size:10px;
  }

  .progress-track{
    height:6px;
    margin:21px 0 27px;
  }

  .question-text{
    font-size:18px;
    line-height:1.48;
  }

  .answers{
    gap:8px;
    margin-top:20px;
  }

  .answer{
    min-height:50px;
    padding:12px;
    border-radius:10px;
    font-size:12px;
    line-height:1.45;
  }

  .answer:hover:not(:disabled){
    transform:none;
  }

  .quiz-result{
    font-size:11px;
  }

  /* -----------------------------------------
     LIVE COMPETITION STATUS
  ----------------------------------------- */

  .competition-placeholder{
    align-items:flex-start;
    gap:10px;
    margin:22px 0 17px;
    padding:13px;
  }

  .placeholder-icon{
    width:38px;
    height:38px;
    flex-basis:38px;
    border-radius:10px;
  }

  .competition-placeholder strong{
    font-size:12px;
  }

  .competition-placeholder small{
    font-size:10px;
  }

  /* -----------------------------------------
     LEADERBOARD
  ----------------------------------------- */
.leaderboard-row {
    display: grid !important;
    grid-template-columns: 40px minmax(0, 1fr) 80px !important;
    align-items: center !important;
    gap: 10px !important;
    width: 100% !important;
    min-height: 62px;
    padding: 10px;
    box-sizing: border-box;
}

.leaderboard-row .leaderboard-rank {
    grid-column: 1 !important;
    grid-row: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.leaderboard-row .leaderboard-student {
    grid-column: 2 !important;
    grid-row: 1 !important;
    min-width: 0;
}

.leaderboard-row .leaderboard-score {
    grid-column: 3 !important;
    grid-row: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    white-space: nowrap;
}

  .leaderboard-rank{
    font-size:12px;
  }

  .leaderboard-student strong{
    font-size:12px;
  }

  .leaderboard-student span{
    font-size:9px;
  }

  .leaderboard-score{
    text-align:right;
  }

  .leaderboard-score strong{
    font-size:16px;
  }

  .leaderboard-score span{
    font-size:9px;
  }

  .leaderboard-battles{
    display:none;
  }
}


/* =========================================================
   SMALL PHONES — 420px AND BELOW
========================================================= */

@media(max-width:420px){

  .site-header{
    padding:9px 2.5%;
    gap:3px;
  }

  .brand{
    gap:5px;
    max-width:38%;
  }

  .brand-mark{
    width:35px;
    height:35px;
    flex-basis:35px;
    border-radius:9px;
    font-size:17px;
  }

  .brand-title{
    font-size:10px;
    letter-spacing:-.2px;
  }

  .brand-subtitle{
    display:none;
  }

  /* SMALL PHONE NAV */

  .nav{
    gap:1px;
  }

  .nav>button:not(.nav-cta){
    min-height:30px;
    padding:5px 3px;
    border-radius:6px;
    font-size:7px;
  }

  .nav>button:not(.nav-cta)::after{
    left:4px;
    right:4px;
    bottom:1px;
  }

  .nav-cta{
    min-height:31px;
    padding:6px 6px;
    border-radius:7px;
    font-size:7px;
  }

  /* HERO */

  .hero{
    width:91%;
    padding:50px 0 44px;
    gap:35px;
  }

  .hero h1{
    font-size:39px;
    letter-spacing:-1.5px;
  }

  .hero-copy>p{
    font-size:12px;
  }

  .hero-stats{
    row-gap:17px;
  }

  .hero-stats>div{
    min-width:72px;
    padding-right:11px;
    margin-right:11px;
  }

  .hero-stats strong{
    font-size:18px;
  }

  .hero-stats span{
    font-size:7px;
  }

  /* HERO CARD */

  .hero-card{
    padding:20px 16px;
    border-radius:19px;
  }

  .hero-card h3{
    font-size:22px;
  }

  .versus{
    gap:5px;
  }

  .avatar{
    width:51px;
    height:51px;
    border-radius:13px;
    font-size:19px;
  }

  .player strong{
    font-size:11px;
  }

  .player small{
    font-size:7px;
    letter-spacing:.4px;
  }

  .vs{
    width:33px;
    height:33px;
    font-size:8px;
  }

  /* SECTIONS */

  .section{
    width:91%;
    padding:57px 0;
  }

  .section-heading h2{
    font-size:31px;
  }

  .section-heading p{
    font-size:12px;
  }

  .institute-card{
    min-height:175px;
    padding:19px;
  }

  .institute-card h3{
    margin-top:31px;
    font-size:18px;
  }

  .institute-card p{
    font-size:12px;
  }

  .institute-card>span{
    font-size:10px;
  }

  .category-card{
    min-height:143px;
    padding:19px;
  }

  .category-card span{
    width:43px;
    height:43px;
    margin-bottom:19px;
    border-radius:12px;
    font-size:19px;
  }

  .category-card strong{
    font-size:13px;
  }

  .category-card small{
    font-size:10px;
  }

  /* MODALS */

  .modal-overlay{
    padding:8px;
  }

  .modal-box{
    max-height:95vh;
    padding:24px 16px;
    border-radius:19px;
  }

  .auth-box{
    padding:22px 15px 18px;
  }

  .modal-close{
    width:33px;
    height:33px;
    top:10px;
    right:10px;
    font-size:20px;
  }

  .modal-icon{
    width:49px;
    height:49px;
    font-size:21px;
  }

  .modal-box h2{
    font-size:25px;
  }

  .modal-subtitle{
    font-size:11px;
  }

  .form-group input,
  .form-group select{
    min-height:43px;
    padding:10px 11px;
    font-size:11px;
  }

  /* PROFILE */

  .profile-details>div{
    padding:11px 12px;
  }

  /* QUIZ */

  .battle-top h2{
    font-size:24px;
  }

  .question-text{
    font-size:17px;
  }

  .answer{
    min-height:48px;
    padding:11px;
    font-size:11px;
  }

  /* LEADERBOARD */

  .leaderboard-row{
    grid-template-columns:34px minmax(0,1fr) 62px;
    gap:7px;
    padding:10px;
  }

  .leaderboard-student strong{
    font-size:11px;
  }

  .leaderboard-student span{
    font-size:8px;
  }

  .leaderboard-score strong{
    font-size:15px;
  }
}


/* =========================================================
   VERY SMALL PHONES — 360px AND BELOW
========================================================= */

@media(max-width:360px){

  .site-header{
    padding:8px 2%;
  }

  .brand{
    max-width:34%;
  }

  .brand-mark{
    width:32px;
    height:32px;
    flex-basis:32px;
    font-size:15px;
    border-radius:8px;
  }

  .brand-title{
    font-size:9px;
  }

  .nav{
    gap:0;
  }

  .nav>button:not(.nav-cta){
    min-height:29px;
    padding:4px 2px;
    font-size:6.5px;
  }

  .nav-cta{
    min-height:30px;
    padding:6px 5px;
    font-size:6.5px;
  }

  .hero{
    width:92%;
  }

  .hero h1{
    font-size:35px;
  }

  .hero-stats>div{
    border-right:0;
    padding-right:7px;
    margin-right:7px;
  }

  .hero-stats strong{
    font-size:17px;
  }

  .hero-stats span{
    font-size:6.5px;
  }

  .hero-card{
    padding:18px 13px;
  }

  .section{
    width:92%;
  }

  .section-heading h2{
    font-size:29px;
  }

  .modal-overlay{
    padding:5px;
  }

  .modal-box{
    padding:22px 13px;
    border-radius:17px;
  }

  .auth-box{
    padding:21px 13px 17px;
  }

  .battle-top{
    padding-right:28px;
  }

  .battle-top h2{
    font-size:22px;
  }

  .question-text{
    font-size:16px;
  }

  .answer{
    font-size:10.5px;
  }

  .leaderboard-row{
    grid-template-columns:30px minmax(0,1fr) 56px;
    gap:5px;
    padding:9px;
  }

  .leaderboard-rank{
    font-size:11px;
  }

  .leaderboard-score strong{
    font-size:14px;
  }
}


/* =========================================================
   EXTREMELY SMALL PHONES — 320px AND BELOW
========================================================= */

@media(max-width:320px){

  .brand{
    max-width:30%;
  }

  .brand-mark{
    width:30px;
    height:30px;
    flex-basis:30px;
    font-size:14px;
  }

  .brand-title{
    font-size:8px;
  }

  .nav>button:not(.nav-cta){
    padding:4px 1.5px;
    font-size:6px;
  }

  .nav-cta{
    padding:5px 4px;
    font-size:6px;
  }

  .hero h1{
    font-size:32px;
  }

  .hero-copy>p{
    font-size:11px;
  }

  .hero-stats{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:12px;
  }

  .hero-stats>div{
    min-width:0;
    margin:0;
    padding:0;
    border:0;
  }

  .hero-stats strong{
    font-size:16px;
  }

  .hero-stats span{
    font-size:6px;
  }

  .hero-card{
    padding:17px 11px;
  }

  .avatar{
    width:47px;
    height:47px;
    font-size:17px;
  }

  .vs{
    width:30px;
    height:30px;
  }

  .section-heading h2{
    font-size:27px;
  }

  .modal-box{
    padding:20px 11px;
  }

  .auth-box{
    padding:20px 11px 16px;
  }

  .modal-box h2{
    font-size:23px;
  }
}


/* =========================================================
   MOBILE TOUCH / ACCESSIBILITY IMPROVEMENTS
========================================================= */

@media (hover:none){

  .nav>button:not(.nav-cta):hover{
    color:#cfcfcf;
    background:transparent;
  }

  .nav>button:not(.nav-cta):hover::after{
    transform:scaleX(0);
  }

  .primary-btn:hover,
  .nav-cta:hover,
  .secondary-btn:hover{
    transform:none;
  }

  .institute-card:hover,
  .category-card:hover{
    transform:none;
  }

  .answer:hover:not(:disabled){
    transform:none;
  }
}


/* =========================================================
   REDUCED MOTION
========================================================= */

@media(prefers-reduced-motion:reduce){

  *,
  *::before,
  *::after{
    scroll-behavior:auto!important;
    animation-duration:.01ms!important;
    animation-iteration-count:1!important;
    transition-duration:.01ms!important;
  }
}

/* =========================================================
   FINAL MOBILE FIX
   Optimized for real phones such as 320px, 360px, 390px and 430px.
   This section intentionally comes LAST so it overrides older
   mobile rules above it.
========================================================= */

@media (max-width: 700px){

  html,
  body{
    width:100%;
    min-width:0;
    max-width:100%;
    overflow-x:hidden;
  }

  body{
    font-size:14px;
  }

  /* HEADER
     Keep the navigation readable instead of shrinking it to tiny text. */
  .site-header{
    position:fixed;
    top:0;
    left:0;
    right:0;
    min-height:64px;
    width:100%;
    padding:9px 12px;
    gap:8px;
    display:flex;
    align-items:center;
    z-index:1000;
  }

  main{
    padding-top:64px;
  }

  .brand{
    min-width:0;
    max-width:none;
    flex:1 1 auto;
    gap:8px;
  }

  .brand-mark{
    width:38px;
    height:38px;
    flex:0 0 38px;
    border-radius:10px;
    font-size:18px;
  }

  .brand-title{
    min-width:0;
    max-width:100%;
    font-size:12px;
    line-height:1.1;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }

  .brand-subtitle{
    display:block;
    max-width:100%;
    font-size:8px;
    line-height:1.1;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }

  .nav{
    flex:0 0 auto;
    min-width:0;
    max-width:60%;
    display:flex;
    align-items:center;
    justify-content:flex-end;
    gap:3px;
  }

  .nav>button:not(.nav-cta){
    min-height:34px;
    padding:6px 6px;
    border-radius:7px;
    font-size:9px;
    font-weight:700;
    white-space:nowrap;
  }

  .nav>button:not(.nav-cta)::after{
    left:6px;
    right:6px;
    bottom:2px;
  }

  #userArea{
    margin-left:1px;
    flex:0 0 auto;
  }

  .nav-cta{
    min-height:34px;
    padding:7px 9px;
    border-radius:8px;
    font-size:9px;
    white-space:nowrap;
  }

  /* HERO */
  .hero{
    width:calc(100% - 28px);
    max-width:620px;
    min-height:auto;
    margin:0 auto;
    padding:52px 0 46px;
    display:grid;
    grid-template-columns:minmax(0,1fr);
    gap:34px;
  }

  .hero::before{
    width:320px;
    height:320px;
    left:-170px;
    top:0;
  }

  .hero-copy{
    width:100%;
    min-width:0;
  }

  .eyebrow{
    max-width:100%;
    font-size:9px;
    letter-spacing:1.4px;
  }

  .hero h1{
    max-width:100%;
    margin:14px 0 17px;
    font-size:clamp(38px,11vw,54px);
    line-height:1.02;
    letter-spacing:-1.8px;
    overflow-wrap:anywhere;
  }

  .hero-copy>p{
    max-width:100%;
    font-size:13px;
    line-height:1.65;
  }

  .hero-actions{
    width:100%;
    display:grid;
    grid-template-columns:1fr;
    gap:9px;
    margin-top:23px;
  }

  .hero-actions .primary-btn,
  .hero-actions .secondary-btn{
    width:100%;
    min-height:46px;
  }

  .hero-stats{
    width:100%;
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:10px;
    margin-top:28px;
  }

  .hero-stats>div{
    min-width:0;
    margin:0;
    padding:0 8px 0 0;
    border-right:1px solid var(--border);
  }

  .hero-stats>div:last-child{
    border-right:0;
    padding-right:0;
  }

  .hero-stats strong{
    font-size:19px;
  }

  .hero-stats span{
    font-size:8px;
    line-height:1.35;
    letter-spacing:.35px;
  }

  /* HERO CARD */
  .hero-card{
    width:100%;
    max-width:100%;
    margin:0;
    padding:22px 17px;
    border-radius:20px;
  }

  .battle-card-top{
    gap:8px;
  }

  .battle-card-top span:first-child{
    font-size:8.5px;
    letter-spacing:1.1px;
  }

  .live-dot{
    font-size:9px;
  }

  .hero-card h3{
    margin:27px 0 6px;
    font-size:23px;
    line-height:1.15;
  }

  .hero-card>p{
    font-size:11.5px;
    line-height:1.5;
  }

  .versus{
    width:100%;
    gap:7px;
    margin:24px 0;
  }

  .avatar{
    width:54px;
    height:54px;
    border-radius:14px;
    font-size:20px;
  }

  .player{
    min-width:0;
  }

  .player strong{
    display:block;
    max-width:100%;
    font-size:11px;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }

  .player small{
    font-size:7.5px;
  }

  .vs{
    width:34px;
    height:34px;
    flex:0 0 34px;
    font-size:8.5px;
  }

  /* SECTIONS */
  .section{
    width:calc(100% - 28px);
    max-width:620px;
    padding:56px 0;
  }

  .section-heading{
    width:100%;
    margin-bottom:23px;
  }

  .section-heading h2{
    max-width:100%;
    font-size:32px;
    line-height:1.05;
    letter-spacing:-1px;
  }

  .section-heading p{
    max-width:100%;
    font-size:12.5px;
    line-height:1.65;
  }

  .institute-grid,
  .category-grid{
    width:100%;
    grid-template-columns:1fr;
    gap:12px;
  }

  .institute-card{
    min-height:0;
    padding:20px;
  }

  .institute-card h3{
    margin-top:30px;
    font-size:18px;
    line-height:1.25;
  }

  .institute-card p{
    font-size:12px;
  }

  .institute-card>span{
    font-size:10px;
  }

  .category-card{
    min-height:140px;
    padding:19px;
  }

  /* FOOTER */
  .site-footer{
    margin-top:16px;
    padding:44px 14px 26px;
  }

  .footer-brand{
    font-size:18px;
  }

  .footer-tagline{
    font-size:10.5px;
  }

  .footer-copyright{
    font-size:9.5px;
  }

  /* MODALS */
  .modal-overlay{
    padding:9px;
  }

  .modal-box,
  .auth-box,
  .profile-box,
  .battle-modal{
    width:100%;
    max-width:100%;
  }

/* =========================================================
   NORMAL CATEGORY ANSWER OPTIONS
   ========================================================= */

.answer-option{
  position:relative;
  width:100%;
  min-height:54px;
  display:flex;
  align-items:center;
  gap:10px;
  padding:14px 16px;
  border:1px solid rgba(255,255,255,.08);
  border-radius:12px;
  background:rgba(255,255,255,.025);
  color:#eee;
  text-align:left;
  font-size:13px;
  font-weight:600;
  line-height:1.45;
  cursor:pointer;
  transition:.18s;
  box-sizing:border-box;
}

.answer-option:hover{
  border-color:rgba(244,180,0,.38);
  background:rgba(244,180,0,.055);
  color:#fff;
  transform:translateX(3px);
}

.answer-option span{
  flex:0 0 auto;
  color:var(--gold);
  font-weight:800;
}

@media (max-width:600px){

  .answer-option{
    min-height:48px;
    padding:11px;
    border-radius:10px;
    font-size:11.5px;
    line-height:1.45;
  }

}
  
  .modal-box{
    max-height:94vh;
    padding:25px 17px;
    border-radius:19px;
  }

  .auth-box{
    padding:23px 16px 19px;
  }

  .modal-close{
    width:34px;
    height:34px;
    top:10px;
    right:10px;
    font-size:20px;
  }

  .modal-icon{
    width:50px;
    height:50px;
    margin-bottom:15px;
    border-radius:14px;
    font-size:21px;
  }

  .modal-box h2{
    font-size:25px;
    line-height:1.12;
  }

  .modal-subtitle{
    font-size:11.5px;
    line-height:1.6;
  }

  #registrationForm,
  #loginForm{
    margin-top:18px;
  }

  .form-group{
    margin:12px 0;
  }

  .form-group label{
    font-size:11px;
  }

  .form-group input,
  .form-group select{
    min-height:44px;
    padding:10px 11px;
    font-size:12px;
  }

  /* PROFILE */
  .profile-details{
    margin:20px 0 16px;
  }

  .profile-details>div{
    align-items:flex-start;
    flex-direction:column;
    gap:4px;
    min-height:auto;
    padding:11px 12px;
  }

  .profile-details span{
    font-size:10.5px;
  }

  .profile-details strong{
    max-width:100%;
    text-align:left;
    font-size:12px;
  }

  /* QUIZ */
  .battle-top{
    align-items:flex-start;
    flex-direction:column;
    gap:9px;
    padding-right:29px;
  }

  .battle-top h2{
    font-size:24px;
  }

  .battle-top>strong{
    padding:6px 9px;
    font-size:9px;
  }

  .progress-track{
    height:6px;
    margin:20px 0 25px;
  }

  .question-text{
    font-size:16px;
    line-height:1.5;
  }

  .answers{
    gap:8px;
    margin-top:18px;
  }

  .answer{
    min-height:48px;
    padding:11px;
    border-radius:10px;
    font-size:11.5px;
    line-height:1.45;
  }

  .quiz-result{
    font-size:10.5px;
  }

  /* LIVE STATUS */
  .competition-placeholder{
    align-items:flex-start;
    gap:9px;
    margin:20px 0 16px;
    padding:12px;
  }

  .placeholder-icon{
    width:37px;
    height:37px;
    flex:0 0 37px;
    border-radius:10px;
  }

  .competition-placeholder strong{
    font-size:11.5px;
  }

  .competition-placeholder small{
    font-size:9.5px;
  }
/* LEADERBOARD */

.leaderboard-list{

    width:100%;

}

.leaderboard-item {
    width: 100%;
    display: grid !important;
    grid-template-columns: 40px minmax(0, 1fr) 80px !important;
    align-items: center !important;
    gap: 10px;
    min-height: 62px;
    padding: 10px 12px;
    box-sizing: border-box;
}

.leaderboard-rank {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 40px;
    text-align: center;
}

.leaderboard-player {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: center !important;
    min-width: 0;
}

.leaderboard-player strong {
    display: block;
    white-space: nowrap;
}

.leaderboard-score {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    text-align: right;
    white-space: nowrap;
}

.leaderboard-score strong{

    font-size:15px;

}

.leaderboard-score span{

    font-size:8px;

}

.leaderboard-battles{

    display:none;

}

}

/* Phones around 360px to 430px */

@media (min-width:361px) and (max-width:480px){

    .site-header{

        padding-left:10px;

        padding-right:10px;

    }

    .brand{

        flex-basis:42%;

    }

    .nav{

        max-width:58%;

    }

    .nav>button:not(.nav-cta){

        padding-left:5px;

        padding-right:5px;

        font-size:8.5px;

    }

    .nav-cta{

        padding-left:8px;

        padding-right:8px;

        font-size:8.5px;

    }

}

/* Small phones */

@media (max-width:360px){

    .site-header{

        min-height:60px;

        padding:8px 8px;

        gap:5px;

    }

    main{

        padding-top:60px;

    }

    .brand{

        flex-basis:39%;

        gap:6px;

    }

    .brand-mark{

        width:34px;

        height:34px;

        flex-basis:34px;

        font-size:16px;

    }

    .brand-title{

        font-size:10px;

    }

    .brand-subtitle{

        display:none;

    }

    .nav{

        max-width:61%;

        gap:1px;

    }

    .nav>button:not(.nav-cta){

        min-height:31px;

        padding:5px 4px;

        font-size:7.5px;

    }

    .nav-cta{

        min-height:31px;

        padding:6px 7px;

        font-size:7.5px;

    }

    .hero{

        width:calc(100% - 24px);

        padding-top:46px;

        padding-bottom:40px;

    }

    .hero h1{

        font-size:36px;

        letter-spacing:-1.4px;

    }

    .hero-copy>p{

        font-size:11.5px;

    }

    .hero-stats{

        gap:7px;

    }

    .hero-stats strong{

        font-size:17px;

    }

    .hero-stats span{

        font-size:7px;

    }

    .hero-card{

        padding:19px 14px;

    }

    .avatar{

        width:50px;

        height:50px;

        font-size:18px;

    }

    .vs{

        width:31px;

        height:31px;

        flex-basis:31px;

    }

    .section{

        width:calc(100% - 24px);

        padding:50px 0;

    }

    .section-heading h2{

        font-size:29px;

    }

}

/* Very small phones */

@media (max-width:320px){

    .site-header{

        padding-left:6px;

        padding-right:6px;

    }

    .brand{

        flex-basis:35%;

    }

    .brand-mark{

        width:31px;

        height:31px;

        flex-basis:31px;

        font-size:14px;

    }

    .brand-title{

        font-size:8.5px;

    }

    .nav{

        max-width:65%;

    }

    .nav>button:not(.nav-cta){

        padding:4px 2px;

        font-size:6.8px;

    }

    .nav-cta{

        padding:5px 5px;

        font-size:6.8px;

    }

    .hero h1{

        font-size:32px;

    }

    .hero-card{

        padding:17px 11px;

    }

    .section-heading h2{

        font-size:27px;

    }

    .modal-box{

        padding-left:12px;

        padding-right:12px;

    }

}
/* =========================================================
   FIX BATTLE QUESTION OPTIONS VISIBILITY
   SIX CATEGORY BATTLES
========================================================= */

/*
   The battle modal was clipping the area below
   the question text. Allow the complete question
   and all four answer buttons to be visible.
*/

#battleModal {
    overflow-y: auto !important;
    max-height: 90vh !important;
}

#battleModal .battle-modal,
#battleModal .modal-content,
#battleModal .battle-content {
    max-height: none !important;
    overflow: visible !important;
}

#answerOptions {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    width: 100% !important;
    max-height: none !important;
    overflow: visible !important;
    visibility: visible !important;
    opacity: 1 !important;
}

#answerOptions .answer-option {
    display: flex !important;
    width: 100% !important;
    min-height: 54px !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 10 !important;
}

#liveAnswerOptions {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    width: 100% !important;
    max-height: none !important;
    overflow: visible !important;
    visibility: visible !important;
    opacity: 1 !important;
}

#liveAnswerOptions .answer-option {
    display: flex !important;
    width: 100% !important;
    min-height: 54px !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 10 !important;
}

/* Make the question area itself fully visible */

#questionText,
#liveCompetitionContent,
.live-question-text {
    overflow: visible !important;
    max-height: none !important;
}

/* Prevent a parent from cutting off the answer buttons */

.battle-modal,
.battle-modal-content,
.battle-content,
.competition-modal,
.competition-modal-content {
    overflow-y: auto !important;
}

/* Mobile */

@media (max-width: 768px) {

    #battleModal {
        max-height: 94vh !important;
    }

    #answerOptions,
    #liveAnswerOptions {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }

    #answerOptions .answer-option,
    #liveAnswerOptions .answer-option {
        min-height: 50px !important;
        padding: 12px 14px !important;
    }
}
