/* Global styles for dark mode */
body {
  margin: 0;
  padding: 0;
  font-family: system-ui, sans-serif;
  background-color: #1e1e1e;
  color: #e0e0e0;
}

/* Navbar styles */
.navbar {
  background-color: #2a2a2a;
  padding: 1rem 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.nav-container {
  max-width: 1000px;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

/*.logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: #ffffff;
}
*/

.nav-links {
    display: flex;
    gap: 1rem;
}

.nav-button {
    background-color: #333;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    text-decoration: none;
    transition: background-color 0.3s ease, transform 0.2s ease;
    font-weight: 500;
}

.nav-button:hover {
    background-color: #555;
}

/* Search form */
.search-form {
  flex: 1;
  display: flex;
  max-width: 400px;
}

.search-form input[type="text"] {
  flex: 1;
  padding: 0.5rem;
  border: none;
  border-radius: 4px 0 0 4px;
  background-color: #3a3a3a;
  color: #e0e0e0;
}

.search-form button {
  padding: 0.5rem 1rem;
  border: none;
  background-color: #4a90e2;
  color: white;
  border-radius: 0 4px 4px 0;
  cursor: pointer;
  transition: background-color 0.2s;
}

.search-form button:hover {
  background-color: #357ab8;
}

/* Auth buttons */
.auth-buttons {
  display: flex;
  gap: 1rem;
}

.btn {
  text-decoration: none;
  color: #e0e0e0;
  padding: 0.5rem 1rem;
  background-color: #3a3a3a;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.btn:hover {
  background-color: #555;
}

/* Main content */
.container {
  max-width: 800px;
  margin: 2rem auto;
  padding: 2rem;
}

h1 {
  color: #ffffff;
}

p {
  color: #cccccc;
}

/* beatmap info section */
.beatmap-container {
  background-color: #2a2a2a;
  margin-bottom: 1.5rem;
  border-radius: 20px;
  padding: 1rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.beatmaps {
  width: 100%;
}

.squares {
  display: grid;
  grid-template-columns: repeat(100, 1fr);
  gap: 4px;
  padding: 1rem;
}

.square {
  aspect-ratio: 1 / 1;
  width: 100%;
  border-radius: 4px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}

.square:hover {
  transform: scale(1.1);
}


/* Profile Section */
.profile-section {
  background-color: #2a2a2a;
  padding: 2rem 0;
  border-radius: 20px 20px 20px 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.profile-container {
  max-width: 1000px;
  /*margin: 0 auto;*/
  padding: 0 2rem;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.profile-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #4a90e2;
}

.profile-info h2 {
  margin: 0;
  color: #ffffff;
}

.profile-info p {
  margin: 0.2rem 0;
  color: #cccccc;
}


/* popup */
.modal {
  position: fixed;
  top: 35px;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.modal.hidden {
  display: none;
}

.modal-content {
  position: relative; /* Add this line */
  background-color: #1e1e1e;
  padding: 2rem;
  border-radius: 12px;
  max-height: 80%;
  overflow-y: auto;
  width: 1300px;
  color: #fff;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.8);
}

.close-btn {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 1.5rem;
  cursor: pointer;
  color: white;
}

/* progress bar */
.progress-section {
}

.progress-overview {
  color: #fff;
  text-align: center;
  font-size: 1.2rem;
  font-weight: bold;
}

.dev-section{
  background-color: #2a2a2a;
  padding: 2rem 0;
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
  border-radius: 20px 20px 20px 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;
}

#import-button {
  padding: 0.5rem 1rem;
  margin-right: 1.5rem;
  font-weight: bold;
  border: none;
  border-radius: 6px;
  background-color: #2196F3;
  color: white;
  cursor: pointer;
}

#import-button:hover {
  background-color: #1976D2;
}

#export-button {
  padding: 0.5rem 1rem;
  margin-left: 1.5rem;
  font-weight: bold;
  border: none;
  border-radius: 6px;
  background-color: #2196F3;
  color: white;
  cursor: pointer;
}

#export-button:hover {
  background-color: #1976D2;
}

/* Search Suggestions */

.search-form {
  display: flex;
  align-items: stretch;
  gap: 0;
  max-width: 400px;
}

.input-wrapper {
  position: relative;
  width: 100%;
}

.input-wrapper input {
  width: 100%;
  padding: 0.5rem;
  border: none;
  border-radius: 4px 0 0 4px;
  background-color: #3a3a3a;
  color: #e0e0e0;
  box-sizing: border-box;
}

.search-form button {
  padding: 0.5rem 1rem;
  border: none;
  background-color: #4a90e2;
  color: white;
  border-radius: 0 4px 4px 0;
  cursor: pointer;
}

.suggestions-list {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%; /* MATCHES input width ONLY */
  background: #2a2a2a;
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 250px;
  overflow-y: auto;
  border-radius: 0 0 6px 6px;
  z-index: 1000;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.suggestions-list li {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  gap: 10px;
  cursor: pointer;
  color: white;
  font-size: 0.95rem;
}

.suggestions-list li:hover {
  background-color: #3a3a3a;
}

.suggestions-list img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.beatmap-tile {
  position: relative;
  height: 60px;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 10px;
  background-color: #111;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.beatmap-overlay {
  background: rgba(0, 0, 0, 0.6);
  padding: 0 12px;
  height: 100%;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
}

.beatmap-tile-checkbox {
  transform: scale(1.2);
  margin: 0;
}

.beatmap-label {
  font-weight: bold;
  font-size: 14px;
  color: white;
  user-select: none;
}

/* tooltip */

.custom-tooltip {
  position: absolute;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 13px;
  pointer-events: none;
  white-space: pre-line;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  transition: opacity 0.1s ease;
}

.custom-tooltip.hidden {
  display: none;
}

/* footer */

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  font-family: 'Inter', 'Nunito', sans-serif;
}

.page-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.site-footer {
  background-color: #2a2a2a;
  text-align: left;
  padding: 0px 10px 0px 10px;
  font-size: 0.9rem;
  border-top: 1px solid #444;
  border-radius: 10px 10px 10px 10px;
}

.site-footer .footer-note {
  color: #ccc;
  margin: 10px 0;
}

.site-footer .footer-note a {
  color: #03A9F4;
  text-decoration: none;
  transition: text-decoration 0.2s ease;
}

.site-footer .footer-note a:hover {
  text-decoration: underline;
}

.rank-counts img {
  height: 20px;
  vertical-align: middle;
  margin-right: 4px;
}
.rank-counts {
  padding-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  font-size: 0.95rem;
}

/* Leaderboards Style */

.leaderboard-table {
    width: 90%;
    margin: 2rem auto;
    border-collapse: collapse;
    background-color: #1e1e1e;
    color: white;
    border-radius: 8px;
    overflow: hidden;
    font-family: 'Inter', sans-serif;
}

.leaderboard-table th, .leaderboard-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid #333;
}

.leaderboard-table th {
    background-color: #2c2c2c;
    font-weight: 600;
}

.leaderboard-table tr:hover {
    background-color: #333;
}

.leaderboard-table td:first-child {
    font-weight: bold;
}

.leaderboard-gold {
  background-color:rgb(214, 203, 138); /* Gold */
  color: #000;
  font-weight: bold;
}

.leaderboard-silver {
  background-color:rgb(105, 103, 103); /* Silver */
  color: #000;
  font-weight: bold;
}

.leaderboard-bronze {
  background-color:rgb(194, 157, 120); /* Bronze */
  color: #000;
  font-weight: bold;
}

.pagination-controls button {
  padding: 0.5rem 1.2rem;
  margin: 0 0.5rem;
  font-weight: bold;
  font-size: 1rem;
  border: none;
  border-radius: 6px;
  background-color: #1e1e1e;
  color: white;
  cursor: pointer;
  transition: background-color 0.2s;
  min-width: 100px;
}

.pagination-controls button:hover {
  background-color:rgb(53, 52, 52);
}

.pagination-controls button:disabled {
  cursor: not-allowed;
}

/*module card play button*/

.preview-toggle {
  font-size: 18px;
  cursor: pointer;
  margin-right: 8px;
  user-select: none;
  color: #ccc;
  transition: color 0.2s ease;
}

.preview-toggle:hover {
  color: #fff;
}

.beatmap-label span {
  font-weight: normal;
  opacity: 0.9;
}




