@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500&family=Rajdhani:wght@500;600;700&display=swap");

:root {
  --primary: #ff4136;
  --bg: #0a0a0f;
  --surface: #13131a;
  --surface2: #1a1a24;
  --border: #1e1e2e;
  --text: #e8e8f0;
  --muted: #6b6b80;
  --accent: #00d4ff;
  --success: #00ff88;
  --warning: #ffaa00;
  --danger: #ff5c73;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  --container: 1200px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 360px;
  background: var(--bg);
  color: var(--text);
  font-family: "DM Sans", sans-serif;
  line-height: 1.5;
  overflow-x: hidden;
}

body.nav-open {
  overflow: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
  transition: 0.2s ease;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

main {
  padding-top: 60px;
}

.page-shell {
  width: min(100% - 2rem, var(--container));
  margin: 0 auto;
}

.section {
  padding: 4rem 0;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.section-title,
h1,
h2,
h3,
h4,
.heading {
  margin: 0;
  font-family: "Rajdhani", sans-serif;
  line-height: 1;
}

.section-title {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  letter-spacing: 0.08em;
}

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

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: 0.2s ease;
}

.card:hover {
  border-color: var(--primary);
}

.btn,
button,
.button-link {
  min-height: 44px;
  padding: 0.85rem 1.25rem;
  border-radius: 4px;
  border: 1px solid transparent;
  font-family: "Rajdhani", sans-serif;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: 0.2s ease;
}

.btn-primary,
button.btn-primary,
.button-link.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover,
button.btn-primary:hover,
.button-link.btn-primary:hover {
  filter: brightness(1.1);
}

.btn-secondary,
button.btn-secondary,
.button-link.btn-secondary {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}

.btn-secondary:hover,
button.btn-secondary:hover,
.button-link.btn-secondary:hover {
  border-color: var(--text);
}

.btn-accent {
  background: transparent;
  color: var(--accent);
  border-color: rgba(0, 212, 255, 0.4);
}

.btn-success {
  background: transparent;
  color: var(--success);
  border-color: rgba(0, 255, 136, 0.35);
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  color: var(--text);
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 4px;
  transition: 0.2s ease;
}

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

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
}

label {
  display: block;
  margin-bottom: 0.45rem;
  color: var(--text);
  font-size: 0.95rem;
}

.field {
  display: grid;
  gap: 0.5rem;
}

.field-error {
  min-height: 18px;
  color: var(--danger);
  font-size: 0.85rem;
}

.grid {
  display: grid;
  gap: 1.5rem;
}

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

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

.grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.pill,
.status-badge,
.game-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.game-badge {
  background: var(--surface2);
  color: var(--accent);
}

.status-upcoming {
  color: var(--warning);
  background: rgba(255, 170, 0, 0.12);
}

.status-ongoing {
  color: var(--success);
  background: rgba(0, 255, 136, 0.12);
}

.status-past,
.status-rejected {
  color: var(--muted);
  background: rgba(107, 107, 128, 0.14);
}

.status-approved,
.status-verified {
  color: var(--success);
  background: rgba(0, 255, 136, 0.12);
}

.status-pending {
  color: var(--warning);
  background: rgba(255, 170, 0, 0.12);
}

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

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 680px;
  background: var(--surface);
}

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

th {
  font-family: "Rajdhani", sans-serif;
  letter-spacing: 0.08em;
  font-size: 0.95rem;
  color: var(--text);
}

tbody tr {
  transition: 0.2s ease;
}

tbody tr:hover {
  background: var(--surface2);
}

.table-clickable tbody tr {
  cursor: pointer;
}

.navbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0 1rem;
  background: rgba(10, 10, 15, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.nav-logo {
  margin-right: auto;
  color: #fff;
  font-family: "Rajdhani", sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.nav-logo span {
  color: var(--primary);
}

.nav-links,
.nav-auth {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-links a,
.nav-auth a,
.nav-auth button,
.nav-user {
  color: var(--muted);
  font-size: 0.95rem;
}

.nav-links a:hover,
.nav-auth a:hover,
.nav-auth button:hover {
  color: var(--text);
}

.nav-links a.active {
  color: var(--primary);
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  color: #fff;
  border-color: var(--border);
}

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

.footer {
  background: var(--surface);
  padding: 3rem 0;
  border-top: 1px solid var(--border);
}

.footer-grid {
  display: grid;
  gap: 2rem;
}

.footer-title {
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.footer-links {
  display: grid;
  gap: 0.8rem;
}

.footer-copy {
  color: var(--muted);
}

.surface-card {
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: 0.2s ease;
}

.surface-card:hover {
  border-color: var(--primary);
}

.empty-state,
.error-card,
.loading-card {
  padding: 1.5rem;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.error-card {
  border-color: rgba(255, 65, 54, 0.3);
}

.error-text {
  color: #ff8c87;
}

.notice-card {
  padding: 1rem 1.25rem;
  background: rgba(0, 212, 255, 0.08);
  border: 1px solid rgba(0, 212, 255, 0.18);
  border-radius: 8px;
  color: var(--text);
}

.stack {
  display: grid;
  gap: 1rem;
}

.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.stats-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stat-card h3 {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.stat-card strong {
  font-family: "Rajdhani", sans-serif;
  font-size: clamp(1.7rem, 4vw, 2.5rem);
}

.tabs,
.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tab-btn,
.filter-btn {
  background: transparent;
  color: var(--muted);
  border: none;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  padding: 0.9rem 1rem;
}

.tab-btn.active,
.filter-btn.active {
  color: var(--text);
  border-bottom-color: var(--primary);
}

.panel {
  display: none;
}

.panel.active {
  display: block;
}

.form-card {
  width: min(100% - 2rem, 480px);
  margin: 0 auto;
  padding: 2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 5rem 0 3rem;
}

.auth-logo {
  font-size: 1.8rem;
  margin-bottom: 0.75rem;
  text-align: center;
}

.auth-logo span {
  color: var(--primary);
}

.auth-subtext {
  text-align: center;
  margin-bottom: 1.5rem;
}

.form-actions {
  display: grid;
  gap: 0.9rem;
}

.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.72);
  z-index: 120;
}

.modal.active {
  display: flex;
}

.modal-card {
  width: min(100%, 640px);
  max-height: 90vh;
  overflow: auto;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.modal-close {
  margin-left: auto;
  display: inline-flex;
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.banner-fallback {
  background:
    linear-gradient(135deg, rgba(255, 65, 54, 0.85), rgba(0, 212, 255, 0.25)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent);
}

.skeleton {
  background: linear-gradient(90deg, var(--surface) 25%, var(--surface2) 50%, var(--surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }

  100% {
    background-position: 200% 0;
  }
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 999px;
}

.hidden {
  display: none !important;
}

@media (max-width: 767px) {
  .navbar {
    padding: 0 1rem;
    gap: 0.75rem;
  }

  .nav-links,
  .nav-auth {
    position: absolute;
    left: 1rem;
    right: 1rem;
    top: 68px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 1rem;
    background: rgba(19, 19, 26, 0.98);
    border: 1px solid var(--border);
    border-radius: 10px;
  }

  .nav-links.open,
  .nav-auth.open {
    display: flex;
  }

  .grid-2,
  .grid-3,
  .grid-4,
  .stats-grid {
    grid-template-columns: 1fr;
  }

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

  .section {
    padding: 3rem 0;
  }
}

@media (min-width: 768px) {
  .nav-toggle {
    display: none;
  }

  .footer-grid {
    grid-template-columns: 1.5fr 1fr 1fr;
  }
}

@media (min-width: 1200px) {
  .navbar {
    padding: 0 2rem;
    gap: 2rem;
  }
}
.hero-home {
  position: relative;
  display: grid;
  place-items: center;
  text-align: center;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(255, 65, 54, 0.15) 0%, transparent 60%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 40%),
    var(--bg);
  overflow: hidden;
}

.hero-home::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.03) 0,
    rgba(255, 255, 255, 0.03) 1px,
    transparent 1px,
    transparent 4px
  );
  opacity: 0.25;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(100% - 2rem, 900px);
}

.hero-content h1 {
  font-size: clamp(2.5rem, 6vw, 5rem);
  color: #fff;
}

.hero-content p {
  margin-top: 1rem;
  font-size: 1.1rem;
}

.horizontal-scroll {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

.tournament-strip-card,
.showcase-card {
  min-width: 280px;
  overflow: hidden;
}

.tournament-banner,
.card-banner {
  height: 160px;
  background-position: center;
  background-size: cover;
}

.tournament-card-body,
.card-body {
  padding: 1rem;
  display: grid;
  gap: 0.85rem;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem;
  border-top: 1px solid var(--border);
}

.community-card {
  text-align: center;
  padding: 2rem;
}

.tab-shell {
  display: grid;
  gap: 1.5rem;
}

.tournament-grid,
.team-grid,
.media-grid {
  display: grid;
  gap: 1.5rem;
}

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

.tournament-card {
  overflow: hidden;
  display: grid;
}

.tournament-card .card-banner {
  height: 160px;
}

.clickable-card {
  cursor: pointer;
}

.info-strip {
  display: grid;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

.info-strip-item {
  padding-right: 1rem;
}

.detail-layout {
  display: grid;
  gap: 2rem;
}

.tournament-hero {
  position: relative;
  height: 250px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.tournament-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 30%, rgba(0, 0, 0, 0.75));
}

.tournament-hero-title {
  position: absolute;
  left: 1.5rem;
  bottom: 1.5rem;
  z-index: 1;
  font-size: clamp(2rem, 5vw, 3rem);
}

.sticky-card {
  position: sticky;
  top: 90px;
}

.room-box {
  padding: 1rem;
  border-radius: 8px;
  background: var(--surface2);
  border: 1px solid rgba(0, 212, 255, 0.4);
}

.room-box code {
  display: block;
  margin-top: 0.5rem;
  font-size: 1.2rem;
  color: var(--accent);
}

.podium {
  display: grid;
  gap: 1rem;
  align-items: end;
}

.podium-card {
  padding: 1.25rem;
  text-align: center;
}

.podium-first {
  min-height: 260px;
  border-color: rgba(255, 215, 0, 0.45);
}

.podium-second {
  min-height: 220px;
  border-color: rgba(192, 192, 192, 0.35);
}

.podium-third {
  min-height: 190px;
  border-color: rgba(205, 127, 50, 0.35);
}

.search-row,
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1rem;
}

.dashboard-layout,
.admin-layout {
  display: grid;
  gap: 1.5rem;
  align-items: start;
}

.dashboard-sidebar,
.admin-sidebar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem;
}

.dashboard-nav,
.admin-nav {
  display: grid;
  gap: 0.35rem;
}

.dashboard-tab,
.admin-tab {
  justify-content: flex-start;
  background: transparent;
  color: var(--muted);
}

.dashboard-tab.active,
.admin-tab.active {
  background: var(--surface2);
  color: var(--text);
  border-color: var(--primary);
}

.dashboard-content,
.admin-content {
  min-width: 0;
}

.profile-hero {
  display: grid;
  gap: 1rem;
  padding: 1.5rem;
}

.label-grid {
  display: grid;
  gap: 1rem;
}

.label-row {
  padding: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.label-row strong {
  display: block;
  margin-top: 0.35rem;
  color: var(--text);
}

.admin-shell {
  min-height: 100vh;
  padding: 2rem 0;
}

.admin-mobile-toggle {
  display: inline-flex;
}

.channel-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.channel-pill {
  padding: 0.6rem 0.85rem;
  border-radius: 999px;
  background: var(--surface2);
  border: 1px solid var(--border);
}

.accordion-item {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.accordion-trigger {
  width: 100%;
  text-align: left;
  background: var(--surface);
  color: var(--text);
  border: none;
  padding: 1rem 1.25rem;
}

.accordion-content {
  display: none;
  padding: 0 1.25rem 1.25rem;
  background: var(--surface);
}

.accordion-item.active .accordion-content {
  display: block;
}

.team-meta {
  display: grid;
  gap: 0.65rem;
  margin-top: 1rem;
}

.media-card img,
.screenshot-grid img {
  width: 100%;
  border-radius: 8px;
}

.screenshot-grid {
  columns: 1;
  column-gap: 1rem;
}

.screenshot-grid button {
  width: 100%;
  margin-bottom: 1rem;
  padding: 0;
  border: none;
  background: transparent;
}

.lightbox {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: rgba(0, 0, 0, 0.84);
  z-index: 150;
}

.lightbox.active {
  display: flex;
}

.lightbox img {
  max-height: 90vh;
  max-width: min(100%, 1100px);
  border-radius: 10px;
}

.not-found {
  min-height: 100vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 2rem;
}

.glitch {
  position: relative;
  font-size: 8rem;
  color: var(--primary);
  animation: glitch 1.8s infinite;
}

@keyframes glitch {
  0%,
  100% {
    text-shadow: 2px 0 var(--accent), -2px 0 var(--primary);
    transform: translate(0);
  }

  20% {
    text-shadow: -2px 0 var(--accent), 2px 0 #ff4f81;
    transform: translate(-1px, 1px);
  }

  40% {
    text-shadow: 2px -1px var(--accent), -2px 1px #ff4f81;
    transform: translate(1px, -1px);
  }

  60% {
    text-shadow: -2px 1px var(--accent), 2px -1px #ff4f81;
    transform: translate(1px, 1px);
  }

  80% {
    text-shadow: 2px 0 var(--accent), -2px 0 #ff4f81;
    transform: translate(-1px, 0);
  }
}

.rank-gold {
  border-left: 3px solid #ffd700;
  background: rgba(255, 215, 0, 0.06);
}

.rank-silver {
  border-left: 3px solid #c0c0c0;
  background: rgba(192, 192, 192, 0.06);
}

.rank-bronze {
  border-left: 3px solid #cd7f32;
  background: rgba(205, 127, 50, 0.06);
}

@media (min-width: 768px) {
  .tournament-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .detail-layout {
    grid-template-columns: minmax(0, 2fr) minmax(300px, 0.9fr);
  }

  .dashboard-layout {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .admin-layout {
    grid-template-columns: 240px minmax(0, 1fr);
  }

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

  .info-strip {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .team-grid,
  .media-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .screenshot-grid {
    columns: 2;
  }
}

@media (min-width: 1200px) {
  .tournament-grid,
  .team-grid,
  .media-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .screenshot-grid {
    columns: 3;
  }
}

@media (max-width: 767px) {
  .dashboard-sidebar,
  .admin-sidebar {
    overflow-x: auto;
  }

  .dashboard-nav,
  .admin-nav {
    display: flex;
    flex-wrap: nowrap;
  }

  .dashboard-tab,
  .admin-tab {
    white-space: nowrap;
  }

  .sticky-card {
    position: static;
  }
}
