@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800&family=Sora:wght@600;800&display=swap');

/* ================= HIMALAYAN THEME ================= */
:root {
  --primary: #1b6cfb;
  --primary-dark: #0046d1;
  --primary-light: #6ea0ff;
  --accent: #e8a33d;
  --accent-light: #f4c17a;
  --snow: #f6f9fb;
  --mist: #eaf1f4;
  --ink: #16232b;
  --ink-muted: #56707a;
  --border: #dbe6ea;
  --white: #ffffff;
  --radius: 14px;
  --shadow: 0 4px 20px rgba(27, 108, 251, 0.08);
  --shadow-hover: 0 12px 32px rgba(0, 0, 0, 0.15);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Sora', var(--font);
}

[data-theme="dark"] {
  --snow: #000000;
  --mist: #080808;
  --ink: #f0f6f9;
  --ink-muted: #8b9ea7;
  --border: #1e2933;
  --white: #172029;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  --shadow-hover: 0 12px 32px rgba(0, 0, 0, 0.6);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: var(--font);
  background: var(--snow);
  color: var(--ink);
  line-height: 1.6;
  transition: background .3s ease, color .3s ease;
}

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 800; letter-spacing: -0.02em; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ============ NAVBAR ============ */
.navbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(246, 249, 251, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  transition: background .3s ease, border-color .3s ease;
}
[data-theme="dark"] .navbar { background: rgba(0, 0, 0, 0.88); border-bottom-color: rgba(255, 255, 255, 0.08); }

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  width: 100%;
  max-width: 1300px;
  margin: 0 auto;
  gap: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; min-width: 0; }
.brand .logo-main { width: 38px; height: 38px; object-fit: contain; flex-shrink: 0; }
.brand-text { min-width: 0; }
.brand-text .name { font-family: var(--font-display); font-weight: 800; font-size: 15px; letter-spacing: 0.02em; white-space: nowrap; }
.brand-text .sub { font-size: 11px; color: var(--ink-muted); white-space: nowrap; }

.nav-links { display: flex; gap: 24px; list-style: none; align-items: center; margin: 0; padding: 0; }
.nav-links a { font-size: 14px; font-weight: 600; color: var(--ink-muted); padding: 8px 4px; position: relative; transition: color .2s; white-space: nowrap; }
.nav-links a:hover, .nav-links a.active { color: var(--primary); }
.nav-links a.active::after {
  content: ''; position: absolute; bottom: -4px; left: 0; right: 0; height: 2px; background: var(--accent); border-radius: 2px;
}

.nav-right { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.theme-toggle {
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--border);
  background: var(--white); cursor: pointer; display: flex; align-items: center;
  justify-content: center; transition: transform .2s, background .2s; color: var(--ink); flex-shrink: 0;
}
.theme-toggle:hover { transform: rotate(20deg); }
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

.btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 22px; border-radius: 10px; font-weight: 700; font-size: 13.5px; cursor: pointer; border: none; transition: all .25s ease; white-space: nowrap; }
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #fff; box-shadow: 0 4px 14px rgba(28,110,140,0.35); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(28,110,140,0.45); }
.btn-outline { background: transparent; border: 1.5px solid var(--border); color: var(--ink); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-accent { background: var(--accent); color: #1a1200; }
.btn-accent:hover { background: var(--accent-light); transform: translateY(-2px); }

.menu-toggle {
  display: none;
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--white); cursor: pointer;
  align-items: center; justify-content: center;
  color: var(--ink); padding: 0; flex-shrink: 0;
  transition: all .2s ease;
}
.menu-toggle:hover { background: var(--mist); }
.menu-toggle svg { width: 22px; height: 22px; }
.menu-toggle .icon-menu { display: block; }
.menu-toggle .icon-close { display: none; }
.navbar.mobile-open .menu-toggle .icon-menu { display: none; }
.navbar.mobile-open .menu-toggle .icon-close { display: block; }

/* ============ HERO ============ */
.hero { position: relative; padding: 90px 24px 70px; text-align: center; z-index: 1; overflow: hidden; }
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: 
    radial-gradient(circle at var(--mouse-x, 40%) var(--mouse-y, 40%), rgba(27,108,251,0.25) 0%, transparent 60%),
    radial-gradient(circle at calc(100% - var(--mouse-x, 60%)) calc(100% - var(--mouse-y, 60%)), rgba(110,160,255,0.15) 0%, transparent 60%);
  filter: blur(80px);
  z-index: -999;
  pointer-events: none;
}
.hero-bg { position: absolute; inset: 0; z-index: -2; background-size: cover; background-position: center; }
.pill { display: inline-block; background: var(--mist); border: 1px solid var(--border); color: var(--primary); font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; padding: 7px 16px; border-radius: 999px; margin-bottom: 20px; }
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); line-height: 1.08; margin-bottom: 20px; }
.hero h1 .accent { color: var(--primary); }
.hero p.lead { max-width: 640px; margin: 0 auto 32px; color: var(--ink-muted); font-size: 17px; }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-bottom: 40px; }

.avatars-row { display: flex; align-items: center; justify-content: center; gap: 12px; }
.avatars { display: flex; }
.avatars img, .avatars .more { width: 38px; height: 38px; border-radius: 50%; border: 3px solid var(--snow); object-fit: cover; margin-left: -12px; background: var(--mist); }
.avatars .more { display:flex; align-items:center; justify-content:center; font-size: 11px; font-weight:800; color: var(--primary); }

/* ============ SECTIONS ============ */
section { padding: 80px 24px; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 50px; }
.section-head .pill { margin-bottom: 14px; }
.section-head h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); margin-bottom: 12px; }
.section-head p { color: var(--ink-muted); }

.grid { display: grid; gap: 24px; }
.grid-1-1 { grid-template-columns: 1fr 1fr; align-items: center; }
.grid-2-1 { grid-template-columns: 2fr 1fr; align-items: start; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.team-grid { grid-template-columns: repeat(3, 1fr); }
.team-grid-lead { grid-template-columns: repeat(2, 1fr); max-width: 700px; margin: 0 auto; gap: 30px; }

.card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); transition: transform .25s, box-shadow .25s; }
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); }
.card .icon { width: 46px; height: 46px; border-radius: 12px; background: var(--mist); display: flex; align-items: center; justify-content: center; font-size: 20px; color: var(--primary); margin-bottom: 16px; }
.card h3 { font-size: 16px; margin-bottom: 8px; }
.card p { font-size: 14px; color: var(--ink-muted); }

.stats { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; margin: 40px 0; }
.stat-box { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 34px; text-align: center; min-width: 140px; }
.stat-box .num { font-size: 28px; font-weight: 800; color: var(--primary); font-family: var(--font-display); }
.stat-box .label { font-size: 12px; color: var(--ink-muted); text-transform: uppercase; letter-spacing: .05em; margin-top: 4px; }

/* ============ TEAM CARDS + IMAGE PLACEHOLDER ============ */
.team-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; position: relative; transition: transform .3s, box-shadow .3s; }
.team-card.flip-card { perspective: 1000px; background: transparent; border: none; box-shadow: none; overflow: visible; }
.flip-card-inner { position: relative; width: 100%; height: 100%; transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1); transform-style: preserve-3d; border-radius: var(--radius); }
@media (hover: hover) { .team-card.flip-card:hover .flip-card-inner { transform: rotateY(180deg); } }
.team-card.flip-card.is-flipped .flip-card-inner { transform: rotateY(180deg); }
.flip-card-front, .flip-card-back { width: 100%; -webkit-backface-visibility: hidden; backface-visibility: hidden; border-radius: var(--radius); overflow: hidden; background: var(--white); border: 1px solid var(--border); }
.flip-card-front { position: relative; z-index: 2; height: 100%; display: flex; flex-direction: column; }
.flip-card-back { position: absolute; top: 0; left: 0; height: 100%; transform: rotateY(180deg); background: var(--mist); padding: 20px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; z-index: 1; overflow-y: auto; }
.flip-card-back .highlights { color: var(--accent); font-size: 16px; line-height: 1.4; font-weight: 600; text-align: left; }
[data-theme="dark"] .flip-card-front, [data-theme="dark"] .flip-card-back { background: var(--card-bg); border-color: var(--border); }
.team-card:hover { transform: translateY(-6px); }
.team-photo { position: relative; width: 100%; aspect-ratio: 1/1; background: var(--mist); overflow: hidden; }
.team-photo img { width: 100%; height: 100%; object-fit: cover; }
/* Placeholder shown automatically when image fails to load (i.e. before you add the real photo) */
.team-photo img.broken { display: none; }
.photo-placeholder {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; border: 2px dashed var(--border); background: repeating-linear-gradient(45deg, var(--mist), var(--mist) 10px, var(--white) 10px, var(--white) 20px);
  color: var(--ink-muted); font-size: 12px; text-align: center; padding: 10px;
}
.photo-placeholder .cam { font-size: 26px; }
.team-info { padding: 16px 18px; }
.team-info .role { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--accent); margin-bottom: 4px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.badge-head { border: 1px solid var(--accent); color: var(--accent); background: transparent; padding: 2px 8px; border-radius: 12px; font-size: 9px; font-weight: 800; line-height: 1.2; letter-spacing: 0.05em; }
.team-info .tname { font-size: 15px; font-weight: 800; margin-bottom: 8px; }
.socials { display: flex; gap: 8px; }
.socials a { width: 28px; height: 28px; border-radius: 50%; background: var(--mist); display: flex; align-items: center; justify-content: center; font-size: 12px; color: var(--primary); transition: background .2s; }
.socials a:hover { background: var(--primary); color: #fff; }

/* ============ GALLERY ============ */
.gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.gallery-item { position: relative; aspect-ratio: 4/3; border-radius: 12px; overflow: hidden; cursor: pointer; background: var(--mist); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.gallery-item:hover img { transform: scale(1.08); }
.gallery-item .overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(18,60,77,0.7), transparent 60%); opacity: 0; transition: opacity .3s; display: flex; align-items: flex-end; padding: 12px; color: #fff; font-size: 12px; font-weight: 600; }
.gallery-item:hover .overlay { opacity: 1; }

.lightbox { position: fixed; inset: 0; background: rgba(11,26,32,0.92); display: none; align-items: center; justify-content: center; z-index: 999; padding: 40px; }
.lightbox.active { display: flex; }
.lightbox img { max-width: 90%; max-height: 85vh; border-radius: 10px; }
.lightbox-close { position: absolute; top: 24px; right: 32px; color: #fff; font-size: 30px; cursor: pointer; background: none; border: none; }

/* ============ CONTACT ============ */
.contact-grid { display: grid; grid-template-columns: 1fr; max-width: 500px; margin: 0 auto; gap: 24px; }
.form-group { margin-bottom: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
label { display: block; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-muted); margin-bottom: 6px; }
input, textarea {
  width: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--border); background: var(--mist); color: var(--ink); font-family: var(--font); font-size: 14px; transition: border .2s, box-shadow .2s;
}
input:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(28,110,140,0.15); background: var(--white); }
textarea { min-height: 130px; resize: vertical; }
.char-count { font-size: 11px; color: var(--ink-muted); text-align: right; margin-top: 4px; }
.form-status { margin-top: 14px; font-size: 13px; font-weight: 600; padding: 10px 14px; border-radius: 8px; display: none; }
.form-status.success { display: block; background: #e3f7e9; color: #1e7a3d; }
.form-status.error { display: block; background: #fce9e9; color: #b83232; }
.contact-side .card { margin-bottom: 20px; }
.contact-row { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 16px; }
.contact-row .icon { flex-shrink: 0; }
.contact-row .label-sm { font-size: 11px; color: var(--ink-muted); text-transform: uppercase; }
.contact-row .val { font-weight: 700; font-size: 14px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #2fbf6e; display: inline-block; margin-right: 6px; box-shadow: 0 0 0 4px rgba(47,191,110,0.2); }

/* ============ FOOTER ============ */
footer { background: var(--primary-dark); color: #dfeef2; padding: 60px 24px 24px; margin-top: 60px; }
.footer-grid .brand-text .name { color: #ffcc00; }
.footer-grid .brand-text .sub { color: #ffb84d; opacity: 0.9; }
.footer-grid .brand .logo-main { background: #ffcc00; padding: 4px; border-radius: 6px; transition: background .3s, transform .2s; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; max-width: 1200px; margin: 0 auto; }
.footer-grid h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 16px; color: var(--accent-light); }
.footer-grid ul { list-style: none; }
.footer-grid li { margin-bottom: 10px; font-size: 14px; opacity: .85; }
.footer-grid a:hover { color: var(--accent-light); }
.footer-bottom { text-align: center; margin-top: 40px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,0.1); font-size: 13px; opacity: .7; }

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
  .grid-1-1, .grid-2-1 { grid-template-columns: 1fr; }
  .grid-3, .grid-4, .team-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .form-row { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .grid-3, .grid-4, .gallery-grid, .team-grid, .team-grid-lead { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; width: 100%; align-items: stretch; padding: 0 20px; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .brand-text .sub { display: none; }
  .brand-text .name { font-size: 0; }
  .brand-text .name::after { content: 'AWS SBG'; font-size: 15px; }
  .container { padding: 0 14px; }
  .card, .glass-card { padding: 20px 14px; }
}

/* animation on scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ============ NEW COMPONENTS ============ */

/* Glassmorphism */
.glass-card {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: 0 8px 32px rgba(18, 60, 77, 0.1);
}
[data-theme="dark"] .glass-card {
  background: rgba(11, 26, 32, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Domain Cards */
.domain-card {
  text-align: center;
  padding: 32px 24px;
}
.domain-card .icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  font-size: 28px;
  border-radius: 50%;
  background: var(--mist);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s;
}
.domain-card:hover .icon {
  transform: scale(1.1) rotate(5deg);
  background: var(--primary);
  color: #fff;
}

/* Timeline (Events) */
.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 0;
}
.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 24px;
  width: 2px;
  background: var(--border);
}
.timeline-item {
  position: relative;
  padding-left: 60px;
  margin-bottom: 40px;
}
.timeline-item:last-child {
  margin-bottom: 0;
}
.timeline-dot {
  position: absolute;
  left: 17px;
  top: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  border: 4px solid var(--snow);
  box-shadow: 0 0 0 2px var(--border);
}
.timeline-content {
  background: var(--white);
  padding: 24px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.timeline-date {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

/* Blog Cards */
.blog-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.25s, box-shadow 0.25s;
}
.blog-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}
.blog-card-img {
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--mist);
  object-fit: cover;
}
.blog-card-body {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.blog-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.blog-meta img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
}
.blog-meta-info {
  font-size: 12px;
  color: var(--ink-muted);
}
.blog-category {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}

/* ============ RESPONSIVE NAVBAR & MOBILE DRAWER ============ */
body.mobile-menu-active { overflow: hidden; }

/* Desktop adjustments for compact laptop screens */
@media (max-width: 1200px) and (min-width: 961px) {
  .nav-inner { padding: 12px 20px; gap: 12px; }
  .nav-links { gap: 16px; }
  .nav-links a { font-size: 13px; padding: 6px 2px; }
  .brand-text .sub { display: none; }
  .brand-text .name { font-size: 14px; }
  .nav-right .btn-primary { padding: 9px 16px; font-size: 13px; }
}

/* Tablet and Mobile Screens */
@media (max-width: 960px) {
  .nav-links { display: none; }
  .nav-right .btn-primary { display: none; }
  .menu-toggle { display: flex; }

  .navbar.mobile-open {
    position: fixed; inset: 0; height: 100vh; height: 100dvh;
    background: var(--snow);
    z-index: 1000;
    display: flex; flex-direction: column;
    overflow-y: auto;
  }
  [data-theme="dark"] .navbar.mobile-open {
    background: #000000;
  }
  .navbar.mobile-open .nav-inner {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
  }
  .navbar.mobile-open .brand {
    display: flex;
  }
  .navbar.mobile-open .nav-right {
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .navbar.mobile-open .nav-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    margin: 0;
    padding: 30px 20px;
    gap: 16px;
    width: 100%;
    text-align: center;
    overflow-y: auto;
  }
  .navbar.mobile-open .nav-links a {
    font-size: 19px;
    font-weight: 700;
    color: var(--ink);
    padding: 10px 24px;
    border-radius: 12px;
    display: inline-block;
    transition: all .2s ease;
  }
  .navbar.mobile-open .nav-links a:hover,
  .navbar.mobile-open .nav-links a.active {
    color: var(--primary);
    background: var(--mist);
  }
  .navbar.mobile-open .nav-links a.active::after {
    display: none;
  }
}

/* Phones */
@media (max-width: 768px) {
  .brand-text .sub { display: none; }
}

/* Small Phones */
@media (max-width: 520px) {
  .nav-inner { padding: 12px 14px; }
  .brand { gap: 6px; }
  .brand .logo-main { width: 32px; height: 32px; }
  .brand span[style*="font-size: 24px"] { font-size: 18px !important; margin: 0 1px; }
  .brand-text .name { font-size: 13.5px; }
  .theme-toggle, .menu-toggle { width: 35px; height: 35px; }
  .theme-toggle svg, .menu-toggle svg { width: 19px; height: 19px; }
}

/* Extra small phones (e.g. 360px and smaller) */
@media (max-width: 380px) {
  .brand-text .name { font-size: 0; }
  .brand-text .name::after { content: 'AWS SBG'; font-size: 13.5px; font-weight: 800; font-family: var(--font-display); }
}

/* Toast Notification */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--ink);
  color: var(--snow);
  padding: 12px 24px;
  border-radius: 30px;
  font-size: 14px;
  font-weight: 600;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  z-index: 1000;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}
.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* Filter Tabs */
.filter-tabs {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}
.filter-btn {
  background: var(--white);
  border: 1px solid var(--border);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-muted);
  cursor: pointer;
  transition: all 0.2s;
}
.filter-btn:hover, .filter-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* Hide filtered items */
.filtered-out {
  display: none !important;
}

/* ============ ROLLING TEXT & GRADIENT ============ */
.roller-container {
  display: inline-block;
  height: 1.1em;
  overflow: hidden;
  vertical-align: bottom;
  position: relative;
}
.roller {
  display: flex;
  flex-direction: column;
  animation: rollDown 6s infinite cubic-bezier(0.7, 0, 0.3, 1);
}
.roll-text {
  height: 1.1em;
  line-height: 1.1em;
}
.gradient-blue {
  background: linear-gradient(90deg, #1b6cfb, #70a1ff, #1b6cfb, #70a1ff);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: gradientPan 3s linear infinite alternate;
}

@keyframes rollDown {
  0%, 40% { transform: translateY(0); }
  50%, 90% { transform: translateY(-1.1em); }
  100% { transform: translateY(-2.2em); }
}

@keyframes gradientPan {
  0% { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}

/* ============ HANDBOOK ============ */
.handbook-cover {
  background: #111;
  border-radius: 12px;
  padding: 40px;
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  aspect-ratio: 3/4;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.handbook-cover::after {
  content: '';
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  background: linear-gradient(135deg, rgba(27,108,251,0.1) 0%, transparent 100%);
  pointer-events: none;
}

/* ============ VIEW TRANSITIONS ============ */
:root {
  --expo-in: cubic-bezier(0.95, 0.05, 0.795, 0.035);
}

::view-transition-group(root) {
  z-index: 1;
}

::view-transition-old(root) {
  animation: none;
  z-index: 1;
}

::view-transition-new(root) {
  mask: var(--cloud-mask) center / 0 no-repeat;
  -webkit-mask: var(--cloud-mask) center / 0 no-repeat;
  animation: vt-cloud-scale 1s var(--expo-in) forwards;
  z-index: 2; /* Ensure incoming page sits on top of old page and is masked */
}

/* The Animated Blue Border */
::view-transition-group(cloud-border) {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  width: 100vw; height: 100vh;
  background: var(--animated-cloud) center / 0 no-repeat;
  animation: vt-cloud-scale 1s var(--expo-in) forwards;
  z-index: 99999;
}

::view-transition-new(cloud-border),
::view-transition-old(cloud-border) {
  display: none;
}

@keyframes vt-cloud-scale {
  0%, 40% { 
    mask-size: 25vmax; 
    -webkit-mask-size: 25vmax; 
    background-size: 25vmax;
  }
  100% { 
    mask-size: 400vmax; 
    -webkit-mask-size: 400vmax; 
    background-size: 400vmax;
  }
}

/* Coming Soon Dots */
.animated-dots {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  animation: dots 1.5s steps(4, end) infinite;
}
.animated-dots::after {
  content: '...';
}
@keyframes dots {
  0% { width: 0px; }
  100% { width: 1em; }
}

/* ============ EVENT MODAL ============ */
.event-modal {
  position: fixed;
  inset: 0;
  background: rgba(11,26,32,0.85);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.event-modal.active {
  opacity: 1;
  pointer-events: auto;
}
.event-modal-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  border-radius: var(--radius);
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
  transform: translateY(20px);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.event-modal.active .event-modal-content {
  transform: translateY(0);
}
.event-modal-content a {
  display: block;
}
.event-modal-content img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 90vh;
  display: block;
  border-radius: var(--radius);
}
.event-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  background: rgba(0,0,0,0.5);
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  transition: background 0.2s;
}
.event-modal-close:hover {
  background: rgba(0,0,0,0.8);
}

/* ==========================================================================
   VIBEATHON LEADERBOARD SYSTEM
   ========================================================================== */

/* Live Indicator */
.live-pulse-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  background-color: #ef4444;
  border-radius: 50%;
  margin-right: 6px;
  box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
  animation: pulse-live 1.8s infinite;
  vertical-align: middle;
}
@keyframes pulse-live {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
  70% { transform: scale(1.05); box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.leaderboard-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.leaderboard-nav-link .badge-live {
  font-size: 9px;
  font-weight: 800;
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  padding: 2px 6px;
  border-radius: 6px;
  letter-spacing: 0.05em;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Leaderboard Hero Banner */
.vibe-banner-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 40px;
  border: 1px solid var(--border);
  box-shadow: 0 16px 40px rgba(0, 70, 209, 0.12);
  background: var(--mist);
}
.vibe-banner-img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  display: block;
}
.vibe-banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.4) 0%, rgba(15, 23, 42, 0.85) 100%);
  display: flex;
  align-items: flex-end;
  padding: 28px 32px;
  color: #fff;
}
.vibe-banner-content h2 {
  font-size: clamp(1.4rem, 2.5vw, 2.2rem);
  color: #fff;
  margin-bottom: 6px;
}
.vibe-banner-content p {
  color: #e2e8f0;
  font-size: 14px;
  max-width: 700px;
}

/* Podium section */
.podium-section {
  margin: 20px 0 50px;
}
.podium-container {
  display: grid;
  grid-template-columns: 1fr 1.15fr 1fr;
  align-items: flex-end;
  gap: 20px;
  max-width: 960px;
  margin: 0 auto;
  padding: 20px 10px 0;
}
.podium-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
  text-align: center;
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.podium-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
}

.podium-rank-badge {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  margin: -45px auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 800;
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
  border: 3px solid var(--white);
  position: relative;
}
.podium-card.first {
  order: 2;
  border-color: rgba(245, 158, 11, 0.5);
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.08) 0%, var(--white) 35%);
  box-shadow: 0 12px 35px rgba(245, 158, 11, 0.2);
  min-height: 340px;
}
.podium-card.first .podium-rank-badge {
  background: linear-gradient(135deg, #ffd700, #f59e0b);
  color: #78350f;
  width: 60px;
  height: 60px;
  font-size: 26px;
  margin-top: -50px;
}
.podium-card.second {
  order: 1;
  border-color: rgba(148, 163, 184, 0.5);
  background: linear-gradient(180deg, rgba(148, 163, 184, 0.08) 0%, var(--white) 35%);
  min-height: 300px;
}
.podium-card.second .podium-rank-badge {
  background: linear-gradient(135deg, #e2e8f0, #94a3b8);
  color: #334155;
}
.podium-card.third {
  order: 3;
  border-color: rgba(217, 119, 6, 0.4);
  background: linear-gradient(180deg, rgba(217, 119, 6, 0.06) 0%, var(--white) 35%);
  min-height: 280px;
}
.podium-card.third .podium-rank-badge {
  background: linear-gradient(135deg, #fcd34d, #b45309);
  color: #451a03;
}

.podium-team-num {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 4px;
}
.podium-team-name {
  font-size: 18px;
  font-weight: 800;
  font-family: var(--font-display);
  margin-bottom: 6px;
  line-height: 1.25;
}
.podium-project-name {
  font-size: 12px;
  color: var(--ink-muted);
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 32px;
}
.podium-score-pill {
  background: var(--mist);
  border: 1px solid var(--border);
  padding: 10px 14px;
  border-radius: 12px;
  margin-top: auto;
}
.podium-score-pill .score-num {
  font-size: 26px;
  font-weight: 800;
  font-family: var(--font-display);
  color: var(--primary);
}
.podium-card.first .podium-score-pill .score-num {
  color: #d97706;
}
.podium-score-pill .score-max {
  font-size: 13px;
  color: var(--ink-muted);
  font-weight: 600;
}
.podium-meta-row {
  display: flex;
  justify-content: space-around;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
  font-size: 11.5px;
  color: var(--ink-muted);
}
.podium-meta-row strong {
  color: var(--ink);
}

/* Control Toolbar & Filters */
.toolbar-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}
.toolbar-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}
.search-box-wrapper {
  flex: 1;
  min-width: 260px;
  position: relative;
}
.search-box-wrapper input {
  padding-left: 40px;
  background: var(--snow);
  border-color: var(--border);
}
.search-box-wrapper .search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-muted);
  pointer-events: none;
}
.filter-pills-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.pill-filter-btn {
  padding: 7px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--snow);
  color: var(--ink-muted);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.pill-filter-btn:hover {
  background: var(--mist);
  color: var(--primary);
  border-color: var(--primary-light);
}
.pill-filter-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* Evaluator Action Bar */
.evaluator-banner {
  background: linear-gradient(135deg, rgba(27, 108, 251, 0.08), rgba(232, 163, 61, 0.08));
  border: 1px dashed var(--primary);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.evaluator-info {
  display: flex;
  align-items: center;
  gap: 12px;
}
.eval-badge-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.evaluator-info h4 {
  font-size: 15px;
  margin-bottom: 2px;
}
.evaluator-info p {
  font-size: 12.5px;
  color: var(--ink-muted);
}
.eval-actions-cluster {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.toggle-edit-mode-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 8px;
  border: 1.5px solid var(--primary);
  background: var(--white);
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}
.toggle-edit-mode-btn.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 12px rgba(27, 108, 251, 0.35);
}

/* Leaderboard Table Styles */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--white);
  box-shadow: var(--shadow);
}
.leaderboard-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13.5px;
  min-width: 980px;
}
.leaderboard-table th {
  background: var(--snow);
  padding: 16px 14px;
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-muted);
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}
.leaderboard-table td {
  padding: 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  transition: background 0.15s;
}
.leaderboard-table tr:last-child td {
  border-bottom: none;
}
.leaderboard-table tr:hover td {
  background: rgba(27, 108, 251, 0.03);
}

/* Rank Cells */
.rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  font-weight: 800;
  font-size: 14px;
  background: var(--mist);
  color: var(--ink);
  font-family: var(--font-display);
}
.rank-badge.rank-1 {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  color: #92400e;
  border: 1px solid #f59e0b;
}
.rank-badge.rank-2 {
  background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
  color: #334155;
  border: 1px solid #94a3b8;
}
.rank-badge.rank-3 {
  background: linear-gradient(135deg, #ffedd5, #fed7aa);
  color: #9a3412;
  border: 1px solid #ea580c;
}
.rank-badge.rank-top10 {
  background: rgba(27, 108, 251, 0.1);
  color: var(--primary);
  border: 1px solid rgba(27, 108, 251, 0.25);
}

/* Team Column */
.team-name-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.team-num-tag {
  font-size: 11px;
  font-weight: 700;
  color: var(--primary);
}
.team-title {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--ink);
}
.team-sub {
  font-size: 11.5px;
  color: var(--ink-muted);
}

/* Round Score Pills */
.round-cell-box {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.round-score-pill {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 8px;
  border-radius: 6px;
  background: var(--mist);
  font-weight: 700;
  font-size: 13px;
  color: var(--ink);
  min-width: 65px;
}
.round-score-pill .max {
  font-size: 10px;
  color: var(--ink-muted);
  font-weight: 500;
}
.prompt-sub-tag {
  font-size: 11px;
  color: var(--ink-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}
.prompt-sub-tag span {
  font-weight: 700;
  color: var(--ink);
}

/* Total Score Highlight */
.total-score-badge {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.total-num-wrap {
  display: flex;
  align-items: baseline;
  gap: 4px;
}
.total-num {
  font-size: 18px;
  font-weight: 800;
  color: var(--primary);
  font-family: var(--font-display);
}
.total-max {
  font-size: 11px;
  color: var(--ink-muted);
}
.mini-score-bar {
  width: 100%;
  height: 6px;
  background: var(--mist);
  border-radius: 999px;
  overflow: hidden;
}
.mini-score-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 999px;
  transition: width 0.4s ease;
}

/* Prompt Efficiency Badge */
.eff-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.25);
  white-space: nowrap;
}

/* Inline Edit Cells */
.inline-edit-input {
  width: 58px;
  padding: 4px 6px;
  border-radius: 6px;
  border: 1.5px solid var(--primary);
  background: var(--white);
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}
.inline-edit-input:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(27, 108, 251, 0.25);
}
.inline-prompt-input {
  width: 50px;
  padding: 2px 4px;
  font-size: 11px;
  border-radius: 4px;
  border: 1px solid var(--border);
  text-align: center;
  background: var(--white);
  color: var(--ink);
}

/* Action Button */
.btn-eval-trigger {
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 6px;
  background: var(--snow);
  border: 1px solid var(--border);
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s;
}
.btn-eval-trigger:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  transform: translateY(-1px);
}

/* Evaluation Modal */
.eval-modal {
  position: fixed;
  inset: 0;
  background: rgba(11, 26, 32, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.eval-modal.active {
  display: flex;
  opacity: 1;
}
.eval-modal-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 18px;
  width: 100%;
  max-width: 620px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
  padding: 30px;
  transform: translateY(20px);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.eval-modal.active .eval-modal-card {
  transform: translateY(0);
}
.eval-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.eval-modal-close-btn {
  background: var(--mist);
  border: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  cursor: pointer;
  color: var(--ink);
  transition: background 0.2s;
}
.eval-modal-close-btn:hover {
  background: var(--border);
}

.round-eval-card {
  background: var(--snow);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 16px;
}
.round-eval-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.round-eval-head h4 {
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.round-badge-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--primary);
  color: #fff;
}
.slider-group {
  margin-bottom: 12px;
}
.slider-row {
  display: flex;
  align-items: center;
  gap: 14px;
}
.slider-row input[type=range] {
  flex: 1;
  accent-color: var(--primary);
  height: 6px;
  cursor: pointer;
}
.slider-val-box {
  width: 60px;
  text-align: center;
  font-weight: 800;
  font-size: 16px;
  color: var(--primary);
  padding: 6px;
  border-radius: 8px;
  border: 1.5px solid var(--primary);
  background: var(--white);
}

.modal-summary-bar {
  background: linear-gradient(135deg, var(--mist), var(--snow));
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 20px;
  display: flex;
  justify-content: space-around;
  text-align: center;
  margin: 20px 0;
}
.modal-summary-bar .metric-val {
  font-size: 24px;
  font-weight: 800;
  font-family: var(--font-display);
  color: var(--primary);
}
.modal-summary-bar .metric-lbl {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--ink-muted);
  font-weight: 700;
}

/* Toast notification */
.toast-notice {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 14px 22px;
  background: #10b981;
  color: #fff;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 100000;
  transform: translateY(100px);
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
}
.toast-notice.show {
  transform: translateY(0);
  opacity: 1;
}

/* Round criteria box */
.round-criteria-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 24px;
}
.criteria-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}
.criteria-num {
  font-size: 12px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.criteria-marks-badge {
  display: inline-block;
  background: rgba(232, 163, 61, 0.15);
  color: var(--accent);
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 800;
  font-size: 11px;
  margin-bottom: 10px;
}
.criteria-card h3 {
  font-size: 16px;
  margin-bottom: 8px;
}
.criteria-card ul {
  padding-left: 18px;
  font-size: 13px;
  color: var(--ink-muted);
}
.criteria-card li {
  margin-bottom: 4px;
}

@media (max-width: 900px) {
  .podium-container {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .podium-card.first {
    order: 1;
    min-height: auto;
  }
  .podium-card.second {
    order: 2;
    min-height: auto;
  }
  .podium-card.third {
    order: 3;
    min-height: auto;
  }
  .round-criteria-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   SMART BOARD FULLSCREEN LEADERBOARD (MATCHING VENUE DISPLAY)
   ========================================================================== */

.smartboard-wrap {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 16px 20px 60px;
}

/* Smart Board Header Bar */
.smartboard-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 24px;
  padding: 14px 20px;
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}
.smartboard-brand-area {
  display: flex;
  align-items: center;
  gap: 12px;
}
.smartboard-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
}
.smartboard-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.smartboard-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  font-size: 13.5px;
  font-weight: 700;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  background: var(--snow);
  color: var(--ink);
  cursor: pointer;
  transition: all 0.2s ease;
}
.smartboard-btn:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  transform: translateY(-1px);
}
.smartboard-btn.active {
  background: var(--accent);
  color: #1a1200;
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(232, 163, 61, 0.4);
}

/* Timer Control Pill alongside Enter Marks */
.timer-control-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 4px 8px 4px 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  font-family: var(--font-display);
  transition: all 0.2s ease;
}
[data-theme="dark"] .timer-control-pill {
  background: #111a24;
  border-color: #1e2e3d;
}
.timer-icon-wrap {
  display: flex;
  align-items: center;
  color: var(--primary);
}
.timer-digits {
  font-family: 'Sora', monospace;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.05em;
  color: var(--ink);
  cursor: pointer;
  min-width: 48px;
  text-align: center;
  padding: 2px 4px;
  border-radius: 6px;
  transition: all 0.2s ease;
}
.timer-digits:hover {
  background: var(--mist);
  color: var(--primary);
}
.timer-control-pill.running .timer-digits {
  color: #10b981;
}
.timer-control-pill.expired .timer-digits {
  color: #ef4444;
  animation: timerBlink 1s infinite;
}
@keyframes timerBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}
.timer-action-btn {
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 700;
  font-size: 12px;
  padding: 6px 10px;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.timer-btn-toggle {
  background: var(--primary);
  color: #ffffff;
}
.timer-btn-toggle:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}
.timer-control-pill.running .timer-btn-toggle {
  background: #f59e0b;
  color: #ffffff;
}
.timer-btn-icon {
  background: var(--mist);
  color: var(--ink);
}
.timer-btn-icon:hover {
  background: var(--border);
}

/* Board Header Row - Seamless without black box background */
.smartboard-sticky-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: transparent !important;
  box-shadow: none !important;
}
.fullscreen-header-bar {
  display: none;
}
.fullscreen-big-heading {
  display: none;
}
.board-header-row {
  display: grid;
  grid-template-columns: 120px 1fr 180px 220px;
  align-items: center;
  background: linear-gradient(135deg, #1b6cfb 0%, #0046d1 100%);
  color: #ffffff;
  border: 2.5px solid #002f8a;
  border-radius: 14px;
  padding: 16px 28px;
  margin-bottom: 14px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 16px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 0 4px 16px rgba(27, 108, 251, 0.35);
}
.board-header-row .col-right {
  text-align: right;
}

/* Board Rows List with Smooth Rendering Optimizations */
.board-rows-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  will-change: scroll-position;
  transform: translateZ(0);
}

/* Individual Team Card Bar - Himalayan Blue Theme */
.board-team-row {
  display: grid;
  grid-template-columns: 120px 1fr 180px 220px;
  align-items: center;
  background: linear-gradient(180deg, #185ccf 0%, #0f46a8 100%);
  color: #ffffff;
  border: 2.5px solid #0a3380;
  border-radius: 14px;
  padding: 16px 28px;
  box-shadow: 0 4px 0 #0a3380, 0 6px 14px rgba(0,0,0,0.1);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
  cursor: pointer;
  position: relative;
}
.board-team-row:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 #0a3380, 0 12px 24px rgba(27, 108, 251, 0.25);
  filter: brightness(1.05);
}

/* Rank / Place - Blue matching the website theme */
.board-place {
  font-family: var(--font-display);
  display: flex;
  align-items: center;
  gap: 8px;
}
.board-rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 46px;
  height: 46px;
  padding: 0 10px;
  border-radius: 12px;
  background: #ffffff;
  color: var(--primary); /* Himalayan Blue #1b6cfb matching website theme */
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  border: 2px solid var(--primary);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
}

/* Prompt Warning Indicators in between rank and team name */
.prompt-warning-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  flex-shrink: 0;
  transition: transform 0.2s ease;
  animation: pulseWarning 2.2s infinite ease-in-out;
  cursor: help;
}
.prompt-warning-badge:hover {
  transform: scale(1.2);
}
.prompt-warning-badge svg {
  display: block;
}
/* > 30 prompts: triangle warning in yellow/amber */
.prompt-warning-badge.badge-warning {
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.22);
  border: 1.5px solid #f59e0b;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.35);
}
/* > 40 prompts: red warning sign */
.prompt-warning-badge.badge-danger {
  color: #ffffff;
  background: #ef4444;
  border: 1.5px solid #b91c1c;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.5);
}
@keyframes pulseWarning {
  0%, 100% {
    transform: scale(1);
    opacity: 0.95;
  }
  50% {
    transform: scale(1.08);
    opacity: 1;
  }
}

/* Team Info */
.board-team-info {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}
.board-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  border: 2.5px solid rgba(255, 255, 255, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 17px;
  flex-shrink: 0;
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.15);
}
.board-team-name {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.01em;
  color: #ffffff;
}

/* Points */
.board-points {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 800;
  text-align: right;
  letter-spacing: -0.02em;
  color: #ffffff;
}

/* Prompts */
.board-prompts {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  text-align: right;
  letter-spacing: -0.01em;
  color: #ffffff;
}

/* Special Podium Row Colors - Gold, Silver, and Bronze */
.board-team-row.rank-1 {
  background: linear-gradient(180deg, #e59b12 0%, #b45309 100%);
  border-color: #78350f;
  box-shadow: 0 5px 0 #78350f, 0 8px 28px rgba(229, 155, 18, 0.45);
}
.board-team-row.rank-1:hover {
  box-shadow: 0 6px 0 #78350f, 0 12px 28px rgba(245, 158, 11, 0.5);
}
.board-team-row.rank-1 .board-rank-badge {
  background: #ffffff;
  color: var(--primary);
  border: 2.5px solid #d97706;
  box-shadow: 0 4px 14px rgba(217, 119, 6, 0.4);
}

.board-team-row.rank-2 {
  background: linear-gradient(180deg, #64748b 0%, #475569 100%);
  border-color: #334155;
  box-shadow: 0 5px 0 #1e293b, 0 8px 24px rgba(100, 116, 139, 0.35);
}
.board-team-row.rank-2:hover {
  box-shadow: 0 6px 0 #1e293b, 0 12px 26px rgba(148, 163, 184, 0.45);
}
.board-team-row.rank-2 .board-rank-badge {
  background: #ffffff;
  color: var(--primary);
  border: 2.5px solid #64748b;
  box-shadow: 0 4px 14px rgba(100, 116, 139, 0.3);
}

.board-team-row.rank-3 {
  background: linear-gradient(180deg, #9a3412 0%, #6c270d 100%);
  border-color: #431407;
  box-shadow: 0 5px 0 #431407, 0 8px 24px rgba(154, 52, 18, 0.4);
}
.board-team-row.rank-3:hover {
  box-shadow: 0 6px 0 #431407, 0 12px 26px rgba(154, 52, 18, 0.5);
}
.board-team-row.rank-3 .board-rank-badge {
  background: #ffffff;
  color: var(--primary);
  border: 2.5px solid #9a3412;
  box-shadow: 0 4px 14px rgba(154, 52, 18, 0.35);
}

/* ==========================================================================
   FULLSCREEN MODE: OPTIONS ARE OUTSIDE; ONLY BIG HEADING & STICKY NEXT ROW
   ========================================================================== */

/* Hide outside controls in full screen */
body.fullscreen-active .navbar,
body.fullscreen-active footer,
body.fullscreen-active .smartboard-topbar {
  display: none !important;
}

body.fullscreen-active .smartboard-wrap {
  max-width: 95vw;
  padding: 0 20px 60px;
}

/* Sticky Header container in Fullscreen: Solid black background to prevent scrolling rows bleeding through */
body.fullscreen-active .smartboard-sticky-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #000000 !important;
  padding: 16px 16px 12px !important;
  margin: 0 -16px 14px !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.95) !important;
}

/* Fullscreen Top Header Bar: 3-column grid to place BIG timer dead-center */
body.fullscreen-active .fullscreen-header-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 8px 14px;
  width: 100%;
}
.fs-header-left {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}
.fs-header-center {
  display: flex;
  align-items: center;
  justify-content: center;
}
.fs-header-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

/* Big Heading LEADERBOARD in Fullscreen */
body.fullscreen-active .fullscreen-big-heading {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: var(--primary);
  margin: 0;
  text-transform: uppercase;
  text-shadow: 0 2px 16px rgba(27, 108, 251, 0.4);
  white-space: nowrap;
}

/* Bigger Centered Fullscreen Timer (No Emoji) */
.fullscreen-timer-display {
  display: none;
}
body.fullscreen-active .fullscreen-timer-display {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  background: rgba(27, 108, 251, 0.22);
  border: 2px solid rgba(27, 108, 251, 0.55);
  box-shadow: 0 4px 24px rgba(27, 108, 251, 0.35);
  backdrop-filter: blur(14px);
  padding: 8px 28px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}
body.fullscreen-active .fullscreen-timer-display:hover {
  background: rgba(27, 108, 251, 0.35);
  border-color: var(--primary);
  transform: scale(1.04);
}
.fs-timer-digits {
  font-family: 'Sora', monospace;
  font-size: 40px;
  font-weight: 900;
  letter-spacing: 0.06em;
  color: #ffffff;
  line-height: 1;
}
.fs-timer-status {
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.2);
  padding: 4px 10px;
  border-radius: 6px;
  color: #ffffff;
}
body.fullscreen-active .fullscreen-timer-display.running .fs-timer-status {
  background: #10b981;
}
body.fullscreen-active .fullscreen-timer-display.expired .fs-timer-digits {
  color: #ef4444;
  animation: timerBlink 1s infinite;
}

/* In Fullscreen: Keep all 4 columns (PLACE, NAME, POINTS, NO. OF PROMPTS) */
body.fullscreen-active .board-header-row,
body.fullscreen-active .board-team-row {
  grid-template-columns: 120px 1fr 180px 220px;
  padding: 20px 32px;
  font-size: 110%;
}

/* Floating Exit Fullscreen Button in top corner */
.fullscreen-exit-float {
  display: none;
}
body.fullscreen-active .fullscreen-exit-float {
  display: inline-flex;
  position: fixed;
  top: 18px;
  right: 24px;
  z-index: 10001;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  opacity: 0.6;
}
body.fullscreen-active .fullscreen-exit-float:hover {
  opacity: 1;
  background: var(--primary);
  border-color: var(--primary);
  transform: scale(1.04);
}

/* Auto scroll indicator */
.autoscroll-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

/* Security PIN Modal */
.pin-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  z-index: 100002;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.pin-modal.active {
  opacity: 1;
  pointer-events: auto;
}
.pin-modal-card {
  width: 100%;
  max-width: 400px;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
  padding: 24px;
  transform: translateY(20px);
  transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.pin-modal.active .pin-modal-card {
  transform: translateY(0);
}
.pin-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.pin-shake {
  animation: pinShake 0.4s ease;
  border-color: #ef4444 !important;
}
@keyframes pinShake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}

@media (max-width: 900px) {
  .board-header-row,
  .board-team-row,
  body.fullscreen-active .board-header-row,
  body.fullscreen-active .board-team-row {
    grid-template-columns: 70px 1fr 110px 120px;
    padding: 12px 16px;
  }
  .board-rank-badge {
    min-width: 38px;
    height: 38px;
    font-size: 18px;
  }
  .board-avatar {
    width: 36px;
    height: 36px;
    font-size: 14px;
  }
  .board-team-name {
    font-size: 18px;
  }
  .board-points {
    font-size: 22px;
  }
  .board-prompts {
    font-size: 16px;
  }
}
@media (max-width: 600px) {
  .board-header-row,
  .board-team-row,
  body.fullscreen-active .board-header-row,
  body.fullscreen-active .board-team-row {
    grid-template-columns: 55px 1fr 85px 85px;
    padding: 10px 12px;
    gap: 8px;
  }
  .board-rank-badge {
    min-width: 34px;
    height: 34px;
    font-size: 15px;
    padding: 0 4px;
  }
  .board-avatar {
    display: none;
  }
  .board-team-name {
    font-size: 15px;
  }
  .board-points {
    font-size: 18px;
  }
  .board-prompts {
    font-size: 14px;
  }
}

