/* ═══════════════════════════════════════════════════════════════════
   TOURNAMENT TAB — EPIC FANTASY RPG OVERHAUL
   ═══════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Cinzel+Decorative:wght@700;900&family=Cinzel:wght@400;600;700;900&family=IM+Fell+English:ital@0;1&family=Marcellus&display=swap');

:root {
  /* Core Palette */
  --t-gold:        #f4c542;
  --t-gold-dim:    #b8922a;
  --t-gold-glow:   rgba(244, 197, 66, 0.35);
  --t-purple:      #c060f0;
  --t-purple-dim:  rgba(192, 96, 240, 0.15);
  --t-purple-glow: rgba(192, 96, 240, 0.4);
  --t-crimson:     #e03a3a;
  --t-green:       #2fcf7a;
  --t-silver:      #c8d4e8;
  --t-blue-ice:    #5bb8f0;

  /* Backgrounds */
  --t-bg-deep:     #05070f;
  --t-bg-panel:    rgba(10, 12, 22, 0.96);
  --t-bg-card:     rgba(18, 22, 38, 0.92);
  --t-bg-row:      rgba(255, 255, 255, 0.03);
  --t-bg-row-hover:rgba(255, 255, 255, 0.07);

  /* Borders */
  --t-border:      rgba(255, 255, 255, 0.07);
  --t-border-gold: rgba(244, 197, 66, 0.3);
  --t-border-purple: rgba(192, 96, 240, 0.25);

  /* Shadows */
  --t-shadow-deep: 0 20px 60px rgba(0, 0, 0, 0.8);
  --t-shadow-gold: 0 0 30px rgba(244, 197, 66, 0.25);
  --t-shadow-purple: 0 0 40px rgba(192, 96, 240, 0.2);
}

/* ── Container ─────────────────────────────────────────────────────── */
#main-content, #tab-tournament {
  min-height: 80dvh;
  padding: 0 8px 24px;
  max-width: 800px;
  margin: 0 auto;
  font-family: 'Cinzel', serif;
  width: 100%;
  box-sizing: border-box;
}
#tab-tournament {
  margin-top: -22px;
}

/* ── Tournament Banner ─────────────────────────────────────────────── */
.t-banner {
  text-align: center;
  margin-bottom: 20px;
}
.t-banner-img {
  display: block;
  width: 486px;
  max-width: 100%;
  height: 333px;
  margin: 0 auto;
  background: url('/images/tournaments/banner.png') center / contain no-repeat;
}
.t-banner-overlay { display: none; }
.t-banner-mode { top: 35px; }
@media (max-width: 600px) {
  .t-banner-mode { top: 25px; }
}
.t-banner-content {
  margin-top: 12px;
}

.t-banner-title {
  font-family: 'Cinzel Decorative', serif;
  font-size: clamp(1.2rem, 4vw, 2rem);
  font-weight: 900;
  color: var(--t-gold);
  text-shadow: 0 0 20px var(--t-gold-glow), 0 2px 4px rgba(0,0,0,0.9);
  letter-spacing: 0.05em;
  line-height: 1.1;
  margin-bottom: 6px;
}

.t-banner-sub {
  font-family: 'IM Fell English', serif;
  font-style: italic;
  font-size: 0.9rem;
  color: rgba(200,210,230,0.7);
  letter-spacing: 0.04em;
}

/* ── No Tournament / Empty State ───────────────────────────────────── */
.no-tournament {
  text-align: center;
  padding: 50px 20px;
  font-family: 'Cinzel', serif;
  color: #8890a0;
  position: relative;
}

.no-tournament::before {
  content: '⚔';
  display: block;
  font-size: 3rem;
  margin-bottom: 12px;
  opacity: 0.3;
  filter: drop-shadow(0 0 12px var(--t-gold));
}

/* ── Status Badges ─────────────────────────────────────────────────── */
.tournament-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 18px;
  border-radius: 30px;
  font-family: 'Cinzel', serif;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  box-shadow: 0 0 15px rgba(0,0,0,0.3);
  vertical-align: middle;
}
.status-pending {
  background: rgba(244, 197, 66, 0.1);
  color: var(--t-gold);
  border: 1px solid var(--t-border-gold);
}
.status-active {
  background: rgba(47, 207, 122, 0.1);
  color: var(--t-green);
  border: 1px solid rgba(47, 207, 122, 0.5);
  animation: pulse-green 2.5s ease-in-out infinite;
}
.status-complete {
  background: var(--t-purple-dim);
  color: var(--t-purple);
  border: 1px solid var(--t-border-purple);
}

@keyframes pulse-green {
  0%, 100% { box-shadow: 0 0 0 0 rgba(47, 207, 122, 0.4); }
  60%       { box-shadow: 0 0 0 8px rgba(47, 207, 122, 0); }
}

/* ── Mode Label ────────────────────────────────────────────────────── */
.mode-label-epic {
  font-family: 'Cinzel', serif;
  font-size: 0.8rem;
  font-weight: 700;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ── Header Row (status + mode + count) ────────────────────────────── */
.t-header-row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 16px 0 12px;
  position: relative;
}

/* Decorative horizontal rule with central diamond */
.t-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 4px 0 16px;
  color: var(--t-gold-dim);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-family: 'Cinzel', serif;
}
.t-divider::before,
.t-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--t-border-gold), transparent);
}

/* ── Join Section ──────────────────────────────────────────────────── */
.join-section {
  position: relative;
  background: var(--t-bg-panel);
  border: 1px solid var(--t-border-gold);
  border-radius: 18px;
  padding: 32px 28px;
  text-align: center;
  margin: 0 0 20px;
  overflow: hidden;
  box-shadow: var(--t-shadow-deep), inset 0 1px 0 rgba(255,255,255,0.05);
}

/* Radial glow behind content */
.join-section::before {
  content: '';
  position: absolute;
  top: -80px; left: 50%;
  transform: translateX(-50%);
  width: 500px; height: 300px;
  background: radial-gradient(ellipse, rgba(192,96,240,0.12) 0%, transparent 70%);
  pointer-events: none;
}

/* Corner rune decals */
.join-section::after {
  content: '⟡';
  position: absolute;
  bottom: 16px; right: 20px;
  font-size: 2.5rem;
  color: var(--t-gold);
  opacity: 0.08;
  pointer-events: none;
  line-height: 1;
}

/* Banner image inside join section */
.join-banner {
  width: 100%;
  height: 90px;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 20px;
  position: relative;
}
.join-banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.5) saturate(1.4);
}
.join-banner-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Cinzel Decorative', serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--t-gold);
  text-shadow: 0 0 16px var(--t-gold-glow);
  letter-spacing: 0.12em;
}

/* Image placeholder fallback (when no real image is available) */
.join-banner-placeholder {
  width: 100%;
  height: 90px;
  border-radius: 12px;
  margin-bottom: 20px;
  background:
    linear-gradient(135deg, rgba(192,96,240,0.12) 0%, rgba(244,197,66,0.08) 100%),
    repeating-linear-gradient(
      45deg,
      transparent,
      transparent 18px,
      rgba(255,255,255,0.015) 18px,
      rgba(255,255,255,0.015) 36px
    );
  border: 1px solid var(--t-border-purple);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Cinzel Decorative', serif;
  font-size: 1.1rem;
  color: var(--t-gold);
  text-shadow: 0 0 12px var(--t-gold-glow);
  letter-spacing: 0.1em;
}

.cost {
  font-family: 'Cinzel', serif;
  font-size: 0.85rem;
  color: var(--t-silver);
  margin-bottom: 18px;
  letter-spacing: 0.04em;
}
.cost strong { color: var(--t-gold); }

.fighters-needed {
  font-family: 'IM Fell English', serif;
  font-style: italic;
  font-size: 0.82rem;
  color: rgba(200,210,230,0.5);
  margin-top: 14px;
}
.fighters-needed.ready { color: var(--t-green); font-style: normal; }

/* ── Join Button ───────────────────────────────────────────────────── */
.btn-join {
  position: relative;
  background: linear-gradient(135deg, #9b30d0 0%, #5a00b8 100%);
  color: #fff;
  border: 1px solid rgba(192,96,240,0.5);
  padding: 15px 52px;
  border-radius: 50px;
  font-family: 'Cinzel', serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275),
              box-shadow 0.25s ease,
              border-color 0.2s ease;
  box-shadow: 0 6px 24px rgba(90, 0, 184, 0.45), inset 0 1px 0 rgba(255,255,255,0.15);
  overflow: hidden;
}
.btn-join::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 60%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.12), transparent);
  transform: skewX(-20deg);
  transition: left 0.5s ease;
}
.btn-join:hover {
  transform: scale(1.04) translateY(-3px);
  box-shadow: 0 12px 36px rgba(90, 0, 184, 0.65), 0 0 0 1px rgba(192,96,240,0.5);
  border-color: var(--t-purple);
}
.btn-join:hover::before { left: 150%; }
.btn-join:disabled {
  background: rgba(255,255,255,0.06);
  color: #4a5060;
  border-color: rgba(255,255,255,0.06);
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

/* Joined checkmark state */
.joined-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  border-radius: 50px;
  font-family: 'Cinzel', serif;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--t-green);
  border: 1px solid rgba(47,207,122,0.35);
  background: rgba(47,207,122,0.08);
  letter-spacing: 0.08em;
}

/* ── Winner / Result Banner ────────────────────────────────────────── */
.t-winner-panel {
  background: linear-gradient(135deg, rgba(192,96,240,0.12) 0%, rgba(244,197,66,0.08) 100%);
  border: 1px solid var(--t-border-purple);
  border-radius: 16px;
  padding: 20px;
  text-align: center;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}
.t-winner-panel::before {
  content: '🏆';
  position: absolute;
  font-size: 5rem;
  right: -10px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.06;
  pointer-events: none;
}
.t-winner-name {
  font-family: 'Cinzel Decorative', serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--t-purple);
  text-shadow: 0 0 16px var(--t-purple-glow);
}
.t-your-rank {
  font-family: 'Cinzel', serif;
  font-size: 0.85rem;
  color: var(--t-silver);
  margin-top: 6px;
  opacity: 0.75;
}
.t-active-notice {
  font-family: 'IM Fell English', serif;
  font-style: italic;
  font-size: 0.82rem;
  color: rgba(200,210,230,0.45);
  text-align: center;
  margin-bottom: 16px;
}

/* ── Countdown ─────────────────────────────────────────────────────── */
#tournament-countdown {
  font-family: 'Cinzel', serif;
  font-variant-numeric: tabular-nums;
  letter-spacing: 4px;
  font-weight: 800;
  color: var(--t-gold);
  text-shadow: 0 0 20px var(--t-gold-glow);
  display: block;
  font-size: 2rem;
  margin: 6px 0 10px;
}

/* ── Tabs ──────────────────────────────────────────────────────────── */
.tabs {
  background: rgba(0,0,0,0.35);
  padding: 5px;
  border-radius: 14px;
  display: flex;
  gap: 4px;
  border: 1px solid var(--t-border);
  margin-bottom: 16px;
}
.tab-btn {
  flex: 1;
  padding: 11px 8px;
  border: none;
  background: transparent;
  color: rgba(200,210,230,0.45);
  font-family: 'Cinzel', serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.22s ease;
}
.tab-btn:hover:not(.active) {
  color: var(--t-silver);
  background: rgba(255,255,255,0.04);
}
.tab-btn.active {
  background: linear-gradient(135deg, rgba(192,96,240,0.3) 0%, rgba(120,40,200,0.4) 100%);
  color: #fff;
  border: 1px solid var(--t-border-purple);
  box-shadow: 0 3px 14px rgba(192, 96, 240, 0.25), inset 0 1px 0 rgba(255,255,255,0.1);
}

/* ── Standings Table ───────────────────────────────────────────────── */
.standings-wrap,
.history-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 14px;
  /* Subtle parchment-style overlay */
  background:
    linear-gradient(rgba(10,12,22,0.85), rgba(10,12,22,0.85)),
    url('/images/rune-bg.png') center / 300px repeat;
  border: 1px solid var(--t-border);
  position: relative;
}

/* Top inner glow stripe */
.standings-wrap::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--t-border-purple), var(--t-border-gold), var(--t-border-purple), transparent);
  border-radius: 14px 14px 0 0;
}

.standings-table {
  width: 100%;
  min-width: 560px;
  border-collapse: separate;
  border-spacing: 0 3px;
  padding: 8px 6px;
}

.standings-table thead tr {
  position: sticky;
  top: 0;
}

.standings-table th {
  background: rgba(0,0,0,0.45);
  padding: 12px 14px;
  font-family: 'Cinzel', serif;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--t-gold-dim);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
  border: none;
}
.standings-table th:first-child { border-radius: 6px 0 0 6px; }
.standings-table th:last-child  { border-radius: 0 6px 6px 0; }

.standings-table td {
  padding: 12px 14px;
  background: var(--t-bg-row);
  border: none;
  font-family: 'Cinzel', serif;
  font-size: 0.82rem;
  color: var(--t-silver);
  transition: background 0.15s;
  white-space: nowrap;
}
.standings-table td:first-child { border-radius: 6px 0 0 6px; padding-left: 16px; }
.standings-table td:last-child  { border-radius: 0 6px 6px 0; padding-right: 16px; }

.standings-table tr:hover td { background: var(--t-bg-row-hover); }

/* Medal rows */
.rank-1 td {
  background: rgba(244, 197, 66, 0.07) !important;
  border-left: 3px solid var(--t-gold) !important;
}
.rank-1 td:first-child::before {
  content: '🥇 ';
  font-size: 0.9rem;
}
.rank-2 td {
  background: rgba(192, 192, 192, 0.06) !important;
  border-left: 3px solid #a8b8c8 !important;
}
.rank-2 td:first-child::before {
  content: '🥈 ';
  font-size: 0.9rem;
}
.rank-3 td {
  background: rgba(205, 127, 50, 0.06) !important;
  border-left: 3px solid #cd7f32 !important;
}
.rank-3 td:first-child::before {
  content: '🥉 ';
  font-size: 0.9rem;
}

/* ── Badges ─────────────────────────────────────────────────────────── */
.npc-badge,
.me-badge {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 4px;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  vertical-align: middle;
  margin-left: 5px;
}
.npc-badge {
  background: rgba(255,255,255,0.08);
  color: #8890a0;
  border: 1px solid rgba(255,255,255,0.1);
}
.me-badge {
  background: linear-gradient(135deg, rgba(91,184,240,0.25), rgba(91,184,240,0.1));
  color: var(--t-blue-ice);
  border: 1px solid rgba(91,184,240,0.35);
}

/* ── Matches Section ───────────────────────────────────────────────── */
.matches-section {
  margin-bottom: 20px;
}

.round-label {
  font-family: 'Cinzel', serif;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--t-gold-dim);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 8px 4px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.round-label::before,
.round-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--t-border-gold));
}
.round-label::after {
  background: linear-gradient(90deg, var(--t-border-gold), transparent);
}

/* ── Match Cards ───────────────────────────────────────────────────── */
.match-card {
  background: var(--t-bg-card);
  border: 1px solid var(--t-border);
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 7px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

/* Sword decal */
.match-card::before {
  content: '⚔';
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2.2rem;
  opacity: 0.04;
  pointer-events: none;
}

.match-card:hover {
  background: rgba(255,255,255,0.06);
  border-color: var(--t-border-purple);
  transform: translateX(4px);
  box-shadow: -3px 0 0 0 var(--t-purple), 0 4px 20px rgba(0,0,0,0.4);
}

.match-participant,
.match-result {
  font-family: 'Cinzel', serif;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--t-silver);
}

.match-winner {
  color: var(--t-gold);
  font-size: 0.78rem;
  font-weight: 700;
  font-family: 'Cinzel', serif;
}
.match-loser  { color: rgba(200,210,230,0.3); font-size: 0.78rem; }
.match-draw   { color: #8890a0; font-size: 0.78rem; }

/* ── Battle Log Button ─────────────────────────────────────────────── */
.btn-view-log {
  background: transparent;
  color: var(--t-purple);
  border: 1px solid var(--t-border-purple);
  padding: 8px 20px;
  border-radius: 8px;
  font-family: 'Cinzel', serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-view-log:hover {
  background: var(--t-purple-dim);
  box-shadow: 0 0 14px var(--t-purple-glow);
}

/* ── Battle Log Modal ──────────────────────────────────────────────── */
.battle-log-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9000;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
  background: rgba(0,0,0,0.85);
}
.battle-log-content {
  background: linear-gradient(145deg, #0a0c1a, #0e1022);
  border: 2px solid var(--t-border-purple);
  border-radius: 18px;
  box-shadow: 0 0 60px rgba(192,96,240,0.2), var(--t-shadow-deep);
  width: 95%;
  max-width: 580px;
  max-height: 80vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* Top chrome on modal */
.battle-log-content::before {
  content: '';
  display: block;
  height: 3px;
  background: linear-gradient(90deg, var(--t-purple), var(--t-gold), var(--t-purple));
}

.battle-log-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--t-border);
}
.battle-log-title {
  font-family: 'Cinzel', serif;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--t-gold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.btn-close-log {
  background: transparent;
  border: none;
  color: rgba(200,210,230,0.4);
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
  transition: color 0.2s;
}
.btn-close-log:hover { color: #fff; }

#log-lines {
  overflow-y: auto;
  padding: 14px 20px;
  flex: 1;
}
.log-line {
  font-family: 'IM Fell English', serif;
  font-size: 0.88rem;
  color: rgba(200,210,230,0.75);
  padding: 5px 0;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  line-height: 1.55;
}
.log-line:last-child { border-bottom: none; }

/* ── History Section ───────────────────────────────────────────────── */
.history-section {
  padding: 4px 0;
}

.history-item {
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  align-items: center;
  gap: 12px;
  background: var(--t-bg-card);
  border: 1px solid var(--t-border);
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 7px;
  cursor: pointer;
  font-family: 'Cinzel', serif;
  font-size: 0.8rem;
  transition: all 0.2s;
  color: var(--t-silver);
}
.history-item:hover {
  border-color: var(--t-border-purple);
  background: rgba(192,96,240,0.05);
  transform: translateX(3px);
}
.h-date {
  color: rgba(200,210,230,0.45);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
}
.h-winner {
  color: var(--t-purple);
  font-weight: 700;
}
.h-npc {
  color: #8890a0;
  font-style: italic;
}

/* ── Back Button ───────────────────────────────────────────────────── */
.btn-back {
  background: transparent;
  border: 1px solid var(--t-border);
  color: rgba(200,210,230,0.5);
  padding: 8px 18px;
  border-radius: 8px;
  font-family: 'Cinzel', serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 14px;
  display: inline-block;
}
.btn-back:hover {
  color: var(--t-silver);
  border-color: rgba(200,210,230,0.25);
}

/* ── Section headings inside tab content ───────────────────────────── */
#tab-matches h3,
#tab-history h3,
.history-section h3 {
  font-family: 'Cinzel', serif;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--t-gold-dim);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin: 20px 0 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}
#tab-matches h3::after,
#tab-history h3::after,
.history-section h3::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--t-border-gold), transparent);
}

/* ── Scroll polish ─────────────────────────────────────────────────── */
#log-lines::-webkit-scrollbar,
.standings-wrap::-webkit-scrollbar,
.history-wrap::-webkit-scrollbar { width: 5px; height: 5px; }
#log-lines::-webkit-scrollbar-track,
.standings-wrap::-webkit-scrollbar-track,
.history-wrap::-webkit-scrollbar-track { background: transparent; }
#log-lines::-webkit-scrollbar-thumb,
.standings-wrap::-webkit-scrollbar-thumb,
.history-wrap::-webkit-scrollbar-thumb {
  background: rgba(192,96,240,0.3);
  border-radius: 3px;
}

/* ── Tournament Rain: animated vertical lines ── */
#tournament-rain {
  position: absolute;
  top: var(--topbar-h);
  left: 0;
  right: 0;
  height: 350px;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.rain-drop {
  position: absolute;
  top: 0;
  border-radius: 1px;
  will-change: transform;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

/* ═══════════════════════════════════════════════════════════════════
   MOBILE  ≤ 600px
   ═══════════════════════════════════════════════════════════════════ */
@media (max-width: 600px) {
  .t-banner         { min-height: 130px; }
  .t-banner-title   { font-size: 1.1rem; }
  .join-section     { padding: 20px 16px; }
  .btn-join         { width: 100%; padding: 14px 20px; font-size: 0.9rem; }
  .match-card       { flex-direction: column; align-items: flex-start; gap: 8px; }
  .match-card::before { display: none; }
  .tabs             { flex-wrap: wrap; }
  .tab-btn          { padding: 9px 5px; font-size: 0.68rem; }
  .history-item     { grid-template-columns: auto 1fr auto; }
  .history-item > span:nth-child(2) { display: none; }
  #tournament-countdown { font-size: 1.5rem; }
}
