/* =========================
   GLOBAL NOOMIPLAYER LIST
   ========================= */

:root {
  --bg: #101827;
  --panel: #192336;
  --panel2: #202b3d;
  --border: #303c50;
  --text: #f3f4f6;
  --muted: #9ca3af;
  --blue: #3b82f6;
  --blue-light: #60a5fa;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  min-height: 100vh;
}

button, input, select {
  font: inherit;
}

button {
  cursor: pointer;
  transition: 0.2s;
}

button:hover {
  filter: brightness(1.12);
}

.hidden {
  display: none !important;
}

/* =========================
   TOPBAR
   ========================= */

.topbar {
  height: 88px;
  padding: 0 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: #111827;
  border-bottom: 1px solid #293244;
  position: sticky;
  top: 0;
  z-index: 50;
}

.logo {
  display: flex;
  align-items: center;
  gap: 15px;
  font-weight: 900;
  letter-spacing: 1px;
  font-size: 20px;
}

.logo-icon {
  width: 54px;
  height: 54px;
  background: var(--blue);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 900;
  color: white;
}

.menu-btn {
  width: 48px;
  height: 48px;
  background: transparent;
  border: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
}

.menu-btn span {
  width: 27px;
  height: 3px;
  border-radius: 5px;
  background: #cbd5e1;
}

.account-btn {
  background: var(--panel2);
  border: 1px solid var(--border);
  color: white;
  padding: 12px 20px;
  border-radius: 12px;
}

/* =========================
   HOME
   ========================= */

.home-page {
  max-width: 1200px;
  margin: auto;
  padding: 80px 30px 60px;
}

.home-hero {
  text-align: center;
  padding: 60px 20px 50px;
  border-radius: 30px;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 80% 10%, rgba(59,130,246,.15), transparent 40%),
    radial-gradient(circle at 10% 90%, rgba(96,165,250,.10), transparent 40%),
    linear-gradient(145deg, #182338, #101827);
  border: 1px solid var(--border);
}

.hero-label {
  color: var(--blue-light);
  letter-spacing: 5px;
  font-size: 14px;
  font-weight: bold;
  margin-bottom: 24px;
}

.home-hero h1 {
  font-size: clamp(34px, 6vw, 65px);
  font-weight: 900;
  letter-spacing: 2px;
  line-height: 1.2;
}

.home-hero h1 span {
  color: var(--blue-light);
}

.home-hero > p {
  max-width: 760px;
  margin: 25px auto;
  color: #cbd5e1;
  font-size: 20px;
  line-height: 1.7;
}

.home-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
  margin-top: 35px;
}

.primary-btn,
.secondary-btn {
  min-height: 65px;
  padding: 18px 30px;
  border-radius: 16px;
  font-size: 18px;
  font-weight: bold;
}

.primary-btn {
  background: var(--blue);
  border: 1px solid var(--blue);
  color: white;
}

.secondary-btn {
  background: var(--panel2);
  border: 1px solid var(--border);
  color: white;
}

.home-info {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 25px;
}

.info-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px;
}

.info-label {
  color: var(--blue-light);
  letter-spacing: 3px;
  font-size: 12px;
  font-weight: bold;
}

.info-card h2 {
  font-size: 23px;
  margin-top: 12px;
}

.info-card p {
  color: var(--muted);
  margin-top: 12px;
  line-height: 1.6;
}

/* =========================
   SIDE MENU
   ========================= */

.menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.65);
  z-index: 998;
  backdrop-filter: blur(3px);
}

.side-menu {
  position: fixed;
  top: 0;
  right: 0;
  height: 100dvh;
  width: min(100%, 440px);
  background: #111827;
  color: var(--text);
  z-index: 999;
  transform: translateX(100%);
  transition: transform .3s ease;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.side-menu.open {
  transform: translateX(0);
}

.menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px;
  min-height: 110px;
  border-bottom: 1px solid #293244;
  gap: 12px;
}

.menu-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 17px;
  font-weight: 800;
}

.menu-logo .logo-icon {
  width: 50px;
  height: 50px;
  flex-shrink: 0;
}

.close-menu {
  border: none;
  background: #202b3d;
  color: white;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  font-size: 36px;
}

.menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 30px 26px;
  font-size: 27px;
  border-bottom: 1px solid #293244;
  cursor: pointer;
}

.menu-item:hover {
  background: #192338;
}

.arrow {
  font-size: 30px;
}

.submenu {
  background: #0d1422;
  display: flex;
  flex-direction: column;
}

.submenu button {
  border: none;
  background: transparent;
  color: #d1d5db;
  text-align: left;
  font-size: 20px;
  padding: 22px 35px;
}

.submenu button:hover {
  background: #1c293c;
  color: var(--blue-light);
}

.menu-account {
  display: flex;
  gap: 14px;
  padding: 25px;
  margin-top: auto;
}

.menu-account button {
  flex: 1;
  min-height: 75px;
  border-radius: 20px;
  font-size: 18px;
  font-weight: 600;
}

.sign-in-btn {
  background: #2864ed;
  border: none;
  color: white;
}

.sign-up-btn {
  background: #202b3d;
  border: none;
  color: white;
}

/* =========================
   LIST PAGE
   ========================= */

.list-page {
  max-width: 1200px;
  margin: auto;
  padding: 40px 25px 70px;
}

.list-page-header {
  margin-bottom: 30px;
}

.back-btn {
  background: var(--panel2);
  color: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 18px;
  margin-bottom: 25px;
}

.eyebrow {
  color: var(--blue-light);
  font-size: 12px;
  font-weight: bold;
  letter-spacing: 3px;
  margin-bottom: 10px;
}

.list-page-header h1 {
  font-size: 40px;
}

.list-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 30px;
  border-bottom: 1px solid var(--border);
}

.list-tab {
  background: transparent;
  border: none;
  color: var(--muted);
  padding: 18px 22px;
  font-weight: bold;
  border-bottom: 3px solid transparent;
}

.list-tab.active {
  color: white;
  border-bottom-color: var(--blue);
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 22px;
}

.section-heading h2 {
  font-size: 28px;
}

#playerTotal {
  color: var(--muted);
}

/* =========================
   SEARCH & SORT
   ========================= */

.toolbar {
  display: flex;
  gap: 12px;
  margin-bottom: 25px;
}

.toolbar input,
.toolbar select {
  background: var(--panel);
  border: 1px solid var(--border);
  color: white;
  padding: 16px;
  border-radius: 12px;
  outline: none;
}

.toolbar input {
  flex: 1;
  min-width: 0;
}

.toolbar input:focus,
.toolbar select:focus {
  border-color: var(--blue);
}

.toolbar select {
  cursor: pointer;
}

/* =========================
   PODIUM
   ========================= */

#podium {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  margin-bottom: 30px;
}

.podium-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 25px 18px;
  text-align: center;
  cursor: pointer;
}

.podium-card.first {
  border-color: #eab308;
  background: linear-gradient(145deg, #283248, #192336);
}

.podium-rank {
  color: var(--blue-light);
  font-size: 22px;
  font-weight: bold;
}

.podium-card.first .podium-rank {
  color: #facc15;
}

.podium-name {
  font-size: 23px;
  font-weight: bold;
  margin: 12px 0;
  overflow-wrap: anywhere;
}

.podium-points {
  font-size: 19px;
  color: var(--blue-light);
  font-weight: bold;
}

.podium-hardest {
  color: var(--muted);
  margin-top: 10px;
}

/* =========================
   TABLES
   ========================= */

.table-wrap {
  width: 100%;
  overflow-x: auto;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 18px;
}

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

thead {
  background: #202b3d;
}

th {
  text-align: left;
  padding: 18px 16px;
  font-size: 12px;
  letter-spacing: 1px;
  color: #aebbd0;
}

td {
  padding: 18px 16px;
  border-top: 1px solid #293244;
}

tbody tr {
  cursor: pointer;
  transition: background .2s;
}

tbody tr:hover {
  background: #243148;
}

.rank {
  color: var(--blue-light);
  font-weight: bold;
}

.player-cell {
  font-weight: bold;
}

.points {
  color: var(--blue-light);
  font-weight: bold;
}

.hardest {
  color: #cbd5e1;
}

/* =========================
   RECENT RECORDS
   ========================= */

.records-section {
  margin-top: 50px;
}

.records-section h2 {
  font-size: 28px;
  margin-bottom: 20px;
}

#recordsList {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.record {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}

.record-level {
  font-weight: bold;
  font-size: 18px;
}

.record-player {
  color: var(--muted);
  margin-top: 8px;
}

.record-percent {
  color: #4ade80;
  font-weight: bold;
  font-size: 20px;
}

/* =========================
   MODALS
   ========================= */

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.75);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(4px);
}

.modal-content {
  position: relative;
  background: #182338;
  border: 1px solid var(--border);
  border-radius: 22px;
  width: min(100%, 500px);
  max-height: 90dvh;
  overflow-y: auto;
  padding: 35px;
}

.close-btn {
  position: absolute;
  top: 15px;
  right: 18px;
  border: none;
  background: transparent;
  color: white;
  font-size: 32px;
}

.profile-name {
  font-size: 36px;
  font-weight: bold;
  margin: 20px 0;
  overflow-wrap: anywhere;
}

.profile-rank {
  color: var(--blue-light);
  font-weight: bold;
}

.profile-stat {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}

.profile-stat span {
  color: var(--muted);
}

.profile-stat strong {
  text-align: right;
}

/* AUTH FORMS */

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 25px;
}

.auth-form h2 {
  font-size: 28px;
  margin-bottom: 10px;
}

.auth-form input {
  width: 100%;
  background: #101827;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  color: white;
  outline: none;
}

.auth-form input:focus {
  border-color: var(--blue);
}

.auth-form button {
  background: var(--blue);
  color: white;
  border: none;
  border-radius: 12px;
  padding: 16px;
  font-weight: bold;
}

.auth-form p {
  color: var(--muted);
  font-size: 14px;
}

/* =========================
   FOOTER
   ========================= */

footer {
  border-top: 1px solid var(--border);
  padding: 30px 25px;
  display: flex;
  justify-content: space-between;
  gap: 15px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 1px;
}

/* =========================
   MOBILE
   ========================= */

@media (max-width: 700px) {

  .topbar {
    height: 75px;
    padding: 0 15px;
    gap: 10px;
  }

  .logo {
    font-size: 13px;
    gap: 9px;
    letter-spacing: 0;
  }

  .logo-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    font-size: 22px;
  }

  .account-btn {
    padding: 10px 12px;
    font-size: 13px;
  }

  .home-page {
    padding: 35px 15px;
  }

  .home-hero {
    padding: 45px 18px;
    border-radius: 22px;
  }

  .hero-label {
    letter-spacing: 3px;
  }

  .home-hero h1 {
    font-size: 36px;
  }

  .home-hero > p {
    font-size: 17px;
  }

  .home-buttons {
    flex-direction: column;
  }

  .home-buttons button {
    width: 100%;
  }

  .home-info {
    grid-template-columns: 1fr;
  }

  .list-page {
    padding: 25px 15px 50px;
  }

  .list-page-header h1 {
    font-size: 32px;
  }

  .list-tabs {
    gap: 0;
  }

  .list-tab {
    flex: 1;
    padding: 15px 8px;
    font-size: 13px;
  }

  .section-heading h2 {
    font-size: 23px;
  }

  .toolbar {
    flex-direction: column;
  }

  .toolbar input,
  .toolbar select {
    width: 100%;
  }

  #podium {
    grid-template-columns: 1fr;
  }

  .podium-card {
    padding: 22px;
  }

  .record {
    padding: 16px;
  }

  .record-level {
    font-size: 16px;
  }

  .record-percent {
    font-size: 17px;
  }

  .side-menu {
    width: 100%;
  }

  .menu-item {
    padding: 25px 22px;
    font-size: 24px;
  }

  .menu-header {
    padding: 20px;
  }

  .menu-logo {
    font-size: 14px;
  }

  .menu-account {
    padding: 20px;
  }

  .menu-account button {
    min-height: 65px;
    font-size: 16px;
  }

  .modal-content {
    padding: 30px 22px;
  }

  footer {
    flex-direction: column;
    text-align: center;
  }
}
