:root {
  --ink: #24160f;
  --ink-soft: #5a4336;
  --maroon: #7a1f2b;
  --maroon-deep: #4e1018;
  --saffron: #e08a2c;
  --gold: #c9a227;
  --gold-soft: #f4d36a;
  --cream: #f7efe0;
  --paper: #fffaf1;
  --leaf: #2f5d3a;
  --line: rgba(122, 31, 43, 0.16);
  --shadow: 0 18px 40px rgba(78, 16, 24, 0.12);
  --radius: 22px;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Mukta", "Segoe UI", sans-serif;
  --font-kn: "Tiro Kannada", serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(224, 138, 44, 0.18), transparent 55%),
    radial-gradient(900px 400px at 100% 0%, rgba(122, 31, 43, 0.12), transparent 50%),
    var(--cream);
  min-height: 100%;
}

img, video { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: var(--maroon); }

.skip {
  position: absolute;
  left: -999px;
}
.skip:focus {
  left: 12px;
  top: 12px;
  background: #fff;
  padding: 8px 12px;
  z-index: 50;
}

.wrap {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: linear-gradient(180deg, var(--maroon-deep), var(--maroon));
  color: #fffaf1;
  border-bottom: 4px solid var(--gold);
  box-shadow: 0 8px 24px rgba(36, 22, 15, 0.18);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
}

.crest {
  width: 62px;
  height: 62px;
  flex: none;
  object-fit: contain;
  background: #fffaf1;
  border-radius: 16px;
  padding: 4px;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,.25));
}

.hold-screen { padding: 18px 0 36px; }

.banner-stage {
  position: relative;
  min-height: min(72vh, 640px);
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background:
    linear-gradient(160deg, #4e1018 0%, #7a1f2b 42%, #e08a2c 100%);
}

.banner-stage img.banner-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.banner-veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(36,22,15,.18) 10%, rgba(36,22,15,.72) 70%, rgba(36,22,15,.88));
}

.banner-copy {
  position: relative;
  z-index: 1;
  min-height: min(72vh, 640px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(20px, 5vw, 42px);
  color: #fffaf1;
}

.stay-tuned {
  display: inline-block;
  letter-spacing: 0.38em;
  text-transform: uppercase;
  font-weight: 800;
  font-size: 0.82rem;
  color: var(--gold-soft);
  margin-bottom: 10px;
  animation: glow 1.8s ease-in-out infinite;
}

@keyframes glow {
  50% { opacity: 0.55; }
}

.banner-copy h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 6vw, 3.4rem);
  margin: 0 0 8px;
  line-height: 1.05;
}

.opens-on {
  font-size: clamp(1.05rem, 2.6vw, 1.35rem);
  color: var(--gold-soft);
  font-weight: 700;
  margin: 0 0 18px;
}

.live-now .stay-tuned { display: none; }

.play-hit {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.play-hit span {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: rgba(255,250,241,.92);
  color: var(--maroon-deep);
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  box-shadow: 0 10px 24px rgba(0,0,0,.28);
}

.btn-live {
  background: linear-gradient(180deg, #43c16d, #2f9e54);
  color: #fff;
  font-size: 1.05rem;
  padding: 14px 22px;
  box-shadow: 0 10px 22px rgba(47, 158, 84, 0.35);
}
.btn-live.off {
  background: #6b3a3a;
  box-shadow: none;
}

.brand-preview {
  width: 96px;
  height: 96px;
  object-fit: contain;
  background: #fff;
  border-radius: 18px;
  border: 1px solid var(--line);
}
.banner-preview {
  width: 100%;
  max-height: 180px;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #3d2a24;
}

.live-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 16px;
}

.video-poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}

.brand h1 {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 3.4vw, 1.85rem);
  margin: 0;
  letter-spacing: 0.01em;
  line-height: 1.15;
}

.kannada {
  font-family: var(--font-kn);
  margin: 2px 0 0;
  opacity: 0.92;
  font-size: 0.95rem;
}

.address {
  margin: 2px 0 0;
  font-size: 0.82rem;
  opacity: 0.82;
}

.header-actions {
  margin-left: auto;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn {
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 700;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}

.btn:active { transform: translateY(1px); }
.btn-gold {
  background: linear-gradient(180deg, var(--gold-soft), var(--gold));
  color: var(--maroon-deep);
  box-shadow: 0 8px 16px rgba(201, 162, 39, 0.28);
}
.btn-cream {
  background: var(--paper);
  color: var(--maroon);
}
.btn-maroon {
  background: var(--maroon);
  color: #fffaf1;
}
.btn-ghost {
  background: transparent;
  color: #fffaf1;
  border: 1px solid rgba(255,250,241,.35);
}
.btn-leaf { background: var(--leaf); color: #fff; }
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}
.btn-block { width: 100%; }

.hero {
  padding: 28px 0 10px;
}

.stage-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(16px, 3vw, 28px);
  position: relative;
  overflow: hidden;
}

.stage-card::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(201, 162, 39, 0.35);
  border-radius: 16px;
  pointer-events: none;
}

.kicker {
  display: inline-block;
  background: rgba(224, 138, 44, 0.16);
  color: var(--maroon);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h2 {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 5vw, 3rem);
  margin: 10px 0 8px;
  line-height: 1.1;
}

.lede {
  color: var(--ink-soft);
  font-size: 1.05rem;
  max-width: 58ch;
}

.countdown {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 22px 0 8px;
}

.time-cell {
  background: var(--maroon-deep);
  color: #fffaf1;
  border-radius: 18px;
  padding: 14px 8px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.time-cell::after {
  content: "";
  position: absolute;
  inset: auto 18% 10px;
  height: 3px;
  border-radius: 99px;
  background: var(--gold);
}

.time-cell b {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 5vw, 2.2rem);
  line-height: 1;
}

.time-cell span {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.8;
}

.countdown.closed .time-cell {
  background: #3d2a24;
}

.countdown-label {
  margin: 8px 0 0;
  font-weight: 700;
  color: var(--maroon);
}

.enter-box {
  margin-top: 22px;
  display: grid;
  gap: 10px;
}

.enter-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

input[type="text"],
input[type="tel"],
input[type="password"],
input[type="number"],
input[type="datetime-local"],
input[type="file"],
textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 14px;
  padding: 12px 14px;
  color: var(--ink);
  min-height: 48px;
}

input:focus, textarea:focus {
  outline: 2px solid var(--saffron);
  outline-offset: 1px;
}

label.field {
  display: grid;
  gap: 6px;
  font-weight: 700;
  color: var(--maroon-deep);
  font-size: 0.92rem;
}

.hint { color: var(--ink-soft); font-weight: 500; font-size: 0.86rem; }
.error { color: #9c1c1c; font-weight: 700; min-height: 1.2em; }

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 3vw, 2rem);
  margin: 28px 0 12px;
}

.video-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  padding-bottom: 40px;
}

.video-card, .vote-card, .teacher-form, .board-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.video-frame {
  background: #1a0f0c;
  aspect-ratio: 16 / 9;
  position: relative;
}

.video-frame video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.video-meta, .vote-body, .form-body {
  padding: 12px 14px 16px;
}

.video-meta h3, .vote-body h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.15rem;
}

.dance {
  margin: 2px 0 0;
  color: var(--saffron);
  font-weight: 700;
}

.tabs {
  display: flex;
  gap: 8px;
  background: rgba(122, 31, 43, 0.08);
  padding: 6px;
  border-radius: 999px;
  width: max-content;
  max-width: 100%;
}

.tab {
  border: 0;
  background: transparent;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 700;
  color: var(--maroon);
}

.tab.active {
  background: var(--maroon);
  color: #fffaf1;
}

.hall-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 18px 0;
}

.vote-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.vote-photo {
  aspect-ratio: 1;
  object-fit: cover;
  width: 100%;
  background: #efe4d4;
}

.stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: 10px;
}

.stepper button {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 0;
  background: var(--maroon);
  color: #fff;
  font-size: 1.2rem;
  font-weight: 700;
}

.stepper button.plus5 { width: auto; padding: 0 10px; background: var(--saffron); color: #2a150c; }
.stepper .count {
  font-family: var(--font-display);
  font-size: 1.6rem;
  min-width: 36px;
  text-align: center;
}

.vote-bar {
  position: sticky;
  bottom: 0;
  background: rgba(36, 22, 15, 0.94);
  color: #fffaf1;
  padding: 12px 0;
  margin-top: 18px;
}

.vote-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.remain {
  font-family: var(--font-display);
  font-size: 1.2rem;
}

.remain b { color: var(--gold-soft); }

.thanks {
  min-height: 70vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 40px 16px;
}

.tick {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 6px solid var(--leaf);
  display: grid;
  place-items: center;
  margin: 0 auto 16px;
  animation: pop .5s ease;
  background: #e7f3ea;
}

.tick svg { width: 64px; height: 64px; }

@keyframes pop {
  from { transform: scale(0.4); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.hidden { display: none !important; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  background: var(--ink);
  color: #fff;
  padding: 12px 16px;
  border-radius: 999px;
  z-index: 40;
  max-width: min(90vw, 420px);
}

.empty {
  padding: 28px;
  text-align: center;
  color: var(--ink-soft);
}

.site-footer {
  padding: 28px 0 40px;
  color: var(--ink-soft);
  text-align: center;
}

.site-footer a { color: var(--maroon); }

/* Principal */
.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px 16px;
}

.login-card {
  width: min(420px, 100%);
  background: var(--paper);
  border-radius: 24px;
  padding: 28px 22px;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}

.login-card h1 {
  font-family: var(--font-display);
  margin: 8px 0 4px;
}

.dash {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}

.side {
  background: linear-gradient(180deg, var(--maroon-deep), var(--maroon));
  color: #fffaf1;
  padding: 20px 16px;
}

.side a, .side button.navbtn {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  color: inherit;
  padding: 10px 12px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 700;
}

.side button.navbtn.active, .side a:hover, .side button.navbtn:hover {
  background: rgba(255,250,241,.12);
}

.main { padding: 20px 18px 48px; }

.stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.stat {
  background: var(--paper);
  border-radius: 18px;
  padding: 16px;
  border: 1px solid var(--line);
}

.stat b {
  display: block;
  font-family: var(--font-display);
  font-size: 1.8rem;
}

.bar-row { margin: 10px 0 16px; }
.bar-person {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 0 0 18px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 12px;
}
.board-photo {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  object-fit: cover;
  flex: none;
  border: 2px solid var(--gold);
  background: #efe4d4;
}
.bar-person-main { flex: 1; min-width: 0; }
.vote-jump {
  margin: -20px 0 28px;
}
#vote-panel { scroll-margin-top: 84px; }
.bar-top { display: flex; justify-content: space-between; gap: 8px; font-weight: 700; }
.bar-track {
  height: 12px;
  background: #efe4d4;
  border-radius: 99px;
  overflow: hidden;
  margin-top: 6px;
}
.bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--saffron), var(--maroon));
  width: 0;
  transition: width .4s ease;
}

.rank {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--maroon-deep);
  font-weight: 800;
  font-size: 0.8rem;
}

.table-wrap { overflow: auto; background: var(--paper); border-radius: 16px; border: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; min-width: 640px; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: #f3e6d2; }

.progress-box {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 12px;
  margin-top: 8px;
}
.progress-track { height: 8px; background: #efe4d4; border-radius: 99px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--leaf); width: 0%; }

.vote-panel-pad { padding-bottom: 88px; }

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3dbf6a;
  display: inline-block;
  margin-right: 6px;
  box-shadow: 0 0 0 0 rgba(61, 191, 106, 0.7);
  animation: pulse 1.6s infinite;
}

@keyframes pulse {
  70% { box-shadow: 0 0 0 8px rgba(61, 191, 106, 0); }
}

.teacher-form { padding: 14px; display: grid; gap: 10px; }
.photo-preview {
  width: 88px;
  height: 88px;
  object-fit: cover;
  border-radius: 16px;
  background: #efe4d4;
}

@media (min-width: 720px) {
  .video-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vote-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .enter-box { grid-template-columns: 1fr 280px; align-items: end; }
}

@media (min-width: 1024px) {
  .video-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .vote-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .dash { grid-template-columns: 1fr; }
  .side { position: sticky; top: 0; z-index: 8; }
  .header-actions .btn { padding: 8px 12px; font-size: 0.9rem; }
  .enter-row { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .countdown { gap: 6px; }
  .time-cell { padding: 10px 4px; border-radius: 14px; }
}
