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

body {
  font-family: 'Inter', sans-serif;
  background-color: #121212;
  color: #fff;
  line-height: 1.5;
}

/* Header */
.header-bg {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  background: #1e1e1e;
  border-bottom: 2px solid #ff4d4d;
  z-index: 100;
  padding-bottom: 20px;
  padding-top: 20px;
}

.nav-center {
  position: fixed;
  margin-top: 5px;
  left: 50%;
  transform: translateX(-50%);
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  width: 400px;
  user-select: none;
  z-index: 101;
}

.main-nav {
  display: flex; gap: 15px; justify-content: center;
  padding: 10px;
}

.nav-container {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  padding-left: 20px;
}

.nav-link {
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 6px;
  transition: background-color 0.3s ease;
}

.nav-link:hover {
  background-color: #ff4d4d;
  color: white;
}

/* Dropdown Styling */
.dropdown {
  position: relative;
}

.dropbtn {
  color: #ffffff;
  padding: 8px 14px;
  border: none;
  border-radius: 6px;
  font-size: 19px; /* Match .nav-links a */
  font-weight: 600; /* Match nav link weight */
  cursor: pointer;
  background-color: transparent;
}

.dropbtn:hover {
  background-color: #ff4d4d;
  color: white;
}

.dropdown-content {
  display: none;
  position: absolute;
  top: 38px;
  left: 0;
  background-color: #333;
  min-width: 180px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0px 4px 12px rgba(0,0,0,0.4);
  z-index: 101;
}

.dropdown-content a {
  padding: 12px 16px;
  display: block;
  color: white;
  text-decoration: none;
}

.dropdown-content a:hover {
  background-color: #444;
}

.dropdown:hover .dropdown-content {
  display: block;
}

.title-container { text-align: center; margin-top: 5px; }
.title-container h1 { font-size: 32px; color: #fff; font-weight: 700; }

/* Main container */
.scroll-container { margin-top: 130px; padding: 20px; }
.moves-container { display: flex; justify-content: center; }

/* Table styling */
table {
  width: 95%;
  max-width: 1100px;
  border-collapse: collapse;
  background: #1e1e1e;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

thead th {
  padding: 12px;
  text-align: left;
  background: #2a2a2a;
  color: #ff4d4d;
  font-size: 16px;
  font-weight: 600;
}

tbody td {
  padding: 10px 12px;
  font-size: 15px;
  color: #ddd;
}

/* Compact columns for rank + move */
.rank-cell, .move-cell, .prev-rank-cell {
  padding: 8px 10px;
  white-space: nowrap;
}

.move-cell {
  font-weight: bold;
  font-size: 15px;
}

/* Row highlighting */
tbody tr.riser { border-left: 5px solid #4CAF50; }
tbody tr.faller { border-left: 5px solid #FF4D4D; }

tbody tr:nth-child(even) { background: #222; }
tbody tr:hover { background: #333; color: #fff; }

/* Badges */
.badge {
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.badge-riser {
  background: #28a745;
  color: white;
}

.badge-faller {
  background: #dc3545;
  color: white;
}

/* Arrows */
.arrow-up {
  color: #28a745;
  font-size: 1.1rem;
  margin-left: 4px;
}

.arrow-down {
  color: #dc3545;
  font-size: 1.1rem;
  margin-left: 4px;
}

/* Footer */
.footer {
  text-align: center;
  padding: 20px;
  font-size: 14px;
  color: #666;
  border-top: 1px solid #2c2c2c;
  margin-top: 60px;
}

/* Mobile */
@media(max-width:768px) {
  table { font-size: 14px; }
  thead th, tbody td { padding: 8px; }
  .rank-cell, .move-cell, .prev-rank-cell { padding: 6px 8px; }
}
