/* UMNUGOVI CS — tournament theme */

.noise-overlay {
  background-image: url("data:image/svg+xml;utf8,<svg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.5 0'/></filter><rect width='200' height='200' filter='url(%23n)'/></svg>");
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.55rem 1.1rem; font-size: 0.85rem; font-weight: 600;
  border: 1px solid; border-radius: 4px; transition: all .18s ease;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  line-height: 1; letter-spacing: 0.01em;
}
.btn-primary { background:#f97316; color:#0a0a0a; border-color:#f97316; }
.btn-primary:hover { background:#fb923c; box-shadow: 0 0 22px -4px rgba(249,115,22,0.7); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: #e5e5e5; border-color:#3a3a3a; }
.btn-ghost:hover { background: #1c1c1c; border-color: #f97316; color: #fb923c; }
.btn-danger { background: transparent; color: #f87171; border-color: #7f1d1d; }
.btn-danger:hover { background: #7f1d1d; color: #fff; }
.btn-sm { padding: 0.35rem 0.7rem; font-size: 0.75rem; }

/* Nav pills */
.nav-pill {
  display: inline-flex; align-items: center; padding: 0.45rem 0.9rem;
  font-size: 0.82rem; font-weight: 500; color: #d4d4d4;
  border-radius: 4px; transition: all .15s ease;
  text-decoration: none; letter-spacing: 0.01em;
}
.nav-pill:hover { background: #1c1c1c; color: #fb923c; }
.nav-pill.is-active { background: linear-gradient(180deg, rgba(249,115,22,0.15), rgba(249,115,22,0.05)); color: #fb923c; box-shadow: inset 0 -2px 0 #f97316; }
.nav-pill-mobile { width: 100%; padding: 0.75rem 0.9rem; border-bottom: 1px solid rgba(58,58,58,0.4); border-radius: 0; }

/* Card */
.card {
  background: linear-gradient(180deg, rgba(20,20,20,0.95) 0%, rgba(14,14,14,0.95) 100%);
  border: 1px solid #262626;
  border-radius: 6px;
  transition: border-color .2s ease, transform .15s ease;
}
.card:hover { border-color: #3a3a3a; }
.card-hover-brand:hover { border-color: #f97316; box-shadow: 0 4px 28px -8px rgba(249,115,22,0.35); }

/* Inputs */
.input, .textarea {
  background: #0a0a0a; border: 1px solid #262626;
  padding: 0.6rem 0.85rem; font-size: 0.88rem; width: 100%;
  color: #ffffff; transition: border-color .15s ease; border-radius: 4px;
}
.input:focus, .textarea:focus { outline: none; border-color: #f97316; box-shadow: 0 0 0 3px rgba(249,115,22,0.15); }
.input::placeholder { color: #525252; }
select.input option { background: #0a0a0a; color: #ffffff; }
input:-webkit-autofill { -webkit-box-shadow: 0 0 0 30px #0a0a0a inset !important; -webkit-text-fill-color: #fff !important; }

/* Section headers */
.section-eyebrow {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.22em;
  color: #fb923c; font-weight: 600;
}
.section-eyebrow::before { content: ''; width: 24px; height: 1px; background: #f97316; }

/* Headings */
.h-display { font-family: 'Bebas Neue', system-ui; letter-spacing: 0.02em; line-height: 0.95; }

/* Hero */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(ellipse 80% 60% at 30% 40%, rgba(249,115,22,0.15), transparent 70%),
    radial-gradient(ellipse 60% 60% at 80% 70%, rgba(251,191,36,0.08), transparent 70%),
    linear-gradient(180deg, #0a0a0a 0%, #141414 100%);
  border-bottom: 1px solid rgba(58,58,58,0.5);
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(249,115,22,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(249,115,22,0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 30%, transparent 80%);
  pointer-events: none;
}
.hero-stamp {
  position: absolute; right: -40px; top: -40px;
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(180px, 30vw, 360px); line-height: 1;
  color: #f97316; opacity: 0.04; pointer-events: none;
  letter-spacing: -0.05em; user-select: none;
  font-weight: 700;
}

/* Server card */
.server-card {
  position: relative;
  background: linear-gradient(180deg, #141414 0%, #0e0e0e 100%);
  border: 1px solid #262626;
  border-radius: 6px;
  padding: 1.1rem 1.2rem;
  transition: all .2s ease;
  overflow: hidden;
}
.server-card:hover { border-color: #f97316; transform: translateY(-2px); box-shadow: 0 10px 30px -10px rgba(249,115,22,0.35); }
.server-card::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px; background: #f97316; transform: scaleY(0); transform-origin: top; transition: transform .25s ease;
}
.server-card:hover::before { transform: scaleY(1); }

.status-dot { display:inline-block; width:8px; height:8px; border-radius:50%; }
.status-dot.online { background: #22c55e; box-shadow: 0 0 8px #22c55e; }
.status-dot.offline { background: #525252; }
.status-dot.full { background: #f59e0b; box-shadow: 0 0 8px #f59e0b; }

/* Group cards (HLTV-style) */
.group-card {
  background: linear-gradient(180deg, rgba(20,20,20,0.7) 0%, rgba(14,14,14,0.7) 100%);
  border: 1px solid #262626;
  border-radius: 6px;
  overflow: hidden;
}
.group-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.25rem;
  background: #0a0a0a;
  border-bottom: 1px solid #262626;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.bracket-block {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(38,38,38,0.5);
}
.bracket-block:last-child { border-bottom: 0; }
.bracket-block-label {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 0.85rem;
  letter-spacing: 0.18em;
  color: #fb923c;
  margin-bottom: 0.75rem;
}
.round-col { min-width: 200px; }
.round-col-header {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  color: #9ca3af;
  text-align: center;
  padding: 0.4rem 0;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid rgba(38,38,38,0.7);
}

/* Bracket */
.match-card {
  display: flex; flex-direction: column;
  background: #141414; border: 1px solid #262626;
  border-radius: 4px; min-width: 220px; max-width: 240px;
  font-size: 0.78rem; transition: all .15s ease;
  position: relative;
}
.match-card.is-live { border-color: #f97316; box-shadow: 0 0 18px -4px rgba(249,115,22,0.55); }
.match-card.is-done { opacity: 0.85; }
.match-card.is-qualifier { border-left: 3px solid #fbbf24; }
.match-meta {
  display: flex; align-items: center; justify-content: space-between; gap: 0.4rem;
  padding: 0.32rem 0.55rem;
  background: #0a0a0a;
  border-bottom: 1px solid rgba(28,28,28,0.7);
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #6b7280;
}
.match-id { font-family: 'JetBrains Mono', monospace; font-weight: 700; }
.match-status { font-weight: 700; }
.match-status.live { color: #f97316; animation: pulseBrand 1.6s ease-in-out infinite; }
.match-status.done { color: #525252; }
.match-status.pending { color: #9ca3af; }
.qual-badge {
  background: #fbbf24; color: #0a0a0a; padding: 0.05rem 0.32rem;
  border-radius: 2px; font-weight: 800;
  letter-spacing: 0.05em; font-size: 0.58rem;
}
.match-team {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.55rem 0.75rem; gap: 0.5rem;
  border-bottom: 1px solid #1c1c1c;
}
.match-team:last-child { border-bottom: 0; }
.match-team .name { color: #e5e5e5; font-weight: 500; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.match-team .name:hover { color: #fb923c; }
.match-team .score { font-family: 'JetBrains Mono', monospace; font-weight: 700; color: #6b7280; min-width: 18px; text-align: right; }
.match-team.is-winner { background: linear-gradient(90deg, rgba(249,115,22,0.10) 0%, transparent 100%); }
.match-team.is-winner .name { color: #fb923c; font-weight: 600; }
.match-team.is-winner .score { color: #fb923c; }
.match-team.is-loser .name { color: #6b7280; text-decoration: line-through; text-decoration-color: rgba(107,114,128,0.5); }
.match-team.is-tbd .name { color: #525252; font-style: italic; }
.match-team.is-bye .name { color: #404040; font-family: 'JetBrains Mono', monospace; font-size: 0.7rem; letter-spacing: 0.18em; }
.match-team.is-bye .team-logo { color: #404040; background: #1c1c1c; }
.match-team.is-bye .score { color: #2a2a2a; }
.match-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.3rem 0.6rem;
  background: #0a0a0a; border-bottom: 1px solid #1c1c1c;
  font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.12em;
  color: #6b7280; font-weight: 600;
}
.match-header .bo { color: #fb923c; }
.match-header.live { background: #f97316; color: #0a0a0a; }
.match-header.live .bo { color: #0a0a0a; }

/* Badges */
.badge { display:inline-block; padding: 0.18rem 0.45rem; font-size:0.65rem; font-weight:600; letter-spacing:0.08em; text-transform:uppercase; border-radius:3px; border:1px solid; }
.badge-brand { background:rgba(249,115,22,0.12); color:#fb923c; border-color:rgba(249,115,22,0.4); }
.badge-ghost { background:rgba(255,255,255,0.04); color:#9ca3af; border-color:#3a3a3a; }
.badge-live  { background:#f97316; color:#0a0a0a; border-color:#f97316; animation: pulseBrand 1.6s ease-in-out infinite; }
.badge-done  { background:#1c1c1c; color:#6b7280; border-color:#3a3a3a; }

@keyframes pulseBrand {
  0%,100% { box-shadow: 0 0 0 0 rgba(249,115,22,0.6); }
  50%     { box-shadow: 0 0 0 8px rgba(249,115,22,0); }
}

/* Table */
table.data { width:100%; border-collapse: collapse; }
table.data th { background:#1c1c1c; text-align:left; padding:0.7rem 0.9rem; font-size:0.7rem; font-weight:600; text-transform:uppercase; letter-spacing:0.08em; color:#9ca3af; border-bottom:1px solid #262626; }
table.data td { padding:0.7rem 0.9rem; border-bottom:1px solid #1c1c1c; font-size:0.85rem; }
table.data tr:hover td { background:rgba(28,28,28,0.5); }

/* Modal */
.modal-backdrop { position: fixed; inset:0; background: rgba(0,0,0,0.75); backdrop-filter: blur(4px); z-index:60; display:flex; align-items:center; justify-content:center; padding: 1rem; }
.modal-card { background: #141414; border: 1px solid #3a3a3a; border-radius: 6px; max-width: 600px; width:100%; max-height: 88vh; overflow-y: auto; box-shadow: 0 20px 60px -10px rgba(0,0,0,0.8); }

/* Flash messages */
.flash { padding: 0.65rem 1rem; border-radius: 4px; border-left: 3px solid; font-size: 0.85rem; }
.flash-ok { background: rgba(34,197,94,0.08); border-color: #22c55e; color: #86efac; }
.flash-err { background: rgba(239,68,68,0.08); border-color: #ef4444; color: #fca5a5; }

/* Responsive bracket */
.bracket-scroll { overflow-x: auto; overflow-y: hidden; padding-bottom: 1rem; -webkit-overflow-scrolling: touch; }
.bracket-scroll::-webkit-scrollbar { height: 10px; }
.bracket-scroll::-webkit-scrollbar-track { background: #0a0a0a; }
.bracket-scroll::-webkit-scrollbar-thumb { background: #3a3a3a; border-radius: 5px; }
.bracket-scroll::-webkit-scrollbar-thumb:hover { background: #f97316; }

.bracket-grid { display: inline-grid; gap: 12px 56px; align-items: center; }

/* Round labels */
.round-label {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 0.95rem; letter-spacing: 0.18em;
  color: #fb923c; text-align: center; padding: 0.4rem 0;
  border-bottom: 1px solid rgba(249,115,22,0.3);
  margin-bottom: 0.8rem;
}

/* Connecting line for bracket */
.bracket-connector {
  position: absolute; pointer-events: none;
  border: 1px solid #3a3a3a;
}

/* Team logo / avatar fallback */
.team-logo {
  width: 22px; height: 22px; flex-shrink: 0;
  background: #262626; border: 1px solid #3a3a3a;
  border-radius: 3px; display: inline-flex;
  align-items: center; justify-content: center;
  font-family: 'Bebas Neue', sans-serif; font-size: 12px;
  color: #fb923c; letter-spacing: 0;
}

/* Hide scrollbar on certain elements */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { scrollbar-width: none; }
