@font-face {
  font-family: "Bebas Neue";
  src: url("./assets/fonts/BebasNeue-Regular.ttf") format("truetype");
}

@font-face {
  font-family: "Montserrat";
  src: url("./assets/fonts/Montserrat-Regular.ttf") format("truetype");
}

@font-face {
  font-family: "Montserrat";
  src: url("./assets/fonts/Montserrat-Bold.ttf") format("truetype");
  font-weight: 800;
}

:root {
  --bg: #05090c;
  --sidebar: #020a0e;
  --panel: rgba(10, 13, 18, 0.9);
  --panel-soft: rgba(24, 28, 34, 0.92);
  --row: #25282d;
  --line: #353b47;
  --text: #ffffff;
  --muted: #a7adba;
  --red: #ff1232;
  --red-dark: #c81024;
  --green: #2fd95f;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Montserrat", Arial, sans-serif;
  background: url("./assets/background-app.png?v=8") center / cover no-repeat;
  background-attachment: fixed;
}

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

button,
input,
select {
  font: inherit;
}

h1,
h2,
h3,
.welcome,
.panel-kicker {
  font-family: "Bebas Neue", Impact, sans-serif;
  letter-spacing: 0.02em;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 208px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 34px 8px 8px;
  background: linear-gradient(180deg, rgba(3, 11, 15, 0.99), rgba(3, 9, 13, 0.99));
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-logo {
  display: grid;
  place-items: center;
  height: 70px;
  margin-bottom: 20px;
  overflow: hidden;
}

.sidebar-logo img {
  width: 152px;
  max-width: 100%;
  max-height: 70px;
  object-fit: contain;
}

.sidebar-nav {
  display: grid;
  gap: 8px;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 43px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: rgba(8, 16, 21, 0.82);
  color: #ffffff;
  font-size: 15px;
  font-weight: 900;
}

.nav-icon {
  width: 19px;
  height: 19px;
  display: inline-grid;
  place-items: center;
  color: #ffffff;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
  background: rgba(31, 36, 41, 0.94);
  border-color: rgba(255, 255, 255, 0.15);
  color: var(--red);
}

.sidebar-nav a.active {
  box-shadow: inset 3px 0 0 var(--red);
}

.app-main {
  min-width: 0;
  min-height: 100vh;
}

.home-main {
  position: relative;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto auto;
  min-height: 100vh;
  padding: 0 clamp(28px, 4vw, 70px) 28px;
}

.start-hero {
  display: grid;
  place-items: center;
  align-content: center;
  min-height: calc(100vh - 140px);
  padding-top: 24px;
  text-align: center;
}

.nexus-logo {
  width: min(560px, 46vw);
  height: auto;
  margin-bottom: 30px;
  filter: drop-shadow(0 22px 54px rgba(0, 0, 0, 0.45));
}

.welcome {
  margin: 0 0 0;
  color: var(--red);
  font-size: clamp(34px, 4vw, 60px);
  line-height: 1;
}

.start-hero h1 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(70px, 6vw, 96px);
  line-height: 0.92;
  text-transform: uppercase;
}

.hero-line {
  width: 52px;
  height: 3px;
  margin: 28px 0 17px;
  background: var(--red);
}

.hero-copy,
.muted {
  margin: 0;
  color: #f2f5fb;
  font-size: 18px;
  font-weight: 900;
}

.sponsor-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 34px;
  min-height: 96px;
  margin-bottom: 2px;
}

.sponsor-footer span {
  width: 1px;
  height: 58px;
  background: rgba(255, 255, 255, 0.34);
}

.reeh-logo {
  width: 190px;
  max-height: 78px;
  object-fit: contain;
  filter: drop-shadow(0 10px 16px rgba(0, 0, 0, 0.45));
}

.bulls-logo {
  width: 118px;
  max-height: 86px;
  object-fit: contain;
}

.portal-panel {
  width: min(1120px, 100%);
  justify-self: center;
  margin: 34px auto 20px;
  padding: 22px;
  border: 1px solid rgba(255, 18, 50, 0.8);
  border-radius: 9px;
  background: rgba(9, 12, 16, 0.82);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
}

.panel-head,
.live-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.panel-kicker {
  margin: 0 0 4px;
  color: var(--red);
  font-size: 20px;
}

.panel-head h2,
.live-toolbar h1 {
  margin: 0;
  font-size: clamp(32px, 4vw, 52px);
  line-height: 1;
}

.button,
.select {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(15, 17, 20, 0.94);
  color: var(--text);
  font-weight: 900;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  cursor: pointer;
}

.button:hover {
  border-color: var(--red);
}

.select {
  min-width: min(360px, 44vw);
  padding: 0 14px;
}

.select-label {
  color: #cfd7f2;
  font-size: 13px;
  font-weight: 900;
}

.top-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.status-box,
.last-events {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(12, 15, 18, 0.9);
  color: var(--muted);
  padding: 16px 18px;
}

.tournament-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 16px;
}

.tournament-card {
  min-height: 160px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(20, 23, 28, 0.96), rgba(8, 10, 13, 0.96));
  transition: border-color 160ms ease, transform 160ms ease;
}

.tournament-card:hover {
  border-color: var(--red);
  transform: translateY(-2px);
}

.tournament-card h3 {
  margin: 14px 0 8px;
  font-size: 32px;
}

.tournament-card p {
  margin: 0;
  color: var(--muted);
}

.badge {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  color: #d7dce5;
  font-size: 13px;
  font-weight: 900;
}

.live-badge {
  background: rgba(37, 200, 92, 0.18);
  border: 1px solid rgba(37, 200, 92, 0.42);
  color: #ffffff;
}

.live-badge::before {
  content: "";
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 999px;
  background: #2ee66b;
  box-shadow: 0 0 10px rgba(46, 230, 107, 0.75);
}

.card-foot {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  color: var(--muted);
  font-weight: 900;
}

.card-foot strong {
  color: var(--red);
}

.live-main {
  min-height: 100vh;
  padding: 30px 38px;
}

.live-toolbar {
  margin-bottom: 20px;
  padding: 22px;
  border: 1px solid rgba(255, 18, 50, 0.75);
  border-radius: 10px;
  background: rgba(9, 12, 16, 0.82);
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  color: var(--muted);
  font-weight: 900;
}

.live-pill span {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #69717d;
}

.live-pill.ok span {
  background: var(--green);
  box-shadow: 0 0 18px rgba(47, 217, 95, 0.75);
}

.live-pill.refreshed span {
  animation: liveBlink 900ms ease-in-out;
}

.live-pill.error span {
  background: var(--red);
}

@keyframes liveBlink {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }

  45% {
    opacity: 0.35;
    transform: scale(1.45);
  }
}

.beamer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 430px);
  gap: clamp(18px, 2.2vw, 34px);
  align-items: start;
  padding: 22px;
  border: 1px solid rgba(255, 18, 50, 0.75);
  border-radius: 10px;
  background: rgba(9, 12, 16, 0.76);
}

.status-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}

.status-item {
  min-width: 118px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.status-item strong {
  display: block;
  font-size: 24px;
  line-height: 1;
}

.status-item span {
  color: #cbd7f4;
  font-size: 13px;
}

.boards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(18px, 2.2vw, 30px);
}

.board-card,
.standings {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(20, 23, 28, 0.96), rgba(10, 12, 15, 0.96));
}

.board-head {
  padding: 14px 16px 8px;
  background: #191b1f;
}

.board-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.board-head h2 {
  margin: 0;
  font-size: 24px;
}

.board-head p {
  margin: 2px 0 0;
  font-size: 13px;
  font-weight: 900;
}

.timer {
  min-width: 42px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--red);
  color: white;
  font-size: 13px;
  font-weight: 900;
  text-align: center;
}

.red-line {
  height: 3px;
  margin-top: 8px;
  background: var(--red);
}

.board-players {
  min-height: 138px;
  background: rgba(255, 255, 255, 0.02);
}

.player-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 70px;
  min-height: 42px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  background: var(--row);
}

.player-row.free,
.player-row.eliminated {
  background: #171a1e;
  color: #aeb5c0;
}

.player-name,
.score {
  min-width: 0;
  display: flex;
  align-items: center;
  padding: 0 16px;
  font-size: 14px;
  font-weight: 900;
}

.player-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.score {
  justify-content: center;
  border-left: 1px solid rgba(255, 255, 255, 0.13);
}

.score.highlight {
  background: var(--red-dark);
  color: white;
}

.standings {
  padding: 18px;
  max-height: calc(100vh - 220px);
}

.standings h2 {
  margin: 0 0 12px;
  font-size: 32px;
}

.search {
  width: 100%;
  height: 42px;
  margin-bottom: 14px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #101113;
  color: var(--text);
}

.standings-list {
  display: grid;
  gap: 8px;
  max-height: calc(100vh - 340px);
  overflow: auto;
  padding-right: 4px;
}

.standing-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 58px;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 12px;
  border-radius: 7px;
  background: #23262b;
  font-size: 15px;
  font-weight: 900;
}

.standing-row.eliminated {
  background: #c81024;
}

.rank {
  color: #b7c8ef;
  font-size: 12px;
}

.name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.standing-score {
  text-align: right;
}

.last-events {
  margin-top: 24px;
  color: white;
  font-weight: 900;
}

@media (min-width: 1780px) {
  .boards-grid {
    grid-template-columns: repeat(4, minmax(250px, 1fr));
  }
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    min-height: 0;
    flex-direction: row;
    align-items: center;
    gap: 16px;
    overflow-x: auto;
    padding: 12px 16px;
  }

  .sidebar-logo {
    flex: 0 0 auto;
    width: 126px;
    height: 54px;
    margin: 0;
  }

  .sidebar-logo img {
    width: 124px;
  }

  .sidebar-nav {
    display: flex;
    min-width: max-content;
  }

  .home-main {
    padding: 0 18px 24px;
  }

  .start-hero {
    min-height: calc(100vh - 210px);
  }

  .nexus-logo {
    width: min(520px, 72vw);
  }

  .beamer {
    grid-template-columns: 1fr;
  }

  .standings,
  .standings-list {
    max-height: none;
  }
}

@media (max-width: 760px) {
  body {
    background: url("./assets/background-app.png?v=8") center / cover no-repeat;
    background-attachment: scroll;
  }

  .sidebar {
    display: block;
    padding: 12px;
  }

  .sidebar-logo {
    justify-content: start;
    margin-bottom: 10px;
  }

  .sidebar-logo img {
    width: 104px;
  }

  .sidebar-nav {
    display: grid;
    grid-template-columns: 1fr;
    min-width: 0;
  }

  .sidebar-nav a {
    min-height: 38px;
    padding: 0 11px;
    font-size: 13px;
  }

  .home-main {
    padding: 0 12px 18px;
  }

  .start-hero {
    min-height: 520px;
  }

  .nexus-logo {
    width: min(360px, 90vw);
    margin-bottom: 18px;
  }

  .welcome {
    margin-bottom: 18px;
    font-size: 28px;
  }

  .start-hero h1 {
    font-size: clamp(52px, 17vw, 76px);
  }

  .hero-copy {
    font-size: 15px;
  }

  .sponsor-footer {
    gap: 20px;
    min-height: 86px;
  }

  .reeh-logo {
    width: min(170px, 40vw);
  }

  .bulls-logo {
    width: min(92px, 24vw);
  }

  .panel-head,
  .live-toolbar,
  .top-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .select,
  .button,
  .search {
    width: 100%;
    min-width: 0;
  }

  .boards-grid,
  .tournament-grid {
    grid-template-columns: 1fr;
  }

  .portal-panel,
  .beamer,
  .live-toolbar {
    padding: 16px;
    border-radius: 8px;
  }

  .standing-row {
    grid-template-columns: 30px minmax(0, 1fr) auto;
    font-size: 14px;
  }

  .player-name,
  .score {
    font-size: 13px;
  }

  .live-main {
    padding: 16px 12px;
  }
}

@media (max-width: 460px) {
  .sponsor-footer {
    flex-direction: column;
    gap: 12px;
  }

  .sponsor-footer span {
    width: 80px;
    height: 1px;
  }
}
