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

body {
    font-family: Arial, sans-serif;
    background: black;
    color: white;
    overflow-x: hidden;

    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(0,0,0,0.95);

    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 20px 25px;
    z-index: 1000;

    border-bottom: 2px solid gold;

    flex-wrap: wrap;
}

nav h1 {
    color: gold;
    font-size: 23px;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 20px;

    flex-wrap: wrap;
}

nav ul li {
    cursor: pointer;
    transition: 0.3s;
    font-size: 18px;
}

nav ul li:hover {
    color: gold;
}

.page {
    flex: 1;
    width: 100%;
    min-height: 100vh;

    padding: 100px 20px 60px;

    display: none;
    animation: fade 0.3s ease;
}

.active {
    display: block;
}

.fighter-row {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    border-bottom: 1px solid #222;
    transition: 0.2s;
}

.fighter-row:hover {
    background: rgba(255, 215, 0, 0.1);
}

.rank {
    color: gold;
    font-weight: bold;
    width: 50px;
}

.name {
    flex: 1;
}

.elo {
    font-weight: bold;
}

/* STATS GRID */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
}

/* FIGHT ROW */
.fight-row {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr 1fr 1fr;
    padding: 10px;
    border-bottom: 1px solid #222;
    font-size: 14px;
}

.fight-row:hover {
    background: rgba(255, 215, 0, 0.1);
}

.win {
    color: #4caf50;
    font-weight: bold;
}

.loss {
    color: #ff4d4d;
    font-weight: bold;
}

@keyframes fade {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.container {
    max-width: 1100px;
    margin: auto;
}

h2 {
    color: gold;
    margin-bottom: 20px;
}

h3 {
    color: white;
    margin-bottom: 10px;
}

.card {
    background: #111;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    border: 1px solid gold;

    box-shadow: 0 5px 25px rgba(0,0,0,0.5);
}

footer {
    background: black;
    border-top: 1px solid gold;
    text-align: center;
    padding: 15px;
    font-size: 14px;
}

button {
    background: linear-gradient(135deg, gold, #d4af37);
    color: black;
    border: none;
    padding: 12px 18px;
    cursor: pointer;
    border-radius: 6px;
    font-weight: bold;
    font-size: 14px;

    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;

    box-shadow: 0 0 10px rgba(255, 215, 0, 0.2);
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(255, 215, 0, 0.4);
}

button:active {
    transform: scale(0.96);
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
}

.clickable {
  cursor: pointer;
  color: gold;
}
.clickable:hover {
  text-decoration: underline;
}

button::after {
    content: "";
    position: absolute;
    top: 0;
    left: -75%;
    width: 50%;
    height: 100%;
    background: rgba(255,255,255,0.2);
    transform: skewX(-20deg);
    transition: 0.5s;
}

button:hover::after {
    left: 125%;
}

@media(max-width: 600px) {
    nav {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    nav ul {
        width: 100%;
        justify-content: space-between;
    }
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.fight-row {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr 1fr 1fr;
    padding: 10px;
    border-bottom: 1px solid #222;
    font-size: 14px;
}

@media(max-width: 768px) {
  .fight-row {
    grid-template-columns: 1fr 1fr;
    font-size: 12px;
    gap: 5px;
  }

  .fight-row span:nth-child(3),
  .fight-row span:nth-child(4),
  .fight-row span:nth-child(5) {
    display: none;
  }

  .fight-row .opponent.win::before {
    content: "W ";
    color: #4caf50;
    font-weight: bold;
  }

  .fight-row .opponent.loss::before {
    content: "L ";
    color: #ff4d4d;
    font-weight: bold;
  }
}

.chart-container {
    position: relative;
    width: 100%;
    height: 350px;
}

@media(max-width: 768px) {
    .chart-container {
        height: 250px;
    }
}

.fight-row {
    display: grid;
    grid-template-columns: 90px 1fr 80px 80px 70px;
    padding: 10px;
    border-bottom: 1px solid #222;
    font-size: 14px;
    align-items: center;
}

@media (max-width: 768px) {
    h2{
        margin-top: 20px;
    }
}

@media(max-width: 768px) {
    .fight-row {
        grid-template-columns: 1fr 1fr;
        font-size: 12px;
    }

    .fight-row span:nth-child(3),
    .fight-row span:nth-child(4),
    .fight-row span:nth-child(5) {
        display: none;
    }
}

.fighter-row:hover {
    background: rgba(255, 215, 0, 0.1);
}

input, select {
    background: #0d0d0d;
    color: white;
    border: 1px solid #333;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 10px;
    width: 100%;
    font-size: 14px;
    transition: 0.2s;
}

input:focus, select:focus {
    border-color: gold;
    box-shadow: 0 0 8px rgba(255,215,0,0.3);
}

@media(max-width: 600px) {
    nav ul {
        gap: 10px;
        font-size: 14px;
    }

    nav h1 {
        font-size: 18px;
    }
}

html {
    scroll-behavior: smooth;
}

#fileName {
    display: block;
    margin-top: 10px;
    font-size: 14px;
    color: #aaa;
}

.search-results {
    max-height: 150px;
    overflow-y: auto;
    border: 1px solid #444;
    margin-bottom: 10px;
}

.search-results .fighter-row {
    cursor: pointer;
    padding: 5px 10px;
    transition: 0.2s;
}
.search-results .fighter-row:hover {
    background: rgba(255,215,0,0.1);
}

.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
    margin: 5px 0;
}
.switch input { display: none; }
.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 24px;
}
.slider:before {
    position: absolute;
    content: "";
    height: 18px; width: 18px;
    left: 3px; bottom: 3px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}
input:checked + .slider {
    background-color: gold;
}
input:checked + .slider:before {
    transform: translateX(26px);
}

.form-group {
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-group label {
    font-size: 14px;
    color: gold;
}

.fighter-img {
    width: 100%;
    max-width: 250px;
    border-radius: 10px;
    margin-bottom: 15px;
    border: 2px solid gold;
    display: block;
}

#fighterStats {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#fighterStats .stats-grid {
    width: 100%;
}

@media (max-width: 768px) {
    .fighter-img {
        max-width: 180px;
    }
}

@media (max-width: 768px) {
  #weightClassList .remove-btn {
    width: 2.5em;
    height: 2.5em;
    padding: 0;
    font-size: 1.2em;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #e74c3c;
    color: rgb(0, 0, 0);
    border: none;
    border-radius: 0.3em;
    cursor: pointer;
  }
}

.leaderboard-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 15px;
}

#weightFilter {
  width: 220px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #1a1a1a;
  color: #fff;
  border: 1px solid #333;
  font-size: 16px;
  cursor: pointer;
}

.toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  cursor: pointer;
}

.toggle input {
  display: none;
}

.toggle-slider {
  width: 44px;
  height: 24px;
  background: #444;
  border-radius: 20px;
  position: relative;
  transition: 0.3s;
}

.toggle-slider::before {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  background: white;
  border-radius: 50%;
  top: 3px;
  left: 3px;
  transition: 0.3s;
}

.toggle input:checked + .toggle-slider {
  background: gold;
}

.toggle input:checked + .toggle-slider::before {
  transform: translateX(20px);
}

.retired-badge {
  margin-left: 8px;
  padding: 2px 6px;
  font-size: 11px;
  border-radius: 6px;
  background: #555;
  color: #ccc;
}

.fighter-row.retired {
  opacity: 0.6;
}

.fight-row .draw {
    color: #aaa;
    font-weight: bold;
}
.gender-badge {
    margin-left: 6px;
    font-weight: bold;
    font-size: 14px;
}

.gender-badge.male {
    color: #4da3ff;
}

.gender-badge.female {
    color: #ff4db8;
}

.filter-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: #111;
  border: 1px solid #333;
  border-radius: 12px;
}

.filter-icon {
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
}
@media (max-width: 600px) {

  .leaderboard-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-pill {
    width: 80%;
    justify-content: space-between;
  }

  #weightFilter,
#genderFilter {
  width: 220px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #1a1a1a;
  color: #fff;
  border: 1px solid #333;
  font-size: 16px;
  cursor: pointer;
}
}