/* Team Vote Arena — frontend. Floodlit stadium look: ink-navy, saffron, trophy gold, scoreboard digits. */
.tva-wrap, .tva-modal {
  --p: var(--tva-primary, #ff7a1a);
  --a: var(--tva-accent, #ffc83d);
  --live: #22c55e;
  --bad: #ef4444;
  font-family: 'Mukta', 'Noto Sans Devanagari', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 16px; line-height: 1.55; color: var(--tx);
  -webkit-font-smoothing: antialiased;
}
.tva-wrap[data-theme="dark"], .tva-modal[data-theme="dark"] {
  --bg: #0a0e27; --bg2: #121842; --card: #141a45; --card2: #1b2257; --tx: #eef0ff; --mu: #a4abd6; --ln: rgba(255,255,255,.11);
  --sh: 0 24px 48px -28px rgba(0,0,0,.8); --tile: #05081c; --tilefg: #ffd45a;
}
.tva-wrap[data-theme="light"], .tva-modal[data-theme="light"] {
  --bg: #f3f4fb; --bg2: #e9ebf8; --card: #ffffff; --card2: #f0f1fb; --tx: #141733; --mu: #5d6389; --ln: #e1e4f3;
  --sh: 0 22px 40px -28px rgba(30,25,100,.45); --tile: #141733; --tilefg: #ffd45a;
}
.tva-wrap *, .tva-modal * { box-sizing: border-box; }
.tva-wrap {
  background: var(--bg); border-radius: 22px; padding: clamp(14px, 3vw, 32px); margin: 20px 0; overflow: hidden;
}
.tva-wrap a { color: inherit; text-decoration: none; }
.tva-wrap h1, .tva-wrap h2, .tva-wrap h3, .tva-wrap h4, .tva-modal h3 {
  font-family: 'Baloo 2', 'Mukta', sans-serif; font-weight: 800; line-height: 1.15; margin: 0; color: var(--tx);
}
.tva-wrap p { margin: 0; }
.tva-wrap [hidden], .tva-modal [hidden] { display: none !important; }

/* ---------- Buttons ---------- */
.tva-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer; border: 0;
  background: var(--p); color: #1a0f00 !important; font: 700 15px/1 'Baloo 2', 'Mukta', sans-serif;
  padding: 11px 18px; border-radius: 999px; transition: transform .15s, box-shadow .15s, filter .15s; text-decoration: none !important;
  box-shadow: 0 8px 18px -10px var(--p);
}
.tva-btn:hover { transform: translateY(-2px); filter: brightness(1.06); }
.tva-btn:focus-visible, .tva-chip:focus-visible, .tva-wrap input:focus-visible, .tva-modal input:focus-visible { outline: 3px solid var(--a); outline-offset: 2px; }
.tva-btn:disabled { opacity: .6; cursor: wait; transform: none; }
.tva-btn-ghost { background: transparent; color: var(--tx) !important; box-shadow: inset 0 0 0 2px var(--ln); }
.tva-btn-ghost:hover { box-shadow: inset 0 0 0 2px var(--p); }
.tva-btn-lg { padding: 15px 26px; font-size: 17px; }
.tva-btn-sm { padding: 8px 13px; font-size: 13px; }
.tva-btn-icon { padding: 8px 12px; }
.tva-btn-off { background: var(--card2); color: var(--mu) !important; box-shadow: none; cursor: default; }
.tva-btn-off:hover { transform: none; filter: none; }

/* ---------- Status pill ---------- */
.tva-pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; font: 700 14px 'Baloo 2', sans-serif; background: rgba(255,255,255,.1); color: #fff; }
.tva-pill i { width: 9px; height: 9px; border-radius: 50%; background: #999; }
.tva-pill-open i { background: var(--live); box-shadow: 0 0 0 0 rgba(34,197,94,.7); animation: tvaPulse 1.8s infinite; }
.tva-pill-soon i { background: var(--a); }
.tva-pill-closed i { background: var(--bad); }
@keyframes tvaPulse { 70% { box-shadow: 0 0 0 10px rgba(34,197,94,0); } 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); } }

/* ---------- Scoreboard digits ---------- */
.tva-score { display: inline-flex; gap: 5px; }
.tva-score i {
  font: normal 400 clamp(26px, 5vw, 44px)/1 'Bungee', 'Baloo 2', sans-serif; color: var(--tilefg); background: var(--tile);
  min-width: 1.05em; text-align: center; padding: .22em .12em; border-radius: 7px; position: relative;
  box-shadow: inset 0 -2px 0 rgba(255,255,255,.07), 0 6px 14px -8px #000;
}
.tva-score i::after { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 2px; background: rgba(255,255,255,.09); }
.tva-score.xl i { font-size: clamp(34px, 8vw, 68px); }
.tva-score.lg i { font-size: clamp(28px, 6vw, 48px); }
.tva-score.sm i { font-size: 20px; border-radius: 5px; }
.tva-score.sm { gap: 3px; }

/* ---------- Hero ---------- */
.tva-hero {
  position: relative; display: grid; grid-template-columns: 1.3fr 1fr; gap: 28px; align-items: center;
  padding: clamp(20px, 4vw, 44px); border-radius: 18px; color: #fff; overflow: hidden; margin-bottom: 30px;
  background: radial-gradient(120% 90% at 85% -10%, rgba(255,200,61,.28), transparent 55%), linear-gradient(160deg, #0d1340 0%, #070a22 100%);
  border: 1px solid rgba(255,255,255,.1);
}
.tva-hero::before {
  content: ''; position: absolute; inset: -40% -10% auto auto; width: 70%; aspect-ratio: 1; pointer-events: none; opacity: .5;
  background: conic-gradient(from 200deg, transparent 0 22%, rgba(255,214,90,.16) 28%, transparent 34% 100%);
}
.tva-hero > * { position: relative; }
.tva-hero h1 { color: #fff; font-size: clamp(34px, 6vw, 62px); margin: 14px 0 8px; letter-spacing: -.5px; }
.tva-hero-copy p { color: #c3c8ee; font-size: 18px; max-width: 34ch; }
.tva-hero-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.tva-hero .tva-btn-ghost { color: #fff !important; box-shadow: inset 0 0 0 2px rgba(255,255,255,.28); }
.tva-count { margin-top: 20px; display: inline-flex; flex-direction: column; background: rgba(255,255,255,.07); border-radius: 12px; padding: 8px 14px; }
.tva-count small { color: #aab1e0; font-size: 13px; }
.tva-count b { font: 400 22px 'Bungee', sans-serif; color: var(--a); letter-spacing: 1px; }
.tva-board { background: rgba(5,8,28,.7); border: 1px solid rgba(255,255,255,.12); border-radius: 16px; padding: 22px; text-align: center; }
.tva-board > small { display: block; color: #aab1e0; margin-bottom: 12px; font-size: 15px; }
.tva-board-foot { display: flex; justify-content: space-between; gap: 8px; margin-top: 18px; padding-top: 14px; border-top: 1px dashed rgba(255,255,255,.18); color: #aab1e0; font-size: 14px; }
.tva-board-foot b { color: #fff; font: 700 20px 'Baloo 2', sans-serif; display: block; }

/* ---------- Sections ---------- */
.tva-sec { margin-top: 34px; }
.tva-sec:first-child { margin-top: 0; }
.tva-sec-head { margin-bottom: 18px; }
.tva-sec-head h2 { font-size: clamp(24px, 4vw, 34px); }
.tva-sec-head p { color: var(--mu); margin-top: 4px; }
.tva-center { text-align: center; margin-top: 20px; }
.tva-empty { padding: 28px; text-align: center; color: var(--mu); background: var(--card); border: 1px dashed var(--ln); border-radius: 14px; }
.tva-empty.sm { padding: 14px; margin: 8px 0; font-size: 14px; }
.tva-empty a { color: var(--p); font-weight: 700; }

/* ---------- Leaderboard ---------- */
.tva-lb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 18px; }
.tva-area { background: var(--card); border: 1px solid var(--ln); border-radius: 16px; padding: 18px; box-shadow: var(--sh); }
.tva-area-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 14px; }
.tva-area-head h3 { font-size: 22px; }
.tva-area-head small { color: var(--mu); }
.tva-area-total { text-align: right; }
.tva-area-total b { font: 400 22px 'Bungee', sans-serif; color: var(--p); display: block; }
.tva-area-total small { font-size: 12px; }
.tva-leader {
  position: relative; display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding: 14px; margin-bottom: 12px; border-radius: 14px;
  background: linear-gradient(120deg, rgba(255,200,61,.20), rgba(255,200,61,.04)); border: 1.5px solid var(--a);
}
.tva-crown { position: absolute; top: -15px; left: 14px; font-size: 22px; filter: drop-shadow(0 2px 2px rgba(0,0,0,.4)); }
.tva-leader-info { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 130px; }
.tva-leader-info small { color: var(--mu); font-size: 12px; }
.tva-leader-info a { font: 800 19px/1.2 'Baloo 2', sans-serif; }
.tva-leader-act { display: flex; flex-wrap: wrap; gap: 6px; width: 100%; }
.tva-ranks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.tva-row { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; background: var(--card2); }
.tva-row.me { outline: 2px solid var(--p); }
.tva-no { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font: 800 13px 'Baloo 2', sans-serif; background: var(--bg2); color: var(--mu); flex: none; }
.tva-row.r1 .tva-no { background: var(--a); color: #2a1b00; }
.tva-row.r2 .tva-no { background: #cfd3e4; color: #1d2033; }
.tva-row.r3 .tva-no { background: #d89a68; color: #2c1604; }
.tva-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.tva-row-main a { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tva-bar { height: 6px; border-radius: 99px; background: var(--bg2); overflow: hidden; display: block; }
.tva-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--p), var(--a)); border-radius: 99px; transition: width 1s cubic-bezier(.2, .8, .2, 1); }
.tva-row-v { font: 800 16px 'Baloo 2', sans-serif; min-width: 40px; text-align: right; }
.tva-more { display: block; margin-top: 12px; text-align: center; font-weight: 700; color: var(--p) !important; }
.tva-more:hover { text-decoration: underline !important; }

/* ---------- Avatars ---------- */
.tva-av { display: inline-grid; place-items: center; flex: none; width: 52px; height: 52px; border-radius: 50%; overflow: hidden; background: var(--bg2); border: 2px solid var(--a); }
.tva-av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tva-av-i { background: hsl(var(--h, 30), 70%, 45%); color: #fff; font: 800 22px 'Baloo 2', sans-serif; border-color: rgba(255,255,255,.25); }
.tva-av.xs { width: 34px; height: 34px; font-size: 15px; border-width: 1.5px; }
.tva-av.md { width: 58px; height: 58px; }
.tva-av.lg { width: 76px; height: 76px; font-size: 30px; }
.tva-av.xl { width: 110px; height: 110px; font-size: 44px; border-width: 3px; }

/* ---------- Teams grid ---------- */
.tva-toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.tva-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.tva-chip { cursor: pointer; border: 0; background: var(--card); color: var(--tx); border-radius: 999px; padding: 8px 14px; font: 700 14px 'Baloo 2', 'Mukta', sans-serif; box-shadow: inset 0 0 0 1.5px var(--ln); }
.tva-chip em { font-style: normal; color: var(--mu); margin-left: 3px; }
.tva-chip.on { background: var(--p); color: #1a0f00; box-shadow: none; }
.tva-chip.on em { color: #1a0f00; }
.tva-search, .tva-form input, .tva-form select, .tva-form textarea, .tva-modal .tva-form input {
  width: 100%; background: var(--card); color: var(--tx); border: 1.5px solid var(--ln); border-radius: 12px; padding: 12px 14px; font: 500 16px 'Mukta', sans-serif; margin: 0;
}
.tva-search { max-width: 300px; }
.tva-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 16px; }
.tva-card { position: relative; background: var(--card); border: 1px solid var(--ln); border-radius: 16px; padding: 22px 16px 16px; text-align: center; box-shadow: var(--sh); display: flex; flex-direction: column; align-items: center; gap: 8px; }
.tva-card h4 { font-size: 20px; }
.tva-meta { color: var(--mu); font-size: 14px; }
.tva-rank { position: absolute; top: 10px; left: 10px; font: 700 12px 'Baloo 2', sans-serif; background: var(--bg2); color: var(--mu); padding: 3px 9px; border-radius: 99px; }
.tva-rank.r1 { background: var(--a); color: #2a1b00; }
.tva-votes b { font: 400 26px 'Bungee', sans-serif; color: var(--p); }
.tva-votes small { display: block; color: var(--mu); margin-top: -2px; }
.tva-card-act { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: auto; padding-top: 6px; }

/* ---------- Single team ---------- */
.tva-profile { display: grid; grid-template-columns: 1.6fr 1fr; gap: 22px; align-items: center; padding: clamp(18px, 3vw, 34px); border-radius: 18px; color: #fff; background: radial-gradient(100% 120% at 100% 0, rgba(255,200,61,.25), transparent 55%), linear-gradient(160deg, #0d1340, #070a22); }
.tva-profile-main { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.tva-profile h1 { color: #fff; font-size: clamp(28px, 5vw, 46px); margin: 6px 0; }
.tva-profile .tva-meta { color: #b9bfe9; margin-bottom: 14px; }
.tva-profile .tva-btn-ghost { color: #fff !important; box-shadow: inset 0 0 0 2px rgba(255,255,255,.28); }
.tva-profile .tva-card-act { justify-content: flex-start; }
.tva-code { font: 400 13px 'Bungee', sans-serif; color: var(--a); letter-spacing: 1px; }
.tva-profile-score { background: rgba(5,8,28,.7); border: 1px solid rgba(255,255,255,.12); border-radius: 16px; padding: 18px; text-align: center; display: flex; flex-direction: column; gap: 6px; align-items: center; }
.tva-profile-score small { color: #aab1e0; }
.tva-bigrank { font: 400 48px/1 'Bungee', sans-serif; color: var(--a); }
.tva-two { display: grid; grid-template-columns: 1.4fr 1fr; gap: 26px; }
.tva-two h3 { font-size: 22px; margin: 0 0 12px; }
.tva-about { color: var(--mu); margin-bottom: 22px; }
.tva-players { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.tva-players li { display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--ln); border-radius: 12px; padding: 10px 12px; font-weight: 600; }
.tva-players li span { width: 26px; height: 26px; border-radius: 50%; background: var(--bg2); display: grid; place-items: center; font: 800 12px 'Baloo 2', sans-serif; color: var(--mu); flex: none; }

/* ---------- Videos ---------- */
.tva-vgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 16px; }
.tva-vcard { all: unset; cursor: pointer; display: flex; flex-direction: column; gap: 6px; box-sizing: border-box; color: var(--tx); }
.tva-vcard:focus-visible { outline: 3px solid var(--a); outline-offset: 3px; border-radius: 12px; }
.tva-vthumb { position: relative; aspect-ratio: 16/9; border-radius: 14px; overflow: hidden; background: linear-gradient(135deg, #1b2257, #0a0e27); display: grid; place-items: center; }
.tva-vthumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tva-vthumb b { position: relative; width: 52px; height: 52px; border-radius: 50%; background: var(--p); color: #1a0f00; display: grid; place-items: center; font-size: 20px; transition: transform .2s; }
.tva-vcard:hover .tva-vthumb b { transform: scale(1.12); }
.tva-vph { font-size: 40px; position: absolute; opacity: .35; }
.tva-vtitle { font: 700 16px 'Baloo 2', 'Mukta', sans-serif; }
.tva-vcard small { color: var(--mu); }

/* ---------- Forms ---------- */
.tva-formwrap { max-width: 820px; margin-left: auto; margin-right: auto; }
.tva-form { display: flex; flex-direction: column; gap: 14px; }
.tva-form label { display: flex; flex-direction: column; gap: 6px; font-weight: 700; font-size: 15px; }
.tva-form label small { font-weight: 400; color: var(--mu); }
.tva-form input[type="file"] { padding: 9px; }
.tva-form textarea { resize: vertical; }
.tva-grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 14px; }
.tva-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.tva-form-msg { min-height: 20px; font-weight: 700; }
.tva-form-msg.err { color: var(--bad); }
.tva-form-msg.ok { color: var(--live); }
.tva-note { color: var(--mu); }
.tva-tel { display: flex; align-items: stretch; }
.tva-tel em { font-style: normal; display: grid; place-items: center; padding: 0 12px; background: var(--card2); border: 1.5px solid var(--ln); border-right: 0; border-radius: 12px 0 0 12px; color: var(--mu); font-weight: 700; }
.tva-tel input { border-radius: 0 12px 12px 0 !important; }
.tva-success { text-align: center; background: var(--card); border: 1.5px solid var(--a); border-radius: 18px; padding: 30px 20px; position: relative; overflow: hidden; }
.tva-success-ico { font-size: 46px; }
.tva-success h3 { font-size: 26px; margin: 6px 0; }
.tva-creds { display: flex; justify-content: center; flex-wrap: wrap; gap: 14px; margin: 18px 0 10px; }
.tva-creds div { background: var(--tile); border-radius: 12px; padding: 12px 22px; }
.tva-creds small { display: block; color: #9aa1d4; }
.tva-creds b { font: 400 24px 'Bungee', sans-serif; color: var(--tilefg); letter-spacing: 2px; }
.tva-warn { color: var(--a); font-weight: 700; margin-bottom: 14px; }
.tva-cap-head { display: flex; gap: 14px; align-items: center; }
.tva-cap-head h3 { font-size: 24px; }

/* ---------- Referral ---------- */
.tva-refbox { background: var(--card2); border: 1.5px dashed var(--a); border-radius: 14px; padding: 14px 16px; margin: 14px 0; text-align: left; }
.tva-refbox h4 { font-size: 18px; margin-bottom: 2px; }
.tva-refbox p { color: var(--mu); font-size: 14px; }
.tva-refrow { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.tva-refrow input { flex: 1; min-width: 180px; }
.tva-refstats { display: flex; gap: 12px; margin-top: 12px; }
.tva-refstats div { flex: 1; background: var(--tile); border-radius: 12px; padding: 10px; text-align: center; }
.tva-refstats b { font: 400 24px 'Bungee', sans-serif; color: var(--tilefg); display: block; }
.tva-refstats small { color: #9aa1d4; }
.tva-supporters { margin-top: 10px; }
.tva-supporters small { color: var(--mu); font-weight: 700; }

/* ---------- Modal ---------- */
.tva-modal { position: fixed; inset: 0; z-index: 999999; display: grid; place-items: center; padding: 16px; background: rgba(4,6,20,.72); backdrop-filter: blur(4px); opacity: 0; transition: opacity .2s; }
.tva-modal.show { opacity: 1; }
.tva-modal-box { position: relative; width: min(100%, 440px); max-height: 92vh; overflow: auto; background: var(--card); color: var(--tx); border: 1px solid var(--ln); border-radius: 20px; padding: 28px 22px 22px; transform: translateY(14px) scale(.98); transition: transform .25s cubic-bezier(.2, .9, .3, 1.2); }
.tva-modal.show .tva-modal-box { transform: none; }
.tva-modal-box.wide { width: min(100%, 860px); padding: 14px; background: #000; }
.tva-modal-box h3 { font-size: 26px; }
.tva-vname { color: var(--p); font: 800 20px 'Baloo 2', sans-serif; margin: 2px 0 14px; }
.tva-x { position: absolute; top: 8px; right: 10px; z-index: 2; width: 34px; height: 34px; border: 0; border-radius: 50%; cursor: pointer; background: var(--card2); color: var(--tx); font-size: 22px; line-height: 1; }
.tva-modal-box.wide .tva-x { background: rgba(255,255,255,.9); color: #000; top: 18px; right: 18px; }
.tva-video { position: relative; aspect-ratio: 16/9; border-radius: 12px; overflow: hidden; }
.tva-video.tall { aspect-ratio: 9/14; max-height: 80vh; margin: 0 auto; }
.tva-video iframe, .tva-video video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
.tva-done { text-align: center; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.tva-done-ico { font-size: 54px; }
.tva-done p { color: var(--mu); }
.tva-conf { position: absolute; top: -10px; width: 9px; height: 14px; border-radius: 2px; animation: tvaFall 2.2s ease-in forwards; z-index: 3; pointer-events: none; }
@keyframes tvaFall { to { transform: translateY(420px) rotate(520deg); opacity: 0; } }
.tva-toast { position: fixed; left: 50%; bottom: 28px; z-index: 1000000; transform: translate(-50%, 20px); background: #111; color: #fff; padding: 11px 20px; border-radius: 99px; opacity: 0; transition: .3s; font-weight: 700; }
.tva-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Responsive ---------- */
@media (max-width: 780px) {
  .tva-hero, .tva-profile, .tva-two { grid-template-columns: 1fr; }
  .tva-hero-copy p { max-width: none; }
  .tva-search { max-width: none; }
  .tva-profile-main { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  .tva-wrap *, .tva-modal *, .tva-modal { animation: none !important; transition: none !important; }
}
