/* ==========================================================================
   SSF NARIKKUNI SAHITYOTSAV - MAIN STYLESHEET
   Theme: Premium Dark Red & Black (Aesthetic, Modern, Glassmorphism)
   ========================================================================== */

/* --- Google Fonts are loaded via <link> in each HTML <head> (not @import:
   @import blocks CSS parsing until it round-trips to fetch the font CSS,
   adding a full extra network hop on every page navigation). --- */

/* Native cross-document View Transitions: on browsers that support it
   (Chrome/Edge 126+, Safari 18+), this makes navigating between
   index.html / results.html / team-points.html cross-fade smoothly
   instead of hard-cutting. No-op (normal navigation) on older browsers. */
@view-transition {
  navigation: auto;
}

/* --- Poster Template Fonts (self-hosted, used only for the winners' poster canvas) --- */
@font-face {
  font-family: 'Colourbars';
  src: url('../assets/fonts/Colourbars.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Colourbars';
  src: url('../assets/fonts/Colourbars Bd.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Dited';
  src: url('../assets/fonts/Dited.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* --- CSS Variables & Design System --- */
:root {
  /* Colors */
  --bg-primary: #050505;
  --bg-secondary: #0b0b0c;
  --bg-card: rgba(18, 18, 20, 0.65);
  --bg-card-hover: rgba(26, 26, 29, 0.85);

  --accent-neon: #ff1f36;
  --accent-hover: #ff4d5e;
  --accent-glow: rgba(255, 31, 54, 0.4);
  --accent-glow-subtle: rgba(255, 31, 54, 0.15);
  --accent-dark: #80000a;

  --text-primary: #ffffff;
  --text-secondary: #a0a0a5;
  --text-muted: #66666e;

  --border-glass: rgba(255, 255, 255, 0.07);
  --border-glow: rgba(255, 31, 54, 0.25);
  --border-glow-hover: rgba(255, 31, 54, 0.5);

  /* Fonts */
  --font-sans: 'Outfit', sans-serif;
  --font-arabic: 'Reem Kufi', 'Aref Ruqaa', serif;
  --font-decorative: 'Cinzel Decorative', serif;
  --font-script: 'Playfair Display', serif;
  --font-malayalam: 'Noto Sans Malayalam', 'Outfit', sans-serif;

  /* Shadows */
  --shadow-neon: 0 0 15px var(--accent-glow);
  --shadow-neon-intense: 0 0 25px var(--accent-glow), 0 0 50px rgba(255, 31, 54, 0.2);
  --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.5);

  /* Transitions */
  --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: all 0.2s ease;
}

/* --- Reset & Base Styles --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  overflow-x: hidden;
  line-height: 1.6;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: #222;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-neon);
  box-shadow: var(--shadow-neon);
}

/* Selection style */
::selection {
  background-color: var(--accent-neon);
  color: white;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition-fast);
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: var(--font-sans);
  transition: var(--transition-smooth);
}

/* --- Layout Utility Classes --- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 2;
}

.section-padding {
  padding: 100px 0;
}

.glass-card {
  background: rgba(12, 12, 14, 0.55);
  backdrop-filter: blur(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.08), inset 0 -1px 0 rgba(0, 0, 0, 0.3);
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.glass-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0) 50%, rgba(255, 255, 255, 0.02) 100%);
  pointer-events: none;
  border-radius: inherit;
}

.glass-card:hover {
  border-color: rgba(255, 31, 54, 0.3);
  border-top-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), 0 0 20px rgba(255, 31, 54, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transform: translateY(-5px);
}

/* --- Global Background Elements & Animations --- */
.bg-animations {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

/* Ambient Red Glowing Orbs */
.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.15;
  mix-blend-mode: screen;
  animation: float-slow 20s infinite alternate;
}

.orb-1 {
  width: 400px;
  height: 400px;
  background: var(--accent-neon);
  top: -100px;
  right: -50px;
}

.orb-2 {
  width: 500px;
  height: 500px;
  background: var(--accent-dark);
  bottom: -150px;
  left: -100px;
  animation-delay: -5s;
}

.orb-3 {
  width: 300px;
  height: 300px;
  background: var(--accent-neon);
  top: 40%;
  left: 30%;
  opacity: 0.08;
  animation-duration: 25s;
}

/* Ambient orbs are decorative-only but the animated blur(100px) is one of the
   most expensive things a mobile GPU can composite, and it restarts on every
   single page navigation (this is a multi-page site, not a SPA). Cut the
   blur radius and stop the animation on small screens so it doesn't compete
   with the new page's first paint. */
@media (max-width: 768px) {
  .glow-orb {
    filter: blur(40px);
    animation: none;
  }
}

/* Background Wavy/Topographic Lines */
.bg-wave-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.05;
  stroke: var(--accent-neon);
  stroke-width: 1.5;
  fill: none;
}

/* --- Header / Navigation --- */
header {
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 48px);
  max-width: 1280px;
  z-index: 100;
  background: rgba(10, 3, 3, 0.12);
  backdrop-filter: blur(20px) saturate(180%) brightness(1.05);
  -webkit-backdrop-filter: blur(20px) saturate(180%) brightness(1.05);
  border: 1px solid rgba(255, 31, 54, 0.1);
  border-radius: 50px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 8px 32px rgba(0, 0, 0, 0.2),
    0 0 0 1px rgba(255, 31, 54, 0.04);
  transition: var(--transition-smooth);
}

header.scrolled {
  background: rgba(8, 2, 2, 0.6);
  backdrop-filter: blur(32px) saturate(200%) brightness(0.95);
  -webkit-backdrop-filter: blur(32px) saturate(200%) brightness(0.95);
  border: 1px solid rgba(255, 31, 54, 0.15);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 8px 40px rgba(0, 0, 0, 0.55),
    0 0 20px rgba(255, 31, 54, 0.06);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 28px;
  margin: 0 auto;
}

.logo-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-comma {
  height: 38px;
  width: auto;
  aspect-ratio: 100 / 209.8;
  background: linear-gradient(180deg, rgba(255, 60, 80, 0.45) 0%, rgba(140, 0, 12, 0.75) 100%);
  backdrop-filter: blur(18px) saturate(160%) brightness(1.1);
  -webkit-backdrop-filter: blur(18px) saturate(160%) brightness(1.1);
  border: 1px solid rgba(255, 150, 160, 0.35);
  border-top: 1px solid rgba(255, 200, 205, 0.55);
  clip-path: polygon(0.35% 0%,
      0.09% 46.15%,
      55.97% 46.78%,
      54.2% 54.37%,
      51.46% 60.05%,
      46.33% 66.38%,
      40.76% 70.8%,
      32.18% 75.22%,
      25.11% 77.76%,
      15.47% 80.29%,
      1.15% 82.81%,
      0.09% 83.45%,
      0.27% 99.97%,
      1.15% 99.97%,
      9.55% 99.25%,
      25.29% 96.72%,
      37.84% 94.19%,
      49.78% 91.03%,
      60.65% 87.24%,
      69.32% 83.45%,
      78.43% 78.39%,
      85.85% 72.7%,
      90.54% 67.64%,
      93.81% 62.58%,
      99.12% 48.05%,
      99.91% 1.26%,
      99.03% 0%);
  box-shadow: inset 0 1px 0 rgba(255, 210, 215, 0.35);
  filter: drop-shadow(0 0 10px rgba(255, 31, 54, 0.45));
}

.logo-text {
  font-family: var(--font-decorative);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
}

.logo-sub {
  font-family: var(--font-sans);
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--accent-neon);
  letter-spacing: 2px;
  margin-top: -3px;
}

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

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  position: relative;
  padding: 6px 0;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-primary);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent-neon);
  box-shadow: var(--shadow-neon);
  transition: var(--transition-smooth);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

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

.nav-sahi-img {
  height: 48px;
  width: auto;
  filter: drop-shadow(0 2px 10px rgba(255, 31, 54, 0.4));
  display: block;
}

.btn-nav {
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  transition: var(--transition-smooth);
}

.btn-nav-outline {
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.btn-nav-outline:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 4px 15px rgba(0, 0, 0, 0.3);
}

.btn-nav-accent {
  background: var(--accent-neon);
  color: white;
  box-shadow: var(--shadow-neon);
}

.btn-nav-accent:hover {
  background: var(--accent-hover);
  box-shadow: var(--shadow-neon-intense);
  transform: translateY(-2px);
}

/* Mobile Nav Toggle */
.mobile-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
  cursor: pointer;
}

.mobile-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background-color: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition-fast);
}

/* --- Hero Section --- */
/* --- Hero Section (Artistic Centered Banners) --- */
.hero-artistic {
  position: relative;
  width: 100vw;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-color: var(--bg-primary);
  padding: 110px 0 50px;
}

.hero-center-container {
  position: relative;
  width: 100%;
  max-width: 1200px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
}

/* Central Skewed Banner Panels */
.banner-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 550px;
  height: 550px;
  z-index: 10;
}

.panels-container {
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: center;
  transform: skewX(-8deg) rotate(-4deg);
  position: relative;
}

.banner-panel {
  width: 130px;
  border-radius: 20px;
  filter: drop-shadow(0 25px 50px rgba(0, 0, 0, 0.8));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.banner-panel::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.07) 0%, transparent 50%);
  pointer-events: none;
  border-radius: inherit;
}

.panel-left {
  height: 420px;
  background: linear-gradient(180deg, rgba(22, 22, 28, 0.75) 0%, rgba(5, 5, 8, 0.9) 100%);
  backdrop-filter: blur(18px) saturate(120%);
  -webkit-backdrop-filter: blur(18px) saturate(120%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 25px 50px rgba(0, 0, 0, 0.7);
}

.panel-center {
  height: 500px;
  width: auto;
  aspect-ratio: 100 / 209.8;
  transform: translateY(-55px);
  background: linear-gradient(180deg, rgba(255, 60, 80, 0.45) 0%, rgba(140, 0, 12, 0.75) 100%);
  backdrop-filter: blur(18px) saturate(160%) brightness(1.1);
  -webkit-backdrop-filter: blur(18px) saturate(160%) brightness(1.1);
  border: 1px solid rgba(255, 150, 160, 0.35);
  border-top: 1px solid rgba(255, 200, 205, 0.55);
  border-radius: 0;
  clip-path: polygon(0.35% 0%,
      0.09% 46.15%,
      55.97% 46.78%,
      54.2% 54.37%,
      51.46% 60.05%,
      46.33% 66.38%,
      40.76% 70.8%,
      32.18% 75.22%,
      25.11% 77.76%,
      15.47% 80.29%,
      1.15% 82.81%,
      0.09% 83.45%,
      0.27% 99.97%,
      1.15% 99.97%,
      9.55% 99.25%,
      25.29% 96.72%,
      37.84% 94.19%,
      49.78% 91.03%,
      60.65% 87.24%,
      69.32% 83.45%,
      78.43% 78.39%,
      85.85% 72.7%,
      90.54% 67.64%,
      93.81% 62.58%,
      99.12% 48.05%,
      99.91% 1.26%,
      99.03% 0%);
  box-shadow: inset 0 1px 0 rgba(255, 210, 215, 0.35), inset 0 0 40px rgba(255, 80, 100, 0.1);
  filter: drop-shadow(0 0 45px rgba(255, 31, 54, 0.45)) drop-shadow(0 25px 45px rgba(0, 0, 0, 0.75));
}

.panel-center-motto {
  position: absolute;
  top: 4%;
  left: 6%;
  width: 88%;
  height: 42%;
  overflow: visible;
  pointer-events: none;
}

.motto-word {
  fill: #fff5f5;
}

.motto-script {
  font-family: var(--font-script);
  font-style: italic;
  font-weight: 700;
  font-size: 17px;
}

.motto-end {
  font-size: 19px;
}

.motto-caps {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 6.5px;
  letter-spacing: 0.9px;
}

.panel-right {
  height: 440px;
  background: linear-gradient(180deg, rgba(30, 30, 38, 0.72) 0%, rgba(11, 11, 14, 0.88) 100%);
  backdrop-filter: blur(18px) saturate(120%);
  -webkit-backdrop-filter: blur(18px) saturate(120%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 25px 50px rgba(0, 0, 0, 0.7);
}

/* Wavy White Loops Overlay */
.wavy-loop-svg {
  position: absolute;
  width: 850px;
  height: 500px;
  z-index: 12;
  pointer-events: none;
  opacity: 0.85;
}

/* Typography Over Banners */
.banner-text-overlay {
  position: absolute;
  text-align: center;
  z-index: 15;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.banner-division {
  font-size: 1rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 5px;
  text-transform: uppercase;
  margin-bottom: -10px;
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.9);
  font-family: var(--font-sans);
}

.banner-title-img {
  max-width: 100%;
  height: auto;
  max-height: 180px;
  margin-bottom: -5px;
  filter: drop-shadow(0 0 25px rgba(255, 31, 54, 0.65)) drop-shadow(0 10px 30px rgba(0, 0, 0, 0.8));
  display: block;
}

.banner-edition {
  font-size: 0.75rem;
  font-weight: 700;
  color: #ff3b4e;
  text-transform: uppercase;
  letter-spacing: 3px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
  font-family: var(--font-sans);
}

/* Glassmorphic Date Venue Card */
.banner-date-card {
  position: absolute;
  bottom: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 14px 28px;
  border-radius: 50px;
  background: rgba(4, 4, 6, 0.55);
  backdrop-filter: blur(30px) saturate(200%) brightness(1.1);
  -webkit-backdrop-filter: blur(30px) saturate(200%) brightness(1.1);
  border: 1.5px solid rgba(255, 31, 54, 0.35);
  border-top: 1.5px solid rgba(255, 255, 255, 0.15);
  box-shadow:
    0 20px 45px rgba(0, 0, 0, 0.8),
    0 0 20px rgba(255, 31, 54, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    inset 0 -1px 0 rgba(0, 0, 0, 0.4);
  transform: translateY(40px);
  overflow: hidden;
}

.banner-date-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
  animation: shimmer-sweep 4s ease-in-out infinite;
  pointer-events: none;
}

.b-date-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.2;
}

.b-month {
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--accent-neon);
  letter-spacing: 2px;
  text-transform: uppercase;
}

.b-days {
  font-size: 1.8rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.5px;
}

.b-days span {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin: 0 2px;
}

.b-days-sub {
  font-size: 0.6rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 1px;
}

.b-divider {
  width: 1px;
  height: 40px;
  background-color: rgba(255, 255, 255, 0.1);
}

.b-location-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.2;
}

.b-loc-label {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.b-loc-name {
  font-size: 1.1rem;
  font-weight: 800;
  color: #ffffff;
}

.b-loc-gps {
  font-size: 0.75rem;
  color: var(--accent-neon);
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 1px;
}

/* Floating Shapes (References Mavoor Banner Graphics) */
.art-shapes {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 8;
}

.art-shape {
  position: absolute;
}

.brain-svg {
  left: 4%;
  bottom: 8%;
  width: 240px;
  height: 240px;
  opacity: 0.25;
  animation: float-brain 10s ease-in-out infinite;
}

.chip-svg {
  right: 4%;
  bottom: 8%;
  width: 230px;
  height: 230px;
  opacity: 0.25;
  animation: float-chip 10s ease-in-out infinite;
}

.dot-red {
  width: 16px;
  height: 16px;
  background-color: var(--accent-neon);
  border-radius: 50%;
  left: 33%;
  top: 32%;
  box-shadow: var(--shadow-neon-intense);
  animation: pulse 1.5s infinite alternate;
}

.ring-white {
  width: 90px;
  height: 90px;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-top: 2px solid rgba(255, 255, 255, 0.6);
  border-left: 2px solid rgba(255, 255, 255, 0.45);
  border-radius: 50%;
  left: 22%;
  bottom: 35%;
  background: rgba(255, 255, 255, 0.025);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.05), 0 0 20px rgba(255, 255, 255, 0.05);
  animation: float-slow 15s infinite alternate;
}

.triangle-teal {
  width: 0;
  height: 0;
  border-left: 20px solid transparent;
  border-right: 20px solid transparent;
  border-bottom: 35px solid #00e5ff;
  right: 28%;
  top: 28%;
  transform: rotate(15deg);
  filter: drop-shadow(0 0 10px rgba(0, 229, 255, 0.4));
  animation: float-slow 12s infinite alternate-reverse;
}

.squiggle-yellow {
  right: 22%;
  top: 40%;
  width: 140px;
  filter: drop-shadow(0 0 8px rgba(255, 179, 0, 0.4));
  animation: float-slow 9s infinite alternate;
}

.dot-yellow {
  width: 28px;
  height: 28px;
  background-color: #ffb300;
  border-radius: 50%;
  right: 25%;
  bottom: 32%;
  box-shadow: 0 0 15px rgba(255, 179, 0, 0.4);
}

.gear-outline {
  left: 3%;
  top: 38%;
  font-size: 6rem;
  color: rgba(255, 255, 255, 0.03);
  animation: spin-slow 40s linear infinite;
}

.dot-grid-1 {
  left: 21%;
  top: 22%;
  width: 70px;
  height: 90px;
  background-image: radial-gradient(rgba(255, 255, 255, 0.15) 1.5px, transparent 1.5px);
  background-size: 12px 12px;
}

.dot-grid-2 {
  right: 18%;
  bottom: 18%;
  width: 16px;
  height: 120px;
  background-image: radial-gradient(rgba(255, 255, 255, 0.15) 1.5px, transparent 1.5px);
  background-size: 8px 12px;
}

/* Modals Overlay Base (For content hubs results, teams, news, gallery) */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(2, 2, 5, 0.7);
  backdrop-filter: blur(30px) saturate(160%) brightness(0.85);
  -webkit-backdrop-filter: blur(30px) saturate(160%) brightness(0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  z-index: 1000;
  transition: opacity 0.35s ease;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  width: 90%;
  max-width: 850px;
  max-height: 85vh;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(8, 8, 11, 0.72);
  backdrop-filter: blur(40px) saturate(200%) brightness(1.05);
  -webkit-backdrop-filter: blur(40px) saturate(200%) brightness(1.05);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.95) translateY(20px);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
  box-shadow:
    0 40px 80px rgba(0, 0, 0, 0.9),
    0 0 0 1px rgba(255, 255, 255, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    inset 0 -1px 0 rgba(0, 0, 0, 0.5);
  position: relative;
}

.modal-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), rgba(255, 31, 54, 0.2), rgba(255, 255, 255, 0.15), transparent);
  pointer-events: none;
}

.modal-overlay.open .modal-card {
  transform: scale(1) translateY(0);
}

.modal-header {
  padding: 24px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.modal-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent-neon);
  letter-spacing: 3px;
  display: block;
  margin-bottom: 4px;
}

.modal-title {
  font-family: var(--font-arabic);
  font-size: 2.2rem;
  font-weight: 700;
  color: #ffffff;
}

.modal-close {
  background: none;
  border: none;
  font-size: 2.5rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-fast);
  line-height: 1;
}

.modal-close:hover {
  color: var(--accent-neon);
  transform: scale(1.1);
}

.modal-body {
  padding: 32px;
  overflow-y: auto;
  flex-grow: 1;
}

.modal-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

/* Animations declarations */
@keyframes float-brain {
  0% {
    transform: translateY(0px) scale(1);
  }

  50% {
    transform: translateY(-15px) scale(1.03);
  }

  100% {
    transform: translateY(0px) scale(1);
  }
}

@keyframes float-chip {
  0% {
    transform: translateY(0px) scale(1);
  }

  50% {
    transform: translateY(12px) scale(0.97);
  }

  100% {
    transform: translateY(0px) scale(1);
  }
}

@keyframes shimmer-sweep {
  0% {
    left: -100%;
    opacity: 0;
  }

  30% {
    opacity: 1;
  }

  70% {
    opacity: 1;
  }

  100% {
    left: 150%;
    opacity: 0;
  }
}

@keyframes glass-pulse {
  0% {
    box-shadow: 0 0 0 rgba(255, 31, 54, 0), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  }

  50% {
    box-shadow: 0 0 30px rgba(255, 31, 54, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.14);
  }

  100% {
    box-shadow: 0 0 0 rgba(255, 31, 54, 0), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  }
}

/* Glass backdrop behind the banner typography */
.banner-text-overlay {
  position: absolute;
  text-align: center;
  z-index: 15;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 32px;
  border-radius: 20px;
  background: rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  animation: glass-pulse 5s ease-in-out infinite;
}

/* --- Section Heading --- */
.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 60px auto;
  position: relative;
  z-index: 5;
}

.section-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent-neon);
  letter-spacing: 3px;
  margin-bottom: 12px;
  display: block;
}

.section-title {
  font-family: var(--font-arabic);
  font-size: 3rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.section-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-top: 16px;
}

/* --- Results Section --- */
.results-tabs {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 40px;
  list-style: none;
  flex-wrap: wrap;
}

.tab-btn {
  padding: 12px 24px;
  border-radius: 30px;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 600;
  transition: var(--transition-smooth);
}

.tab-btn:hover {
  color: var(--text-primary);
  border-color: var(--text-muted);
}

.tab-btn.active {
  background: var(--accent-neon);
  color: white;
  border-color: var(--accent-neon);
  box-shadow: var(--shadow-neon);
}

.results-content {
  position: relative;
  min-height: 250px;
}

.results-panel {
  display: none;
  animation: fadeIn 0.5s ease forwards;
}

.results-panel.active {
  display: block;
}

.results-table-container {
  overflow-x: auto;
  border-radius: 16px;
  border: 1px solid var(--border-glass);
  box-shadow: var(--shadow-card);
}

.results-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.results-table th {
  background: rgba(255, 255, 255, 0.03);
  padding: 18px 24px;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 1.5px;
  border-bottom: 1px solid var(--border-glass);
}

.results-table td {
  padding: 18px 24px;
  font-size: 0.95rem;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.02);
}

.results-table tr:last-child td {
  border-bottom: none;
}

.results-table tr:hover td {
  background: rgba(255, 255, 255, 0.01);
  color: var(--text-primary);
}

.badge-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: 800;
}

.rank-1 {
  background: radial-gradient(circle, #ffe066 0%, #d4af37 100%);
  color: #000;
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

.rank-2 {
  background: radial-gradient(circle, #e6e6e6 0%, #b4b4b4 100%);
  color: #000;
}

.rank-3 {
  background: radial-gradient(circle, #dfa375 0%, #a05a2c 100%);
  color: white;
}

.rank-other {
  background: var(--bg-card);
  color: var(--text-secondary);
  border: 1px solid var(--border-glass);
}

.team-name-row {
  font-weight: 600;
  color: var(--text-primary);
}

.text-muted-small {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* --- Gallery Section --- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.gallery-item {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  height: 320px;
  box-shadow: var(--shadow-card);
}

.gallery-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-smooth);
}

.gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.4) 60%, rgba(0, 0, 0, 0) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
  opacity: 0.85;
  transition: var(--transition-smooth);
}

.gallery-category {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent-neon);
  letter-spacing: 2px;
  margin-bottom: 6px;
}

.gallery-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
}

.gallery-meta {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

.gallery-item:hover .gallery-img {
  transform: scale(1.08);
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
  background: linear-gradient(0deg, rgba(128, 0, 10, 0.9) 0%, rgba(0, 0, 0, 0.5) 60%, rgba(0, 0, 0, 0.1) 100%);
}

/* --- News / Events Section --- */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 32px;
}

.news-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.news-img-box {
  width: 100%;
  height: 200px;
  position: relative;
  overflow: hidden;
  background: #111;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--border-glass);
}

.news-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: radial-gradient(circle at center, rgba(255, 31, 54, 0.1) 0%, transparent 80%);
  color: var(--text-muted);
  gap: 12px;
}

.news-img-placeholder i,
.news-img-placeholder svg {
  color: var(--accent-neon);
  filter: drop-shadow(var(--shadow-neon));
}

.news-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.news-date {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-neon);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.news-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
  line-height: 1.3;
}

.news-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
  flex-grow: 1;
  margin-bottom: 20px;
}

.news-link {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
}

.news-link svg {
  transition: var(--transition-fast);
}

.news-card:hover .news-link svg {
  transform: translateX(4px);
}

.news-card:hover {
  border-color: var(--border-glow);
}

/* --- Footer --- */
footer {
  background: #020202;
  border-top: 1px solid var(--border-glass);
  padding: 80px 0 30px 0;
  position: relative;
  z-index: 5;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 48px;
  margin-bottom: 60px;
}

.footer-logo-desc {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  max-width: 320px;
}

.footer-socials {
  display: flex;
  gap: 12px;
}

.social-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}

.social-icon:hover {
  background: var(--accent-neon);
  border-color: var(--accent-neon);
  box-shadow: var(--shadow-neon);
  transform: translateY(-3px);
}

.footer-col-title {
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-primary);
  letter-spacing: 1.5px;
  margin-bottom: 24px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-link {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.footer-link:hover {
  color: var(--accent-neon);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.copyright {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.credits {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.credits a {
  color: var(--accent-neon);
}

.credits a:hover {
  text-decoration: underline;
}

/* --- KEYFRAME ANIMATIONS --- */
@keyframes float {
  0% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-15px);
  }

  100% {
    transform: translateY(0px);
  }
}

@keyframes float-slow {
  0% {
    transform: translate(0px, 0px) scale(1);
  }

  50% {
    transform: translate(30px, -20px) scale(1.05);
  }

  100% {
    transform: translate(0px, 0px) scale(1);
  }
}

@keyframes pulse {
  0% {
    opacity: 0.4;
    transform: scale(0.9);
  }

  100% {
    opacity: 1;
    transform: scale(1.1);
  }
}

@keyframes spin-slow {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Additional Premium Visual Elements --- */
.bg-grid-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
  background-image: linear-gradient(rgba(255, 31, 54, 0.015) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 31, 54, 0.015) 1px, transparent 1px);
  background-size: 40px 40px;
  opacity: 0.75;
}

.star-islamic {
  right: 8%;
  top: 12%;
  width: 180px;
  height: 180px;
  opacity: 0.25;
  animation: spin-slow 50s linear infinite;
  filter: drop-shadow(0 0 10px rgba(255, 31, 54, 0.15));
}

.qalam-svg {
  right: 12%;
  top: 32%;
  width: 120px;
  height: 120px;
  opacity: 0.28;
  animation: float-qalam 7s ease-in-out infinite;
  filter: drop-shadow(0 0 12px rgba(255, 31, 54, 0.15));
}

.squiggle-red-dashed {
  left: 18%;
  bottom: 25%;
  width: 150px;
  animation: float-slow 10s infinite alternate;
}

.math-mark {
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: 1.5rem;
  color: rgba(255, 31, 54, 0.3);
  opacity: 0.6;
  pointer-events: none;
}

.mark-plus-1 {
  left: 12%;
  top: 22%;
  animation: float-slow 8s infinite alternate;
}

.mark-plus-2 {
  right: 18%;
  bottom: 35%;
  animation: float-slow 12s infinite alternate-reverse;
}

.mark-x-1 {
  left: 30%;
  bottom: 20%;
  animation: float-slow 10s infinite alternate;
}

.mark-x-2 {
  right: 32%;
  top: 15%;
  animation: float-slow 9s infinite alternate-reverse;
}

.spark-particle {
  position: absolute;
  width: 6px;
  height: 6px;
  background-color: var(--accent-neon);
  border-radius: 50%;
  box-shadow: var(--shadow-neon-intense);
  pointer-events: none;
  z-index: 3;
}

.particle-1 {
  left: 15%;
  bottom: 12%;
  animation: drift-up-1 12s linear infinite;
}

.particle-2 {
  left: 45%;
  bottom: 5%;
  animation: drift-up-2 15s linear infinite;
}

.particle-3 {
  right: 15%;
  bottom: 18%;
  animation: drift-up-3 10s linear infinite;
}

.particle-4 {
  right: 48%;
  bottom: 8%;
  animation: drift-up-1 14s linear infinite;
}

.particle-5 {
  left: 28%;
  bottom: 22%;
  animation: drift-up-2 18s linear infinite;
}

@keyframes float-qalam {
  0% {
    transform: translateY(0px) rotate(0deg);
  }

  50% {
    transform: translateY(-8px) rotate(-3deg);
  }

  100% {
    transform: translateY(0px) rotate(0deg);
  }
}

@keyframes drift-up-1 {
  0% {
    transform: translateY(0px) translateX(0px);
    opacity: 0;
  }

  20% {
    opacity: 0.8;
  }

  80% {
    opacity: 0.8;
  }

  100% {
    transform: translateY(-250px) translateX(25px);
    opacity: 0;
  }
}

@keyframes drift-up-2 {
  0% {
    transform: translateY(0px) translateX(0px);
    opacity: 0;
  }

  20% {
    opacity: 0.6;
  }

  80% {
    opacity: 0.6;
  }

  100% {
    transform: translateY(-300px) translateX(-30px);
    opacity: 0;
  }
}

@keyframes drift-up-3 {
  0% {
    transform: translateY(0px) translateX(0px);
    opacity: 0;
  }

  25% {
    opacity: 0.7;
  }

  75% {
    opacity: 0.7;
  }

  100% {
    transform: translateY(-200px) translateX(15px);
    opacity: 0;
  }
}

/* --- RESPONSIVE BREAKPOINTS --- */
@media (max-width: 1024px) {
  .banner-stage {
    width: 460px;
    height: 460px;
  }

  .banner-panel {
    width: 110px;
  }

  .panel-left {
    height: 350px;
  }

  .panel-center {
    height: 420px;
    width: auto;
  }

  .panel-right {
    height: 370px;
  }

  .banner-title-img {
    max-height: 120px;
    margin-bottom: -10px;
  }

  .brain-svg {
    width: 180px;
    height: 180px;
  }

  .chip-svg {
    width: 170px;
    height: 170px;
  }

  .star-islamic {
    width: 140px;
    height: 140px;
  }

  .qalam-svg {
    width: 90px;
    height: 90px;
  }
}

@media (max-width: 768px) {
  header {
    top: 10px;
    width: calc(100% - 24px);
    border-radius: 30px;
    background: rgba(10, 3, 3, 0.12);
    backdrop-filter: blur(20px) saturate(180%) brightness(1.05);
    -webkit-backdrop-filter: blur(20px) saturate(180%) brightness(1.05);
  }

  .nav-menu {
    position: fixed;
    top: 79px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 79px);
    background: var(--bg-primary);
    flex-direction: column;
    padding: 40px 24px;
    gap: 30px;
    transition: var(--transition-smooth);
    border-top: 1px solid var(--border-glass);
    z-index: 99;
  }

  .nav-menu.open {
    left: 0;
  }

  .mobile-toggle {
    display: none;
    /* Was removed in HTML, but good to keep hidden in CSS just in case */
  }

  /* Scale down artistic banners and floating shapes for mobile */
  .banner-stage {
    width: 310px;
    height: 410px;
  }

  .panels-container {
    gap: 10px;
    transform: skewX(-6deg) rotate(-3deg);
  }

  .banner-panel {
    width: 75px;
    border-radius: 10px;
  }

  .panel-left {
    height: 260px;
  }

  .panel-center {
    height: 320px;
    width: auto;
  }

  .panel-right {
    height: 275px;
  }

  .wavy-loop-svg {
    width: 480px;
    height: 350px;
  }

  .banner-division {
    font-size: 0.7rem;
    letter-spacing: 3px;
  }

  .banner-title-img {
    max-height: 85px;
    margin-bottom: -8px;
  }

  .banner-edition {
    font-size: 0.55rem;
    letter-spacing: 2px;
  }

  /* Date Card */
  .banner-date-card {
    padding: 8px 18px;
    gap: 14px;
    border-radius: 35px;
    transform: translateY(25px);
    width: 92%;
    max-width: 290px;
    justify-content: center;
  }

  .b-days {
    font-size: 1.25rem;
  }

  .b-loc-name {
    font-size: 0.85rem;
  }

  .b-loc-gps {
    font-size: 0.65rem;
  }

  .b-month,
  .b-loc-label {
    font-size: 0.55rem;
  }

  .b-divider {
    height: 30px;
  }

  /* Floating elements positioning for mobile */
  .brain-svg {
    width: 110px;
    height: 110px;
    left: 2%;
    bottom: 5%;
    opacity: 0.15;
  }

  .chip-svg {
    width: 110px;
    height: 110px;
    right: 2%;
    bottom: 5%;
    opacity: 0.15;
  }

  .dot-red {
    left: 16%;
    top: 22%;
    width: 10px;
    height: 10px;
  }

  .ring-white {
    width: 50px;
    height: 50px;
    left: 5%;
    bottom: 25%;
  }

  .triangle-teal {
    right: 15%;
    top: 22%;
    border-bottom-width: 25px;
    border-left-width: 15px;
    border-right-width: 15px;
  }

  .squiggle-yellow {
    width: 80px;
    right: 8%;
    top: 38%;
  }

  .dot-yellow {
    width: 16px;
    height: 16px;
    right: 8%;
    bottom: 22%;
  }

  .gear-outline {
    font-size: 3.5rem;
    left: 2%;
    top: 30%;
  }

  .dot-grid-1 {
    left: 15%;
    top: 16%;
    width: 40px;
    height: 50px;
  }

  .dot-grid-2 {
    right: 12%;
    bottom: 15%;
    width: 10px;
    height: 70px;
  }

  .star-islamic {
    width: 90px;
    height: 90px;
    right: 5%;
    top: 18%;
    opacity: 0.15;
  }

  .qalam-svg {
    width: 65px;
    height: 65px;
    right: 7%;
    top: 32%;
    opacity: 0.18;
  }

  .squiggle-red-dashed {
    width: 90px;
    left: 12%;
    bottom: 25%;
  }

  .math-mark {
    font-size: 1rem;
  }

  /* Modals padding scale down */
  .modal-card {
    max-height: 90vh;
    border-radius: 16px;
  }

  .modal-header {
    padding: 16px 20px;
  }

  .modal-title {
    font-size: 1.6rem;
  }

  .modal-body {
    padding: 20px;
  }

  .results-tabs {
    gap: 8px;
  }

  .tab-btn {
    padding: 8px 16px;
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  .banner-stage {
    width: 260px;
    height: 360px;
  }

  .banner-panel {
    width: 62px;
  }

  .panel-left {
    height: 210px;
  }

  .panel-center {
    height: 270px;
    width: auto;
  }

  .panel-right {
    height: 230px;
  }

  .wavy-loop-svg {
    width: 380px;
    height: 280px;
  }

  .banner-title-img {
    max-height: 65px;
    margin-bottom: -6px;
  }

  .banner-date-card {
    padding: 8px 12px;
    gap: 10px;
    transform: translateY(20px);
    max-width: 250px;
  }

  .b-days {
    font-size: 1.1rem;
  }

  .b-loc-name {
    font-size: 0.75rem;
  }

  .b-loc-gps {
    font-size: 0.6rem;
  }

  .b-divider {
    height: 25px;
  }

  .brain-svg,
  .chip-svg {
    width: 80px;
    height: 80px;
  }

  .star-islamic {
    width: 70px;
    height: 70px;
    right: 4%;
    top: 18%;
  }

  .qalam-svg {
    width: 50px;
    height: 50px;
    right: 4%;
    top: 34%;
  }

  .squiggle-red-dashed {
    width: 70px;
  }
}

/* ============================================
   OUR LEGACY SECTION
   ============================================ */

.legacy-section {
  position: relative;
  padding: 60px 24px 40px;
  overflow: hidden;
  background: linear-gradient(180deg, var(--bg-primary) 0%, #0e0204 50%, var(--bg-primary) 100%);
}

.legacy-container {
  max-width: 860px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

/* Badge */
.legacy-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border: 1px solid rgba(255, 31, 54, 0.25);
  border-radius: 50px;
  background: rgba(255, 31, 54, 0.06);
  color: var(--accent-red, #ff1f36);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 28px;
  backdrop-filter: blur(10px);
}

/* Headline */
.legacy-headline {
  font-family: 'VT323', monospace;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 400;
  line-height: 0.8;
  color: #fff;
  margin-bottom: 8px;
  letter-spacing: -1px;
}

.legacy-headline-img {
  max-width: 90%;
  height: auto;
  margin-top: -20px;
  /* Glowing drop shadow to match the red neon theme */
  filter: drop-shadow(0 4px 15px rgba(255, 31, 54, 0.5));
}

/* Edition Tag */
.legacy-edition-tag {
  display: inline-flex;
  align-items: center;
  padding: 6px 16px;
  border: 1px solid rgba(255, 31, 54, 0.3);
  border-radius: 4px;
  background: rgba(255, 31, 54, 0.05);
  color: rgba(255, 31, 54, 0.85);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  margin-bottom: 44px;
}

/* Blockquote */
.legacy-quote {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin: 0 0 48px;
  padding: 24px 28px;
  border-left: 3px solid rgba(255, 31, 54, 0.4);
  background: rgba(255, 31, 54, 0.04);
  border-radius: 0 12px 12px 0;
  backdrop-filter: blur(8px);
}

.legacy-quote-icon {
  font-size: 3rem;
  line-height: 1;
  color: rgba(255, 31, 54, 0.4);
  font-family: Georgia, serif;
  margin-top: -8px;
  flex-shrink: 0;
}

.legacy-quote p {
  font-style: italic;
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.7;
  margin: 0;
  padding-top: 6px;
}

/* Body Text */
.legacy-body {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 64px;
}

.legacy-para {
  font-size: 1.05rem;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.6);
  padding: 20px 0 20px 24px;
  border-left: 2px solid rgba(255, 31, 54, 0.15);
  margin: 0;
  transition: border-color 0.3s ease;
}

.legacy-para:hover {
  border-left-color: rgba(255, 31, 54, 0.45);
  color: rgba(255, 255, 255, 0.82);
}

.legacy-para strong {
  color: #fff;
  font-weight: 700;
}

.legacy-para--drop::first-letter {
  font-size: 3.5rem;
  font-family: 'VT323', monospace;
  font-weight: 400;
  float: left;
  line-height: 0.75;
  margin-right: 12px;
  margin-top: 6px;
  color: var(--accent-red, #ff1f36);
}

/* Stats Grid */
.legacy-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.legacy-stat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  border-radius: 16px;
  text-align: center;
  background: rgba(255, 31, 54, 0.04);
  border: 1px solid rgba(255, 31, 54, 0.12);
  backdrop-filter: blur(16px);
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  gap: 4px;
}

.legacy-stat-card:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 31, 54, 0.35);
  box-shadow: 0 16px 48px rgba(255, 31, 54, 0.12);
}

.legacy-stat-icon {
  font-size: 1.4rem;
  color: rgba(255, 31, 54, 0.7);
  margin-bottom: 12px;
}

.legacy-stat-number {
  font-family: 'VT323', monospace;
  font-size: clamp(3rem, 6vw, 4.2rem);
  font-weight: 400;
  color: var(--accent-red, #ff1f36);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.legacy-stat-plus {
  font-family: 'VT323', monospace;
  font-size: 2rem;
  font-weight: 400;
  color: var(--accent-red, #ff1f36);
  line-height: 1;
  margin-left: 2px;
}

.legacy-stat-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 3px;
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
  margin-top: 8px;
}

/* Ambient Orbs */
.legacy-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}

.legacy-orb-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(255, 31, 54, 0.08), transparent 70%);
  top: -100px;
  right: -150px;
}

.legacy-orb-2 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255, 31, 54, 0.06), transparent 70%);
  bottom: -80px;
  left: -100px;
}

/* Mobile */
@media (max-width: 768px) {
  .legacy-section {
    padding: 80px 20px 70px;
  }

  .legacy-stats {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }

  .legacy-stat-card {
    padding: 22px 12px;
    border-radius: 12px;
  }

  .legacy-stat-number {
    font-size: 2rem;
  }

  .legacy-stat-plus {
    font-size: 1.2rem;
  }

  .legacy-quote p {
    font-size: 0.95rem;
  }

  .legacy-para {
    font-size: 0.95rem;
  }
}

/* ============================================
   SAHITYOTSAV 2026 THEME SECTION
   ============================================ */
.theme-section {
  position: relative;
  padding: 40px 24px 80px;
  overflow: hidden;
  background: linear-gradient(180deg, var(--bg-primary) 0%, #0e0204 50%, var(--bg-primary) 100%);
}

.theme-container {
  max-width: 860px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
  text-align: center;
}

/* Badge */
.theme-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border: 1px solid rgba(255, 31, 54, 0.25);
  border-radius: 50px;
  background: rgba(255, 31, 54, 0.06);
  color: var(--accent-red, #ff1f36);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 28px;
  backdrop-filter: blur(10px);
}

/* Icon: same comma-shaped glass slab recipe as the hero's .panel-center */
.theme-icon-comma {
  height: 110px;
  width: auto;
  aspect-ratio: 100 / 209.8;
  margin: 0 auto 24px;
  background: linear-gradient(180deg, rgba(255, 60, 80, 0.45) 0%, rgba(140, 0, 12, 0.75) 100%);
  backdrop-filter: blur(18px) saturate(160%) brightness(1.1);
  -webkit-backdrop-filter: blur(18px) saturate(160%) brightness(1.1);
  border: 1px solid rgba(255, 150, 160, 0.35);
  border-top: 1px solid rgba(255, 200, 205, 0.55);
  clip-path: polygon(0.35% 0%,
      0.09% 46.15%,
      55.97% 46.78%,
      54.2% 54.37%,
      51.46% 60.05%,
      46.33% 66.38%,
      40.76% 70.8%,
      32.18% 75.22%,
      25.11% 77.76%,
      15.47% 80.29%,
      1.15% 82.81%,
      0.09% 83.45%,
      0.27% 99.97%,
      1.15% 99.97%,
      9.55% 99.25%,
      25.29% 96.72%,
      37.84% 94.19%,
      49.78% 91.03%,
      60.65% 87.24%,
      69.32% 83.45%,
      78.43% 78.39%,
      85.85% 72.7%,
      90.54% 67.64%,
      93.81% 62.58%,
      99.12% 48.05%,
      99.91% 1.26%,
      99.03% 0%);
  box-shadow: inset 0 1px 0 rgba(255, 210, 215, 0.35), inset 0 0 40px rgba(255, 80, 100, 0.1);
  filter: drop-shadow(0 0 30px rgba(255, 31, 54, 0.45)) drop-shadow(0 12px 25px rgba(0, 0, 0, 0.6));
}

/* Headline */
.theme-headline {
  font-family: 'VT323', monospace;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 400;
  line-height: 1;
  color: #fff;
  margin-bottom: 8px;
  letter-spacing: -1px;
}

/* Tagline Tag */
.theme-tagline-tag {
  display: inline-flex;
  align-items: center;
  padding: 6px 16px;
  border: 1px solid rgba(255, 31, 54, 0.3);
  border-radius: 4px;
  background: rgba(255, 31, 54, 0.05);
  color: rgba(255, 31, 54, 0.85);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  margin-bottom: 44px;
}

/* Blockquote */
.theme-quote {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin: 0 0 36px;
  padding: 24px 28px;
  text-align: left;
  border-left: 3px solid rgba(255, 31, 54, 0.4);
  background: rgba(255, 31, 54, 0.04);
  border-radius: 0 12px 12px 0;
  backdrop-filter: blur(8px);
}

.theme-quote-icon {
  font-size: 3rem;
  line-height: 1;
  color: rgba(255, 31, 54, 0.4);
  font-family: Georgia, serif;
  margin-top: -8px;
  flex-shrink: 0;
}

.theme-quote p {
  font-family: var(--font-malayalam);
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.9;
  margin: 0;
  padding-top: 6px;
}

/* Subhead */
.theme-subhead {
  font-family: var(--font-malayalam);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--accent-red, #ff1f36);
  text-align: left;
  margin: 0 0 12px;
}

/* Body Text */
.theme-body {
  display: flex;
  flex-direction: column;
  gap: 0;
  text-align: left;
}

.theme-para {
  font-family: var(--font-malayalam);
  font-size: 1.05rem;
  line-height: 1.9;
  color: rgba(255, 255, 255, 0.6);
  padding: 20px 0 20px 24px;
  border-left: 2px solid rgba(255, 31, 54, 0.15);
  margin: 0;
  transition: border-color 0.3s ease;
}

.theme-para:hover {
  border-left-color: rgba(255, 31, 54, 0.45);
  color: rgba(255, 255, 255, 0.82);
}

.theme-para strong {
  color: #fff;
  font-weight: 700;
}

/* Ambient Orbs */
.theme-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}

.theme-orb-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(255, 31, 54, 0.08), transparent 70%);
  top: -100px;
  left: -150px;
}

.theme-orb-2 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255, 31, 54, 0.06), transparent 70%);
  bottom: -80px;
  right: -100px;
}

/* Mobile */
@media (max-width: 768px) {
  .theme-section {
    padding: 60px 20px 70px;
  }

  .theme-quote p {
    font-size: 0.95rem;
  }

  .theme-para {
    font-size: 0.95rem;
  }
}

/* ============================================
   TEAM POINTS PAGE
   ============================================ */
.tp-section {
  position: relative;
  padding: 160px 24px 60px;
  overflow: hidden;
  min-height: 100vh;
  background: linear-gradient(180deg, var(--bg-primary) 0%, #0e0204 50%, var(--bg-primary) 100%);
}

.tp-container {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

/* Event Count Badge */
.tp-event-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: fit-content;
  margin: 0 auto 40px;
  padding: 8px 20px;
  border: 1px solid rgba(255, 31, 54, 0.3);
  border-radius: 50px;
  background: rgba(255, 31, 54, 0.07);
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.85rem;
  font-weight: 600;
  backdrop-filter: blur(10px);
}

.tp-event-badge i {
  color: var(--accent-neon);
}

/* Loading State */
.tp-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  gap: 14px;
  padding: 60px 0;
  text-align: center;
}

.tp-loading-text {
  color: var(--text-secondary);
  font-size: 1rem;
  font-weight: 600;
  animation: tp-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes tp-pulse {
  50% {
    opacity: 0.4;
  }
}

.tp-error {
  color: var(--accent-neon);
  font-weight: 700;
}

/* Podium (Top 3) */
.tp-podium {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: end;
  gap: 20px;
  margin-bottom: 48px;
  animation: fadeIn 0.5s ease forwards;
}

.tp-podium-card {
  position: relative;
  padding: 32px 18px 26px;
  border-radius: 20px;
  text-align: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  backdrop-filter: blur(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  box-shadow: var(--shadow-card);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease;
}

.tp-podium-card:hover {
  transform: translateY(-6px);
}

.tp-podium-medal {
  font-size: 1.7rem;
  margin-bottom: 10px;
  color: rgba(255, 255, 255, 0.5);
}

.tp-podium-rankno {
  font-family: 'VT323', monospace;
  font-size: 1.1rem;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.tp-podium-unit {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
  line-height: 1.3;
}

.tp-podium-points {
  font-family: 'VT323', monospace;
  font-size: 2.3rem;
  font-weight: 400;
  line-height: 1;
  color: var(--text-primary);
}

.tp-podium-points span {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--text-muted);
  margin-top: 6px;
}

/* Gold - 1st */
.tp-podium-rank-1 {
  order: 2;
  transform: translateY(-22px);
  padding-top: 40px;
  border-color: rgba(212, 175, 55, 0.45);
  background: linear-gradient(160deg, rgba(212, 175, 55, 0.16), rgba(255, 255, 255, 0.03));
  box-shadow: 0 20px 50px rgba(212, 175, 55, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  z-index: 2;
}

.tp-podium-rank-1::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 12%;
  right: 12%;
  height: 3px;
  background: linear-gradient(90deg, transparent, #ffe066, transparent);
  border-radius: 3px;
}

.tp-podium-rank-1:hover {
  transform: translateY(-28px);
}

.tp-podium-rank-1 .tp-podium-medal {
  color: #ffe066;
  font-size: 2.1rem;
  filter: drop-shadow(0 0 10px rgba(212, 175, 55, 0.6));
}

.tp-podium-rank-1 .tp-podium-points {
  color: #ffe066;
}

/* Silver - 2nd */
.tp-podium-rank-2 {
  order: 1;
  border-color: rgba(192, 192, 192, 0.4);
  background: linear-gradient(160deg, rgba(220, 220, 220, 0.1), rgba(255, 255, 255, 0.02));
}

.tp-podium-rank-2 .tp-podium-medal {
  color: #e6e6e6;
}

.tp-podium-rank-2 .tp-podium-points {
  color: #e6e6e6;
}

/* Bronze - 3rd */
.tp-podium-rank-3 {
  order: 3;
  border-color: rgba(176, 116, 62, 0.4);
  background: linear-gradient(160deg, rgba(176, 116, 62, 0.14), rgba(255, 255, 255, 0.02));
}

.tp-podium-rank-3 .tp-podium-medal {
  color: #dfa375;
}

.tp-podium-rank-3 .tp-podium-points {
  color: #dfa375;
}

/* Table (Desktop/Tablet) */
.tp-table-wrap {
  overflow: hidden;
  animation: fadeIn 0.5s ease forwards;
}

.tp-table-wrap.glass-card:hover {
  transform: none;
}

.tp-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.tp-table th {
  background: rgba(255, 255, 255, 0.03);
  padding: 18px 24px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 1.5px;
  border-bottom: 1px solid var(--border-glass);
}

.tp-table td {
  padding: 18px 24px;
  font-size: 1rem;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.02);
}

.tp-table tr:last-child td {
  border-bottom: none;
}

.tp-table tr:hover td {
  background: rgba(255, 31, 54, 0.03);
  color: var(--text-primary);
}

.tp-th-center {
  text-align: center;
}

.tp-th-right {
  text-align: right;
}

.badge-rank.rank-default {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  border: 1px solid var(--border-glass);
}

/* Card View (Mobile) */
.tp-cards {
  display: none;
}

.tp-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  transition: background 0.3s ease;
}

.tp-card:last-child {
  border-bottom: none;
}

.tp-card:hover {
  background: rgba(255, 31, 54, 0.04);
}

.tp-card-position {
  flex-shrink: 0;
}

.tp-card-unit {
  flex: 1;
}

.tp-card-unit-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
}

.tp-card-unit-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  margin-top: 2px;
}

.tp-card-points {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.tp-card-points-num {
  font-family: 'VT323', monospace;
  font-size: 1.8rem;
  font-weight: 400;
  color: var(--accent-neon);
  line-height: 1;
}

.tp-card-points-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  margin-top: 2px;
}

.tp-section .tp-container {
  text-align: center;
}

.tp-table-wrap {
  text-align: left;
}

/* Back Link */
.tp-back-link {
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  margin: 40px auto 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 600;
  transition: var(--transition-fast);
}

.tp-back-link:hover {
  color: var(--accent-neon);
}

/* Mobile: swap table for cards, stack podium */
@media (max-width: 768px) {
  .tp-section {
    padding: 120px 18px 70px;
  }

  .tp-table {
    display: none;
  }

  .tp-cards {
    display: block;
  }
}

@media (max-width: 640px) {
  /* Keep the staggered 3-column ladder look - just compact it to fit */
  .tp-podium {
    gap: 8px;
    margin-bottom: 32px;
  }

  .tp-podium-card {
    padding: 18px 8px 16px;
    border-radius: 14px;
  }

  .tp-podium-rank-1 {
    transform: translateY(-14px);
    padding-top: 26px;
  }

  .tp-podium-rank-1:hover {
    transform: translateY(-18px);
  }

  .tp-podium-medal {
    font-size: 1.2rem;
    margin-bottom: 6px;
  }

  .tp-podium-rank-1 .tp-podium-medal {
    font-size: 1.5rem;
  }

  .tp-podium-rankno {
    font-size: 0.85rem;
    margin-bottom: 6px;
  }

  .tp-podium-unit {
    font-size: 0.78rem;
    margin-bottom: 8px;
    line-height: 1.2;
    word-break: break-word;
  }

  .tp-podium-points {
    font-size: 1.5rem;
  }

  .tp-podium-points span {
    font-size: 0.55rem;
    letter-spacing: 1px;
  }
}

@media (max-width: 360px) {
  .tp-podium-unit {
    font-size: 0.7rem;
  }

  .tp-podium-points {
    font-size: 1.25rem;
  }
}

/* ============================================
   FOOTER SECTION
   ============================================ */
.footer-section {
  padding: 30px 20px 40px;
  background: var(--bg-primary); /* Use solid background to blend from the gradient above */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  z-index: 10;
  border-top: 1px solid rgba(255, 31, 54, 0.1);
}

.footer-divider {
  display: none;
}

.footer-line {
  flex-grow: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 31, 54, 0.4), transparent);
}

.footer-icon-wrapper {
  margin: 0 20px;
  color: var(--accent-red, #ff1f36);
  font-size: 1.2rem;
  filter: drop-shadow(0 0 8px rgba(255, 31, 54, 0.6));
}

.footer-content {
  text-align: center;
  margin-bottom: 24px;
}

.footer-sahi-img {
  max-height: 110px;
  width: auto;
  display: block;
  margin: 0 auto 8px;
  filter: drop-shadow(0 4px 18px rgba(255, 31, 54, 0.45));
  opacity: 0.92;
  transition: opacity 0.3s ease, filter 0.3s ease;
}

.footer-sahi-img:hover {
  opacity: 1;
  filter: drop-shadow(0 6px 24px rgba(255, 31, 54, 0.7));
}

.footer-title {
  font-family: 'Cinzel Decorative', serif;
  font-size: 2rem;
  color: #fff;
  margin-bottom: 12px;
  letter-spacing: 1px;
}

.footer-subtitle {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.95rem;
  margin-bottom: 30px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 24px;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.8rem;
  letter-spacing: 1px;
}

.footer-bottom p {
  margin: 0;
  text-align: center;
}

.social-icons {
  display: flex;
  gap: 20px;
  justify-content: center;
}

.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.6);
  font-size: 1.4rem;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(8px);
  transition: all 0.3s ease;
}

.social-icon:hover {
  border-color: rgba(255, 31, 54, 0.5);
  color: #fff;
  background: rgba(255, 31, 54, 0.1);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(255, 31, 54, 0.2);
}

@media (max-width: 768px) {
  .social-icons {
    gap: 12px;
  }
  .social-icon {
    width: 48px;
    height: 48px;
    font-size: 1.2rem;
  }
}

/* ============================================
   FLOATING BOTTOM NAVIGATION BAR
   ============================================ */

.float-nav {
  display: none;
}

@media (max-width: 768px) {
  .float-nav {
    display: block;
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    pointer-events: none;
    animation: float-nav-enter 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  }
}

@keyframes float-nav-enter {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.float-nav-track {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 10px;
  border-radius: 50px;
  background: rgba(8, 2, 2, 0.55);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255, 31, 54, 0.18);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.55),
    0 2px 8px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  pointer-events: all;
}

/* Each nav item */
.float-nav-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 10px 18px;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 40px;
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  min-width: 64px;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

/* Animated pill background (active indicator) */
.float-nav-pill {
  position: absolute;
  inset: 0;
  border-radius: 40px;
  background: rgba(255, 31, 54, 0.0);
  transition: background 0.35s ease, box-shadow 0.35s ease;
  z-index: 0;
}

.float-nav-item.active .float-nav-pill {
  background: linear-gradient(135deg, rgba(255, 31, 54, 0.88), rgba(180, 12, 30, 0.75));
  box-shadow:
    0 4px 20px rgba(255, 31, 54, 0.45),
    0 0 0 1px rgba(255, 31, 54, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

/* Icon */
.float-nav-icon {
  position: relative;
  z-index: 1;
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.45);
  transition: color 0.3s ease, transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.float-nav-item.active .float-nav-icon {
  color: #fff;
  transform: scale(1.1) translateY(-1px);
  filter: drop-shadow(0 2px 6px rgba(255, 31, 54, 0.5));
}

.float-nav-item:not(.active):hover .float-nav-icon {
  color: rgba(255, 31, 54, 0.8);
  transform: translateY(-2px);
}

/* Label */
.float-nav-label {
  position: relative;
  z-index: 1;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
  transition: color 0.3s ease;
  white-space: nowrap;
}

.float-nav-item.active .float-nav-label {
  color: rgba(255, 255, 255, 0.9);
}

.float-nav-item:not(.active):hover .float-nav-label {
  color: rgba(255, 31, 54, 0.75);
}

/* Ripple on click */
.float-nav-item:active {
  transform: scale(0.94);
}

/* Mobile adjustments */
@media (max-width: 480px) {
  .float-nav {
    bottom: 16px;
    width: calc(100% - 32px);
  }

  .float-nav-track {
    width: 100%;
    justify-content: space-around;
    padding: 8px 6px;
    border-radius: 40px;
  }

  .float-nav-item {
    padding: 9px 10px;
    min-width: 0;
    flex: 1;
  }

  .float-nav-label {
    font-size: 0.55rem;
  }

  .float-nav-icon {
    font-size: 1rem;
  }
}

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

.results-page {
  position: relative;
  z-index: 2;
  min-height: 60vh;
  padding: 130px 24px 80px;
}

.results-page-container {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

/* Decorative floating shapes */
.results-deco {
  position: absolute;
  pointer-events: none;
  z-index: 1;
}

.results-deco-ring {
  top: 6%;
  left: 7%;
  width: 70px;
  height: 70px;
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  animation: float-slow 9s ease-in-out infinite;
}

.results-deco-dot {
  top: 16%;
  right: 10%;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: radial-gradient(circle, #ffe066 0%, #b35f00 100%);
  box-shadow: 0 0 18px rgba(255, 179, 0, 0.5);
  animation: float 6s ease-in-out infinite;
}

.results-deco-squiggle {
  top: 3%;
  right: 24%;
  width: 90px;
  opacity: 0.45;
}

.results-deco-mark {
  bottom: 10%;
  left: 12%;
  font-size: 2rem;
  font-weight: 700;
  color: rgba(255, 31, 54, 0.25);
  animation: float 7s ease-in-out infinite reverse;
}

.results-hero-icon {
  width: 86px;
  height: 86px;
  margin: 0 auto 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: linear-gradient(135deg, rgba(255, 31, 54, 0.3), rgba(140, 0, 12, 0.4));
  border: 1px solid rgba(255, 150, 160, 0.35);
  box-shadow: 0 0 40px rgba(255, 31, 54, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: results-icon-float 4s ease-in-out infinite;
}

.results-hero-icon::after {
  content: '';
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  border: 1px dashed rgba(255, 31, 54, 0.3);
  animation: spin-slow 18s linear infinite;
}

.results-hero-icon i {
  font-size: 2rem;
  color: #fff;
  filter: drop-shadow(0 2px 10px rgba(255, 31, 54, 0.6));
}

@keyframes results-icon-float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-8px);
  }
}

.text-accent-gradient {
  background: linear-gradient(90deg, #ff1f36, #ff9a3c, #ff1f36);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

@media (max-width: 600px) {
  .results-deco {
    display: none;
  }
}

.results-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 28px;
  margin-bottom: 40px;
}

.results-controls::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
  animation: shimmer-sweep 4.5s ease-in-out infinite;
  pointer-events: none;
}

.results-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 6px 0;
}

.results-loader-comma-wrap {
  perspective: 400px;
  padding: 6px 0;
}

.results-loader-comma {
  width: 30px;
  aspect-ratio: 100 / 209.8;
  background: linear-gradient(180deg, rgba(255, 60, 80, 0.85) 0%, rgba(140, 0, 12, 0.95) 100%);
  border: 1px solid rgba(255, 150, 160, 0.4);
  box-shadow: 0 0 25px rgba(255, 31, 54, 0.5);
  clip-path: polygon(0.35% 0%,
      0.09% 46.15%,
      55.97% 46.78%,
      54.2% 54.37%,
      51.46% 60.05%,
      46.33% 66.38%,
      40.76% 70.8%,
      32.18% 75.22%,
      25.11% 77.76%,
      15.47% 80.29%,
      1.15% 82.81%,
      0.09% 83.45%,
      0.27% 99.97%,
      1.15% 99.97%,
      9.55% 99.25%,
      25.29% 96.72%,
      37.84% 94.19%,
      49.78% 91.03%,
      60.65% 87.24%,
      69.32% 83.45%,
      78.43% 78.39%,
      85.85% 72.7%,
      90.54% 67.64%,
      93.81% 62.58%,
      99.12% 48.05%,
      99.91% 1.26%,
      99.03% 0%);
  animation: comma-spin-y 1.6s linear infinite;
}

@keyframes comma-spin-y {
  from {
    transform: rotateY(0deg);
  }

  to {
    transform: rotateY(360deg);
  }
}

.results-loader-text {
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.3px;
  animation: pulse 1.4s ease-in-out infinite alternate;
}

.results-controls-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: 100%;
}

.results-select-wrap {
  position: relative;
}

.results-select {
  appearance: none;
  -webkit-appearance: none;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 12px 42px 12px 40px;
  border-radius: 10px;
  min-width: 220px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.results-select-icon {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--accent-neon);
  pointer-events: none;
  font-size: 0.85rem;
}

.results-select:hover {
  border-color: var(--text-muted);
}

.results-select:focus {
  outline: none;
  border-color: var(--accent-neon);
  box-shadow: 0 0 0 3px var(--accent-glow-subtle);
}

.results-select option {
  background: #0b0b0c;
  color: #fff;
}

.results-select-arrow {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  font-size: 0.8rem;
}

.results-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 30px;
  border-radius: 10px;
  background: var(--accent-neon);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.3px;
  box-shadow: var(--shadow-neon);
  transition: var(--transition-smooth);
  white-space: nowrap;
}

.results-btn:hover {
  background: var(--accent-hover);
  box-shadow: var(--shadow-neon-intense);
  transform: translateY(-2px);
}

.results-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.results-btn.outline {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.results-btn.outline:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 4px 15px rgba(0, 0, 0, 0.3);
}

.poster-section {
  max-width: 640px;
  margin: 0 auto 50px;
}

.poster-card {
  padding: 28px;
  text-align: center;
}

.poster-status {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 18px;
}

.poster-frame {
  width: min(100%, 480px);
  margin: 0 auto;
}

#generatedPoster {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.poster-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 24px;
}

.results-output {
  animation: fadeIn 0.5s ease forwards;
}

.results-output-title {
  font-family: var(--font-arabic);
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
  text-align: center;
  margin-bottom: 18px;
}

.results-empty-msg {
  text-align: center;
  color: var(--text-muted);
  padding: 50px 20px;
  font-size: 1rem;
}

@media (max-width: 600px) {
  .results-page {
    padding: 110px 16px 60px;
  }

  .results-controls-grid {
    flex-direction: column;
    align-items: stretch;
  }

  .results-select {
    min-width: 0;
    width: 100%;
  }

  .results-btn {
    width: 100%;
  }

  /* Collapse the results table into stacked cards instead of scrolling */
  .results-table-container {
    overflow-x: visible;
    border: none;
    box-shadow: none;
  }

  .results-table thead {
    display: none;
  }

  .results-table,
  .results-table tbody,
  .results-table tr,
  .results-table td {
    display: block;
    width: 100%;
  }

  .results-table tr {
    margin-bottom: 14px;
    border: 1px solid var(--border-glass);
    border-radius: 14px;
    padding: 6px 16px;
    background: var(--bg-card);
  }

  .results-table tr:last-child {
    margin-bottom: 0;
  }

  .results-table td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    text-align: right;
  }

  .results-table tr:last-child td {
    border-bottom: none;
  }

  .results-table td::before {
    content: attr(data-label);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    text-align: left;
  }
}

/* ─── CERTIFICATE PAGE ──────────────────────────────────────────────────── */
.cert-winners {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  max-width: 760px;
  margin: 0 auto 40px;
  animation: fadeIn 0.5s ease forwards;
}

.cert-winner-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  border-radius: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  cursor: pointer;
  transition: var(--transition-smooth);
  text-align: left;
}

.cert-winner-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-glow-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow-card);
}

.cert-winner-card.active {
  border-color: var(--accent-neon);
  box-shadow: 0 0 0 1px var(--accent-neon), var(--shadow-neon);
}

.cert-winner-rank {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  font-weight: 800;
  font-size: 1.05rem;
}

.cert-winner-info {
  min-width: 0;
}

.cert-winner-name {
  font-weight: 700;
  color: var(--text-primary);
  font-size: 0.98rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cert-winner-team {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cert-section {
  max-width: 760px;
  margin: 0 auto 50px;
}

.cert-card {
  padding: 28px;
  text-align: center;
}

.cert-frame {
  width: 100%;
  margin: 0 auto;
}

#generatedCert {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.06);
}

@media (max-width: 600px) {
  .cert-winners {
    grid-template-columns: 1fr;
  }
}