@import url('https://fonts.googleapis.com/css2?family=Heebo:wght@300;400;500;700;800;900&display=swap');

:root {
  --bg: #fff7ec;
  --bg-soft: #fff0d6;
  --card: rgba(255,255,255,.88);
  --text: #241421;
  --muted: #715f70;
  --primary: #7b2ff7;
  --pink: #ff4f8b;
  --orange: #ff8a00;
  --gold: #ffc83d;
  --cyan: #00b8c8;
  --border: rgba(36,20,33,.12);
  --danger: #e63946;
  --success: #1b9aaa;
  --radius: 22px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Heebo", Arial, sans-serif;
  background:
    radial-gradient(circle at 10% 0%, rgba(255,79,139,.22), transparent 30%),
    radial-gradient(circle at 90% 5%, rgba(255,200,61,.35), transparent 28%),
    radial-gradient(circle at 50% 55%, rgba(123,47,247,.16), transparent 36%),
    linear-gradient(180deg, #fff7ec, #fffdf8);
  color: var(--text);
  direction: rtl;
}

a { color: inherit; text-decoration: none; }

.container {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.header {
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,.78);
  backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-inner {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -.5px;
}

.logo small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  margin-top: -4px;
}

.logo span {
  background: linear-gradient(90deg, var(--primary), var(--pink), var(--orange));
  -webkit-background-clip: text;
  color: transparent;
}

.nav {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.nav a {
  color: var(--muted);
  font-weight: 800;
  font-size: 15px;
}

.nav a:hover { color: var(--text); }

.hero { padding: 76px 0 48px; }

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 28px;
  align-items: center;
}

.badge {
  display: inline-flex;
  padding: 8px 14px;
  border: 1px solid rgba(255,138,0,.28);
  border-radius: 999px;
  color: #9a4d00;
  background: rgba(255,200,61,.25);
  font-size: 15px;
  font-weight: 900;
}

h1 {
  font-size: clamp(42px, 7vw, 86px);
  line-height: .95;
  margin: 18px 0;
  letter-spacing: -1px;
}

h2 {
  font-size: 30px;
  margin: 0 0 16px;
}

p {
  color: var(--muted);
  line-height: 1.8;
  font-size: 17px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: 0 18px 55px rgba(126,70,20,.11);
}

.grid {
  display: grid;
  gap: 18px;
}

.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  font-weight: 900;
  cursor: pointer;
  font-family: inherit;
}

.btn-primary {
  border: none;
  background: linear-gradient(90deg, var(--primary), var(--pink), var(--orange));
  color: #fff;
}

.btn-danger {
  border: none;
  background: var(--danger);
  color: #fff;
}

.form { display: grid; gap: 14px; }

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 800;
}

input, select, textarea {
  width: 100%;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.9);
  color: var(--text);
  border-radius: 16px;
  min-height: 48px;
  padding: 10px 14px;
  font: inherit;
}

textarea { min-height: 110px; resize: vertical; }

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

th, td {
  padding: 14px;
  border-bottom: 1px solid var(--border);
  text-align: right;
}

th {
  color: #8d3e00;
  font-size: 14px;
  background: rgba(255,200,61,.16);
}

.footer {
  margin-top: 70px;
  border-top: 1px solid var(--border);
  padding: 28px 0;
  color: var(--muted);
  background: rgba(255,255,255,.55);
}

.hidden { display: none !important; }

.page { padding: 42px 0; }

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.notice {
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(123,47,247,.08);
  border: 1px solid rgba(123,47,247,.18);
  color: var(--text);
}

@media (max-width: 800px) {
  .hero-grid, .grid-2, .grid-3 { grid-template-columns: 1fr; }

  .header-inner {
    padding: 18px 0;
    align-items: flex-start;
    flex-direction: column;
  }
}

.rank-gold {
  background: linear-gradient(90deg, rgba(255,200,61,.42), rgba(255,255,255,.9));
}

.rank-silver {
  background: linear-gradient(90deg, rgba(192,192,192,.42), rgba(255,255,255,.9));
}

.rank-bronze {
  background: linear-gradient(90deg, rgba(205,127,50,.38), rgba(255,255,255,.9));
}

.rank-badge {
  display: inline-flex;
  min-width: 34px;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 900;
  background: rgba(255,255,255,.7);
}

.rank-gold {
  background: linear-gradient(90deg, rgba(255,200,61,.42), rgba(255,255,255,.9));
}

.rank-silver {
  background: linear-gradient(90deg, rgba(192,192,192,.42), rgba(255,255,255,.9));
}

.rank-bronze {
  background: linear-gradient(90deg, rgba(205,127,50,.38), rgba(255,255,255,.9));
}

.rank-badge {
  display: inline-flex;
  min-width: 34px;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 900;
  background: rgba(255,255,255,.7);
}

.rank-gold {
  background: linear-gradient(90deg, rgba(255,200,61,.42), rgba(255,255,255,.9));
}

.rank-silver {
  background: linear-gradient(90deg, rgba(192,192,192,.42), rgba(255,255,255,.9));
}

.rank-bronze {
  background: linear-gradient(90deg, rgba(205,127,50,.38), rgba(255,255,255,.9));
}

.rank-badge {
  display: inline-flex;
  min-width: 34px;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 900;
  background: rgba(255,255,255,.7);
}

.rank-gold {
  background: linear-gradient(90deg, rgba(255,200,61,.42), rgba(255,255,255,.9));
}

.rank-silver {
  background: linear-gradient(90deg, rgba(192,192,192,.42), rgba(255,255,255,.9));
}

.rank-bronze {
  background: linear-gradient(90deg, rgba(205,127,50,.38), rgba(255,255,255,.9));
}

.rank-badge {
  display: inline-flex;
  min-width: 34px;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 900;
  background: rgba(255,255,255,.7);
}

.rank-gold {
  background: linear-gradient(90deg, rgba(255,200,61,.45), rgba(255,255,255,.92));
}

.rank-silver {
  background: linear-gradient(90deg, rgba(192,192,192,.45), rgba(255,255,255,.92));
}

.rank-bronze {
  background: linear-gradient(90deg, rgba(205,127,50,.40), rgba(255,255,255,.92));
}

.rank-badge {
  display: inline-flex;
  min-width: 34px;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 900;
  background: rgba(255,255,255,.75);
}

.youtube-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.65);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
  padding: 20px;
}

.youtube-modal.open {
  display: flex;
}

.youtube-box {
  width: min(900px, 100%);
  background: #fff;
  border-radius: 22px;
  padding: 14px;
  box-shadow: 0 20px 80px rgba(0,0,0,.35);
}

.youtube-box iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: 16px;
}

.youtube-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

/* ===== UI polish 2026-07 ===== */

.hero {
  padding: 54px 0 38px;
}

.hero h1 {
  margin-bottom: 10px;
}

.hero p {
  max-width: 760px;
}

.card {
  box-shadow: 0 18px 45px rgba(41, 20, 56, 0.07);
}

.card:hover {
  transform: translateY(-2px);
  transition: 0.18s ease;
}

.notice {
  line-height: 1.65;
}

.container > .grid,
section.grid {
  gap: 24px;
}

.btn {
  min-height: 42px;
}

.btn-primary {
  box-shadow: 0 12px 28px rgba(255, 105, 64, 0.22);
}

table {
  font-size: 15px;
}

th {
  font-size: 14px;
}

td {
  vertical-align: middle;
}

.rank-gold {
  background: linear-gradient(90deg, rgba(255, 214, 92, 0.34), rgba(255,255,255,0.94)) !important;
}

.rank-silver {
  background: linear-gradient(90deg, rgba(210, 215, 224, 0.34), rgba(255,255,255,0.94)) !important;
}

.rank-bronze {
  background: linear-gradient(90deg, rgba(205, 127, 50, 0.22), rgba(255,255,255,0.94)) !important;
}

#currentSeasonHero {
  padding: 22px 24px;
  border-radius: 24px;
  background:
    radial-gradient(circle at 8% 0%, rgba(255, 121, 63, .18), transparent 35%),
    linear-gradient(135deg, rgba(255,255,255,.92), rgba(255,246,231,.92));
  border: 1px solid rgba(255, 168, 64, .35);
}

#currentSeasonHero strong {
  display: inline-block;
  margin-bottom: 6px;
}

@media (max-width: 760px) {
  .hero {
    padding: 34px 0 24px;
  }

  .hero h1 {
    font-size: 48px;
  }

  .card {
    border-radius: 22px;
  }

  .table-wrap {
    overflow-x: auto;
  }

  table {
    min-width: 680px;
  }
}

/* ===== Header cleanup ===== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  min-height: 76px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
}

.main-nav,
.user-nav {
  display: flex;
  align-items: center;
  gap: 16px;
  white-space: nowrap;
}

.main-nav {
  justify-content: flex-start;
}

.user-nav {
  justify-content: flex-end;
}

.main-nav a,
.user-nav a:not(.btn) {
  color: var(--muted);
  font-weight: 800;
  text-decoration: none;
  font-size: 15px;
}

.main-nav a:hover,
.user-nav a:not(.btn):hover {
  color: var(--primary);
}

.brand {
  text-align: center;
  text-decoration: none;
  line-height: 1.05;
}

.brand strong {
  display: block;
  font-size: 28px;
  font-weight: 900;
  background: linear-gradient(90deg, var(--primary), var(--pink), var(--orange));
  -webkit-background-clip: text;
  color: transparent;
}

.brand span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  margin-top: 4px;
}

.season-cta {
  padding-inline: 18px;
}

@media (max-width: 1050px) {
  .header-inner {
    grid-template-columns: 1fr;
    gap: 10px;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .brand {
    order: -1;
  }

  .main-nav,
  .user-nav {
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px 14px;
  }
}

@media (max-width: 650px) {
  .main-nav,
  .user-nav {
    overflow-x: auto;
    justify-content: flex-start;
    flex-wrap: nowrap;
    padding-bottom: 4px;
  }

  .main-nav::-webkit-scrollbar,
  .user-nav::-webkit-scrollbar {
    display: none;
  }

  .brand strong {
    font-size: 24px;
  }
}

.message-ticker {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255,255,255,.78);
  text-decoration: none;
  overflow: hidden;
}

.message-ticker span,
.message-ticker em {
  white-space: nowrap;
  font-style: normal;
  font-weight: 900;
}

.message-ticker strong {
  flex: 1;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 700px) {
  .message-ticker {
    border-radius: 22px;
    align-items: flex-start;
    flex-direction: column;
  }

  .message-ticker strong {
    white-space: normal;
  }
}

.mini-messages {
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: rgba(255,255,255,.78);
}

.mini-messages-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
}

.mini-messages-head a {
  font-weight: 900;
  text-decoration: none;
}

.mini-message-line {
  display: grid;
  grid-template-columns: 190px 1fr 92px;
  gap: 12px;
  align-items: center;
  padding: 7px 0;
  border-top: 1px solid var(--border);
  text-decoration: none;
}

.mini-message-line span,
.mini-message-line small {
  white-space: nowrap;
}

.mini-message-line em {
  font-style: normal;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-message-line small {
  color: var(--muted);
  font-weight: 800;
}

@media (max-width: 700px) {
  .mini-message-line {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .mini-message-line em {
    white-space: normal;
  }
}


.mail-badge {
  display: inline-flex;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: #ff3b30;
  color: white;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 900;
  margin-inline-start: 4px;
}

.mail-badge.hidden {
  display: none;
}

/* ===== Compact listening buttons ===== */

.listen-actions,
.quick-listen-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.listen-btn {
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
  border: 1px solid rgba(123, 47, 247, .18);
  background: rgba(123, 47, 247, .08);
  color: var(--primary);
  box-shadow: none;
}

.listen-btn:hover {
  background: rgba(123, 47, 247, .14);
}

.video-btn {
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
  border: 1px solid rgba(0,0,0,.08);
  background: rgba(255,255,255,.78);
  color: var(--muted);
  box-shadow: none;
}

.video-btn:hover {
  color: var(--primary);
}

/* Force voting grid */
.vote-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 14px !important;
}

.vote-card {
  width: auto !important;
  margin: 0 !important;
}

.vote-card select {
  width: 100%;
  margin-top: 8px;
}

@media (max-width: 700px) {
  .vote-grid {
    grid-template-columns: 1fr !important;
  }
}

/* Force voting grid */
.vote-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 14px !important;
}

.vote-card {
  width: auto !important;
  margin: 0 !important;
}

.vote-card select {
  width: 100%;
  margin-top: 8px;
}

@media (max-width: 700px) {
  .vote-grid {
    grid-template-columns: 1fr !important;
  }
}

#previewPlayerBox {
  position: fixed;
  right: 16px;
  bottom: 16px;
  width: 320px;
  max-width: calc(100vw - 32px);
  background: #111;
  border-radius: 18px;
  box-shadow: 0 20px 50px rgba(0,0,0,.32);
  overflow: hidden;
  z-index: 99999;
  display: none;
}

#previewPlayerBox.open {
  display: block;
}

.preview-player-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  color: white;
  font-weight: 900;
}

.preview-player-head button {
  border: 0;
  border-radius: 999px;
  padding: 6px 12px;
  font-weight: 900;
  cursor: pointer;
}

#previewPlayerFrame {
  width: 100%;
  height: 180px;
  border: 0;
  display: block;
}

@media (max-width: 700px) {
  #previewPlayerBox {
    right: 10px;
    left: 10px;
    bottom: 10px;
    width: auto;
  }

  #previewPlayerFrame {
    height: 160px;
  }
}

#previewPlayerBox {
  position: fixed;
  right: 16px;
  bottom: 16px;
  width: 320px;
  max-width: calc(100vw - 32px);
  background: #111;
  border-radius: 18px;
  box-shadow: 0 20px 50px rgba(0,0,0,.32);
  overflow: hidden;
  z-index: 99999;
  display: none;
}

#previewPlayerBox.open {
  display: block;
}

.preview-player-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  color: white;
  font-weight: 900;
}

.preview-player-head button {
  border: 0;
  border-radius: 999px;
  padding: 6px 12px;
  font-weight: 900;
  cursor: pointer;
}

#previewPlayerFrame {
  width: 100%;
  height: 180px;
  border: 0;
  display: block;
}

@media (max-width: 700px) {
  #previewPlayerBox {
    right: 10px;
    left: 10px;
    bottom: 10px;
    width: auto;
  }

  #previewPlayerFrame {
    height: 160px;
  }
}

#ytPreviewBox {
  position:absolute;
  width:1px;
  height:1px;
  overflow:hidden;
  opacity:0;
}

#ytPreviewBox {
  position:absolute;
  width:1px;
  height:1px;
  overflow:hidden;
  opacity:0;
}

.admin-mini-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.admin-mini-nav a {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.72);
  text-decoration: none;
  font-weight: 900;
  font-size: 14px;
}

.load-more-wrap {
  text-align: center;
  margin-top: 18px;
}
