
:root {
  --content-width: 700px;
}

/* Fix the nav just below the header */
.main-nav {
  position: fixed;
  top: 100px; /* same as header height */
  width: 100%;
  z-index: 999;
  background-color: #4b0082;
  padding: 10px 0px;
}

/* Nav menu styling */
.main-nav ul {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  display: flex;
  /*justify-content: center;  🔥 This centers the items */
  gap: 20px;
  justify-content: flex-start;
}


.main-nav a {
  color: white;
  text-decoration: none;
  font-weight: bold;
}

.main-nav a:hover {
  text-decoration: underline;
}

/* Push content down so it’s not hidden under fixed header + nav */
main {
  padding-top: 160px; /* 100px for header + 60px for nav/padding */
}

.page-container {
  max-width: var(--content-width); /* or 800px depending on how wide you want */
  margin: 0 auto;    /* centers it */
  padding: 0 20px;   /* some breathing room on small screens */
}

/* Same container class as your main content (for alignment) */
.nav-wrapper {
  max-width: var(--content-width); /* or whatever your content width is */
  margin: 0 auto;
  /*display: flex;
  justify-content: center;
  justify-content: flex-start;*/
}

/* Hide toggle on desktop, show on mobile */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 28px;
  color: white;
  cursor: pointer;
  margin-left: 10px;
}

.nav-links {
  display: flex; /* for desktop */
  gap: 20px;
  justify-content: flex-start;
  list-style: none;
  padding: 0;
  margin: 0;
}


/* Mobile styles */
@media (max-width: 768px) {
  .menu-toggle {
    display: block;
    font-size: 28px;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
  }

  .nav-links {
    display: none !important;
    position: absolute;
    top: 60px; /* below header/logo */
    left: 0;
    width: 100%;
    background-color: #4b0082;
    flex-direction: column;
    align-items: center;
    padding: 15px 0;
    gap: 10px;
    z-index: 1000;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  }

  .nav-links.show {
    display: flex !important;
  }

  .nav-links li {
    width: 100%;
    text-align: center;
  }

  .nav-links a {
    display: block;
    width: 100%;
    padding: 10px 0;
    font-size: 16px;
  }

}



.avatar-form.disabled {
  opacity: 0.5;
}

.avatar-form.disabled .avatar-button {
  pointer-events: none;
}

.avatar-form.disabled:hover {
  cursor: not-allowed;
}

.avatar-nav {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 20px 0;
}

.avatar-nav-form {
  display: inline;
}

.avatar-nav-form .avatar-nav-button {
  padding: 4px 10px;
  font-size: 13px;
  background-color: #f0f0f0;
  border: 1px solid #bbb;
  border-radius: 6px;
  text-decoration: none;
  color: #333;
  transition: background-color 0.2s ease;
}

.avatar-nav-form .avatar-nav-button:hover {
  background-color: #e0e0e0;
}


/* Make the header fixed at the top */
.banner-header {
  background-color: #4b0082;;
  height: 100px;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
}

.banner-inner {
  max-width: var(--content-width);
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center; /* ✅ Center inside 800px container */
}


/* 👇 Still center the text inside .banner-inner if needed */
.banner-text {
  font-size: 2.2rem;
  font-weight: bold;
  color: white;
  font-family: 'Arial', sans-serif;
}

.banner-link {
  text-decoration: none;
  color: inherit;
  display: inline-block;
}

.banner-cat {
  width: 48px;
  height: auto;
  margin: 0 10px;
}

.left-cat {
  margin-right: auto;
}

.right-cat {
  margin-left: auto;
}




body {
  font-family: Arial, sans-serif;
  
    /*background-image: url('../images/background.png');  adjust the path 
    background-size: cover;        /* Makes it cover the entire screen 
    background-position: center;   /* Centers the image 
    background-repeat: no-repeat;  /* Prevents it from repeating 
    background-attachment: fixed;  /* Keeps it fixed while scrolling 
    margin: 0;*/
  
  
}

form {
  margin-bottom: 20px;
}

ul.song-list {
  list-style: none;
  padding: 0;
  max-width: var(--content-width);
}

ul.song-list li {
  padding: 10px;
  border: 1px solid #ddd;
  margin-bottom: 6px;
  background-color: #f9f9f9;
  border-radius: 4px;
}

.placement {
  color: #555;
  font-size: 0.9em;
  margin-left: 8px;
}

.year-selector-form {
  margin-bottom: 20px;
  color: white;
}

.ranking-card {
  background: white;
  border-radius: 10px;
  padding: 20px; /* regular padding */
  max-width: var(--content-width);
  margin: 40px auto 2em; /* Add bottom margin */
  box-shadow: 0 0 15px rgba(0,0,0,0.1);
  position: relative;
}


.tab-header-row,
.tab-header-row-50 {
  position: absolute;
  left: 20px;
  right: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.tab-header-row { top: -45px; }
.tab-header-row-50 { top: -33px; }


.tab-buttons {
  display: flex;
  gap: 10px;
}

.tab-button {
  padding: 8px 14px;
  border: none;
  background: white;
  font-weight: bold;
  border-radius: 5px 5px 0 0;
  cursor: pointer;
  box-shadow: 0 -2px 5px rgba(0,0,0,0.05);
  border: 1px solid #ccc;
}

.tab-button.active {
  background: #fff;
  border-bottom: 1px solid white;
}

.tab-button:hover {
  background-color: #e0e0e0;
}



.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.year-selector-form .arrow-button {
  background-color: #e5007d;
  color: #fff;
  font-weight: bold;
  font-size: 1.2rem;
  border: none;
  border-radius: 6px;
  padding: 6px 12px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}


.year-selector-form .arrow-button:hover {
  background-color: #c4006d;
}

.year-selector-form input[type="number"] {
  font-size: 14px;
  height: 24px;
  padding: 4px;
  margin: 0 4px;
}



.song-list li {
  display: flex;
  align-items: center;
  gap: 15px;
}

.song-cover {
  width: 50px;
  height: 50px;
  flex-shrink: 0;
  border-radius: 4px;
  object-fit: cover;
}

.song-info {
  flex-grow: 1;
}

.song-actions {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

.spotifyLink i,
.previewControl i {
  color: #1DB954;
  cursor: pointer;
}

.song-cover {
  width: 50px;
  height: 50px;
  flex-shrink: 0;
  object-fit: cover;
  border-radius: 4px;
}


.song-actions a, .song-actions button {
  background: none;
  border: none;
  cursor: pointer;
}

.song-actions i {
  font-size: 1.2em;
}

.song-list li.inactive {
  opacity: 0.5;
}

.song-list li.inactive img {
  display: none;
}


select#year {
  padding: 6px 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  background-color: #fff;
  font-size: 1em;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}

select#year:focus {
  border-color: #007bff;
  box-shadow: 0 0 4px rgba(0, 123, 255, 0.5);
  outline: none;
}

/* Image popup (lightbox effect) */
.image-popup img {
  cursor: pointer;
  transition: 0.3s;
}



.action-bar {
  display: flex;
  gap: 10px;
}

.reset-form,
.copy-form {
  flex: 1;                /* both forms share the space equally */
}

.reset-button,
.copy-uris-button {
  width: 100%;            /* fill their form wrapper */
  box-sizing: border-box; /* include padding in width */
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.form-hint {
  font-size: 0.85em;
  color: #777;
}



/* Copy-URIs button (green style) */
.copy-uris-button {
  background-color: #1DB954;       /* Spotify-green */
  color: #fff;
  border: 1px solid #1DB954;
  padding: 8px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
}

.copy-uris-button:hover {
  background-color: #1AA34A;
}


.reset-button {
  background-color: #ffdddd;
  color: #a00;
  border: 1px solid #a00;
  padding: 8px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
}

.reset-button:hover {
  background-color: #ffe6e6;
}

/* Copy-instructions pill */
#copy-instructions {
  display: none;             /* shown only after copy */
  color: #155724;
  background: #d4edda;
  border: 1px solid #c3e6cb;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 0.9em;
  white-space: nowrap;       /* keep it on one line */
}
#copy-instructions a {
  color: #155724;
  text-decoration: underline;
  margin-left: 4px;
}

.add-to-top50 {
  border: none;
  background: none;
  cursor: pointer;
}

.add-to-top50 .grayed {
  color: #ccc;
  cursor: not-allowed;
}

.top50-icon {
  display: inline-block;
  background-color: #1DB954;
  color: white;
  font-weight: bold;
  font-size: 0.9em;
  padding: 4px 6px;
  border-radius: 4px;
  min-width: 24px;
  text-align: center;
}

.top50-icon.grayed {
  background-color: #ccc;
  cursor: not-allowed;
}

.top50-icon.grayed-added {
  color: gray;
  opacity: 0.6;
}

.top50-icon.grayed-limit {
  color: #d6006e;
  opacity: 0.8;
  border: 1px dashed #d6006e;
  border-radius: 50%;
  padding: 2px 5px;
}

.top50-limit-note {
  font-size: 0.85rem;
  color: #d6006e;
  margin-top: 4px;
  text-align: center;
}

.quiz-upgrade-link {
  color: #d6006e;
  text-decoration: underline;
  font-weight: 500;
}



.song-year {
  font-size: 0.75em;
  color: #888;
  margin-bottom: 4px;
}

/* small popup in the bottom right (or change to top-right as you prefer) */
.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  max-width: 300px;
  padding: 10px 16px;
  background: rgba(46, 204, 113, 0.95); /* a nice green */
  color: white;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none; /* so it never blocks clicks */
  font-size: 0.9em;
  z-index: 2000;
}

/* when we want to show it */
.toast.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto; 
}

.main-nav a.active {
  background-color: #fff;
  color: #4b0082;
  padding: 6px 10px;
  border-radius: 4px;
}


.no-votes-message {
  padding: 1em;
  background: #fff0f0;
  border: 1px solid #d66;
  border-radius: 6px;
  font-size: 1em;
  text-align: center;
  max-width: 700px;
  margin: 1em auto;
}


#popup-overlay {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background-color: rgba(0,0,0,0.8);
}

#popup-overlay img {
  position: absolute;
  max-width: 90%;
  max-height: 90%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border: 4px solid white;
  box-shadow: 0 0 10px black;
}

/* === Quiz Page Styles === */
.quiz-container {
  max-width: 600px;
  margin: 2em auto;
  padding: 1em 2em;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
  text-align: center;
}

@media (max-width: 768px) {
  .quiz-container {
    padding: 1em 1em; /* ⬅️ instead of 2em on the sides */
  }

  /* If "Användare" is the second column */
.quiz-results-table td:nth-child(2) {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
}

}

@media (max-width: 500px) {
  .quiz-container {
    padding: 0.8em 0.6em;
  }
}


.quiz-container h1 {
  margin-bottom: 0.5em;
}

.quiz-container p.intro {
  font-size: 1.1em;
  color: #555;
}

.quiz-container ul {
  text-align: left;
  margin-left: 1.2em;
}

.quiz-container p.rules {
  text-align: left;
  font-size: 1em;
}

.quiz-start-button {
  display: inline-block;
  margin-top: 2em;
  background-color: #e5007d;
  color: white;
  padding: 1em 2em;
  font-size: 1.2em;
  font-weight: bold;
  border-radius: 8px;
  text-decoration: none;
  transition: background-color 0.2s;
}

.quiz-start-button:hover {
  background-color: #c00066;
}

#live-timer {
  font-weight: bold;
  font-size: 1.2em;
  margin-top: 0.5em;
}


.quiz-container hr {
  margin: 1.5em 0;
}

/* === Quiz Results === */
.quiz-results-summary {
  font-size: 1.3em;
  line-height: 1.5;
}

.quiz-results-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: auto; /* allow cells to size naturally */
  margin: 1em 0;
}

.quiz-results-table th,
.quiz-results-table td {
  padding: 0.4em 0.6em;
  border-bottom: 1px solid #eee;
  vertical-align: middle;
  text-align: center;
}

.quiz-results-table td:nth-child(1),
.quiz-results-table th:nth-child(1),
.quiz-results-table th:nth-child(2),
.quiz-results-table td:nth-child(2) {
  white-space: normal;
  overflow-wrap: break-word; /* bättre än word-break här */
  max-width: 220px;
}


.quiz-results-table th:nth-child(1),
.quiz-results-table td:nth-child(1),
.quiz-results-table th:nth-child(2),
.quiz-results-table td:nth-child(2) {
  text-align: left;
}

/* 🎯 This ensures space on the right */
.quiz-results-table th:last-child,
.quiz-results-table td:last-child {
  text-align: right;
  padding-right: 2em;
  white-space: nowrap;
}

.quiz-start-button,
.quiz-play-button {
  display: inline-block;
  margin-top: 1em;
  padding: 0.8em 1.6em;
  background-color: #e5007d;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1.1em;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.2s ease;
  text-decoration: none;
}

.quiz-start-button:hover,
.quiz-play-button:hover {
  background-color: #c4006d;
}

.quiz-play-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.quiz-start-button.disabled {
  background-color: #ccc;
  color: #666;
  cursor: not-allowed;
}


.quiz-answers {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75em;
  margin-top: 1em;
}

.quiz-answers button {
  flex: 1 1 calc(50% - 0.75em); /* 2 per row */
  padding: 0.6em;
  font-size: 1em;
  border: 2px solid #ccc;
  border-radius: 6px;
  cursor: pointer;
  background-color: #f9f9f9;
  transition: background-color 0.2s ease;
  text-align: left;
}

.quiz-answers button:hover {
  background-color: #f0f0f0;
}

.quiz-answers button.full-width {
  flex: 0 1 calc(50% - 0.75em); /* Same width as others */
  margin-left: auto;
  margin-right: auto;
}


.quiz-tabs,
.quiz-subtabs {
  display: flex;
  gap: 0.6em;
  margin-bottom: 1em;
  flex-wrap: wrap;
}

.quiz-tabs a,
.quiz-subtabs a {
  padding: 0.4em 0.9em;
  border: 1px solid #ccc;
  border-radius: 6px;
  text-decoration: none;
  color: #333;
  background: #f5f5f5;
  font-weight: bold;
}

.quiz-tabs a.active,
.quiz-subtabs a.active {
  background: #e5007d;
  color: white;
  border-color: #e5007d;
}


.quiz-tabs a:hover,
.quiz-subtabs a:hover {
  background: #e0e0e0;
}


@media (max-width: 480px) {
  .quiz-answers button {
    flex: 1 1 100%; /* full width on small screens */
  }
}

.hidden-player {
  width: 0;
  height: 0;
  overflow: hidden;
}

.youtube-player {
  width: 100%;
  max-width: 460px;
  height: 115px;
  margin: 1em auto;
}

.youtube-player {
  opacity: 0;
  transition: opacity 1s ease-in;
}

.youtube-player.visible {
  opacity: 1;
}

.youtube-wrapper {
  position: relative;
  width: 100%;
  max-width: 460px;
  margin: 1em auto;
}

.youtube-player iframe {
  width: 100%;
  height: 260px;
  display: block;
  border-radius: 8px;
}

.youtube-overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  background: transparent;
}

@media (max-width: 768px) {
  .preview-toggle,
  .youtube-toggle {
    display: none;
  }
}



.quiz-question-block {
  margin-top: 2em;
}

.quiz-feedback {
  margin-top: 1em;
  font-weight: bold;
}

.quiz-mode-switch {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

.quiz-start-button.small {
  padding: 6px 12px;
  font-size: 0.9em;
}

.quiz-mode-label {
  font-weight: bold;
  color: #e5007d;
  margin-bottom: 10px;
}

.custom-quiz-form {
  margin-top: 10px;
  text-align: left;
  display: inline-block;
}

.custom-quiz-form .form-row {
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 100%;
}

.custom-quiz-form label {
  display: inline-block;
  width: 160px;
  font-size: 0.95em;
  font-weight: 500;
  color: #333;
  white-space: normal;  /* ⬅️ ALLOW WRAPPING */
  word-wrap: break-word;
  line-height: 1.4;
}


.custom-quiz-form input[type="number"] {
  padding: 6px 10px;
  font-size: 1em;
  border: 2px solid #ccc;
  border-radius: 6px;
  width: 60px;
  box-sizing: border-box;
}


.custom-quiz-form .checkbox-wrapper {
  width: 60px; /* match number input width */
  height: 34px; /* match height of number fields */
  display: flex;
  align-items: center;
  justify-content: center; /* or flex-end for right alignment */
  box-sizing: border-box;
}

.custom-quiz-form input[type="checkbox"] {
  transform: scale(1.2);
  margin: 0;
}


.align-checkbox {
  margin-left: auto;
  transform: scale(1.2);
}



.custom-quiz-box {
  border: 2px solid #e5007d;
  border-radius: 10px;
  padding: 10px 20px 4px;
  margin-top: 1em;
  background-color: #fff5fa;
  display: inline-block;
  text-align: left;
}

.custom-quiz-box .form-row {
  margin-bottom: 12px;
}

.custom-quiz-box .form-row:last-child {
  margin-bottom: 0;
  text-align: center;
}


.custom-quiz-box .quiz-start-button {
  width: auto;
  padding: 8px 18px;
  font-size: 1em;
}

.weekend-highlight-box {
  background: linear-gradient(135deg, #ffe680, #fff2b3);
  border: 3px solid #f5c400;
  border-radius: 10px;
  padding: 1.5em;
  text-align: center;
  margin-bottom: 1.5em;
  box-shadow: 0 0 10px rgba(245, 196, 0, 0.4);
}

.weekend-highlight-box h1 {
  font-size: 1.8em;
  color: #b58900;
  margin-bottom: 0.5em;
}

.profile-form-section {
  margin-top: 1em;
}

.profile-form-section .form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 400px;
  margin-bottom: 10px;
}

.profile-header {
  position: relative;
  min-height: 40px;
  margin-bottom: 20px;
}

.avatar-block {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding-left: 10px;
}

.profile-headline {
  display: flex;
  align-items: center;
  justify-content: center; /* 👈 center the row */
  gap: 12px;
  margin-bottom: 1em;
  text-align: center;
}


.profile-avatar.small {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
}

.profile-avatar-link {
  display: inline-block;
}

.profile-avatar-link:hover img {
  opacity: 0.85;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.profile-status-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.profile-status-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 10px;
}

.profile-tab {
  flex: 1 1 auto;
  text-align: center;
  padding: 0.4em 0.6em;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #f5f5f5;
  color: #333;
  font-weight: bold;
  text-decoration: none;
  min-width: 80px;
  max-width: 120px;
  white-space: nowrap;
}

.profile-tab.active {
  background: #e5007d;
  color: white;
  border-color: #e5007d;
}

@media (max-width: 768px) {
  .profile-page .quiz-container {
    max-width: 100%;
    overflow: hidden;
    padding: 1em;
    border-radius: 16px;
    background-color: white;
  }

  .profile-page .quiz-subtabs {
    display: flex;
    justify-content: space-between;
    flex-wrap: nowrap;         /* ✅ Fortsätt hindra radbrytning */
    gap: 0.4em;
    margin-bottom: 1em;
    padding: 0 0.5em;
    box-sizing: border-box;
  }

  .profile-page .profile-tab {
    flex: 0 1 auto;             /* ✅ Bättre kontroll: storlek styrs av innehåll */
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 13px;
    padding: 0.3em 0.6em;
    border: 1px solid #ccc;
    border-radius: 6px;
    background: #f5f5f5;
    color: #333;
    font-weight: bold;
    text-decoration: none;
    white-space: nowrap;
    max-width: 100%;
  }

  .profile-page .profile-tab.active {
    background: #e5007d;
    color: white;
    border-color: #e5007d;
  }
}



@media (max-width: 400px) {
  .icon {
    display: none;
  }
}



.premium-manage-form {
  margin: 0;
}

.premium-manage-button {
  padding: 4px 10px;
  font-size: 14px;
  font-weight: bold;
  background-color: #e91e63;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  display: inline-block;
  vertical-align: middle;
}

.premium-manage-button:hover {
  background-color: #c2185b;
}

.premium-coming-soon-box {
  margin-top: 1.5em;
  background-color: #f3f3f3;
  border-left: 4px solid #e91e63;
  padding: 1em;
  border-radius: 6px;
  text-align: center;
}

.premium-coming-soon-text {
  font-size: 1.1em;
  font-weight: bold;
  color: #444;
}


/* Överskriv textjustering för innehållet */
.policy-content {
  text-align: left;
}

.policy-content h1,
.policy-content h2 {
  text-align: center;
}


.quiz-upgrade-link {
  color: #007bff;
  text-decoration: underline;
  font-weight: bold;
}


.profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
}

.choose-avatar-button {
  padding: 4px 10px;
  font-size: 13px;
  background-color: #f0f0f0;
  border: 1px solid #bbb;
  border-radius: 6px;
  text-decoration: none;
  color: #333;
  transition: background-color 0.2s ease;
}

.choose-avatar-button:hover {
  background-color: #e0e0e0;
}

.profile-meta {
  max-width: 400px;
  margin: 0 auto;
  text-align: center;
}

.avatar-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-bottom: 20px;
}

.avatar-form {
  margin: 0;
}

.avatar-button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.avatar-option {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid transparent;
  transition: border-color 0.2s;
}

.avatar-option:hover {
  border-color: #888;
}

.premium-avatar {
  border: 2px solid gold;
}

.profile-box {
  border: 1px solid #ccc;
  padding: 20px;
  border-radius: 10px;
  background: #fafafa;
  margin-bottom: 30px;
}


.badge-container {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 10px;
}

.badge img {
  width: 80px;
  height: 80px;
  object-fit: contain;
}

.badge-splash-overlay {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
}

.badge-splash-box {
  background: white;
  padding: 30px;
  border-radius: 16px;
  text-align: center;
  box-shadow: 0 0 20px gold;
  animation: pop-in 0.5s ease-out;
}

.badge-desc {
  margin-top: 5px;
  font-weight: bold;
  font-size: 14px;
}
.badge-splash-images {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}
.badge-splash-images .badge {
  text-align: center;
}


.badge-splash-images img {
  width: 100px;
  height: 100px;
  margin: 10px;
}

.badge-hint {
  font-size: 0.9em;
  color: #555;
  margin-top: 0.3em;
}

.badge.locked img {
  opacity: 0.3;
  filter: grayscale(100%);
}

.badge-hint-profile {
  font-size: 12px;
  color: #666;
  margin-top: 0.3em;
}

#badgeModal {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  display: none; /* will be set to flex via JS */
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-content {
  position: relative; /* Needed for positioning the close button */
  max-width: 320px;
  padding: 20px;
  text-align: center;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.modal-content img {
  width: 64px;
  height: 64px;
  margin-bottom: 10px;
}

.modal-content .close {
  position: absolute;
  top: 8px;
  right: 12px;
  font-size: 22px;
  cursor: pointer;
}

#badgeModalTitle {
  font-size: 18px;
  margin: 10px 0 5px;
}

#badgeModalHint,
#badgeModalNext {
  font-size: 14px;
  color: #333;
  margin: 4px 0;
}








@keyframes pop-in {
  from { transform: scale(0.7); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}


.quiz-warning {
  color: #d6006e;
  font-weight: 500;
  text-align: center;
  margin-top: 10px;
}

.quiz-upgrade-link {
  color: #d6006e;
  text-decoration: underline;
}

.quiz-start-disabled-message {
  padding: 15px;
  background: #fff0f7;
  border: 1px solid #d6006e;
  border-radius: 10px;
  text-align: center;
}

/* Avatar on toplist */
.toplist-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 8px;
  vertical-align: middle;
}

@media (max-width: 768px) {
  .toplist-page .quiz-subtabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5em;
  }

  .toplist-page .quiz-subtabs a {
    flex: 0 1 auto;              /* 🔄 Låt bredden styras av innehållet */
    min-width: unset;            /* ❌ Ta bort eventuell minsta bredd */
    text-align: center;
    padding: 0.4em 0.6em;        /* Anpassad padding för liten skärm */
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 6px;
    background: #f5f5f5;
    font-weight: bold;
    text-decoration: none;
    white-space: nowrap;         /* 🔒 Förhindra radbrytning */
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .toplist-page .quiz-subtabs a.active {
    background: #e5007d;
    color: white;
    border-color: #e5007d;
  }

   .toplist-avatar {
    display: none;
  }

  .quiz-results-table td:first-child img {
    display: none;
  }

  /* Optionally tighten table cell padding */
  .quiz-results-table td, .quiz-results-table th {
    padding: 0.4em 0.5em;
  }

  .quiz-subtabs a {
    font-size: 13px;
    padding: 0.35em 0.5em;
  }

  .quiz-results-table {
  margin: 0 auto;
}
}




.song-info-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 8px;
  align-items: start;
  font-weight: normal;
  font-size: 1em;
}

.ranking {
  white-space: nowrap;
}

.song-meta .title-line {
  line-height: 1.2;
}

.vote-info {
  color: #555;
  font-size: 0.85em;
}

.votes-info {
  font-size: 0.85em;
  color: #555;
  margin-top: 0.25em;
}

.premium-hint {
  font-size: 0.9em;
  color: #666;
  margin-top: 0.5em;
}
.quiz-upgrade-link {
  font-weight: bold;
  text-decoration: underline;
}



.ranking-filter-form {
  margin-bottom: 1em;
  font-size: 0.95em;
}

.ranking-filter-form select {
  padding: 4px 8px;
  font-size: 0.95em;
}




/* === Custom Quiz Filter Form Styling === */
.custom-filter-form {
  display: flex;
  flex-wrap: wrap;
  gap: 1em 2em;
  margin: 1.5em 0 2em;
  justify-content: center;
  align-items: flex-end;
}

.custom-filter-form .filter-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 100px;
}

.custom-filter-form label {
  font-size: 0.9em;
  font-weight: 500;
  margin-bottom: 4px;
  white-space: nowrap;
}

.custom-filter-form input[type="number"],
.custom-filter-form input[type="date"] {
  padding: 6px 10px;
  font-size: 0.95em;
  border: 2px solid #ccc;
  border-radius: 6px;
  width: 120px;
  box-sizing: border-box;
  margin-bottom: 4px;
}

.custom-filter-form .full-width {
  flex-basis: 100%;
  display: flex;
  justify-content: center;
  margin-top: 0.5em;
}

.checkbox-cell {
  display: flex;
  align-items: center;
  height: 100%;
}



.button-column {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

/* Button styling for consistency */
.quiz-start-button.small {
  padding: 6px 14px;
  font-size: 0.95em;
  font-weight: bold;
}

/* Table alignment fix */
.quiz-results-table .filter-row th {
  vertical-align: bottom;
  padding-bottom: 0.5em;
}

.quiz-results-table .filter-row input {
  width: 70px;
  padding: 5px 6px;
  font-size: 0.85em;
  border-radius: 6px;
  border: 2px solid #ccc;
  box-sizing: border-box;
  text-align: center;
}

.quiz-results-table th,
.quiz-results-table td {
  text-align: center;
  white-space: nowrap;
}

.quiz-results-table th:nth-child(5),
.quiz-results-table td:nth-child(5) {
  width: 80px; /* adjust as needed */
}

.quiz-start-button.small {
  padding: 6px 14px;
  font-size: 0.85em;
}

.custom-quiz-box .checkbox-label {
  display: inline-block;
  font-size: 0.95em;
  font-weight: 500;
  color: #333;
  white-space: normal;
  max-width: 220px; /* adjust as needed */
  vertical-align: top;
  line-height: 1.4;
  margin-left: 6px;
}

.custom-quiz-form .checkbox-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.custom-quiz-form .checkbox-row label {
  width: 160px;
  font-size: 0.95em;
  font-weight: 500;
  color: #333;
  white-space: normal;
}






.hidden {
  display: none;
}

.youtube-embed-container {
  margin-top: 0.5em;
  width: 300px;
  height: 80px;
  overflow: hidden;
  border-radius: 6px;
}
.youtube-embed-container iframe {
  width: 300px;
  height: 80px;
  border-radius: 6px;
  border: none;
}

.auth-box {
  max-width: 400px;
  margin: 2em auto;
  padding: 2em;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 0 15px rgba(0,0,0,0.1);
}

.auth-form .form-group {
  margin-bottom: 1.2em;
}

.auth-form label {
  display: block;
  margin-bottom: 0.5em;
  font-weight: bold;
}

.auth-form input {
  width: 100%;
  padding: 0.6em;
  border: 1px solid #ccc;
  border-radius: 6px;
}

.auth-links {
  margin-top: 1em;
  display: flex;
  justify-content: space-between;
}

.auth-link {
  font-size: 0.95em;
  text-decoration: none;
  color: #0056b3;
}

.auth-link:hover {
  text-decoration: underline;
}


.quiz-results-restart {
  margin-top: 2em;
}

.quiz-container form {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.quiz-section {
  margin-top: 20px;
}

.quiz-section.hidden {
  display: none;
}


.form-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  max-width: 320px;
  margin-bottom: 1em;
}

.form-group label {
  font-weight: bold;
  margin-bottom: 0.2em;
}

.form-group input {
  padding: 0.5em;
  font-size: 1em;
  width: 100%;
  box-sizing: border-box;
}

.form-actions {
  margin-top: 1em;
}

.btn-primary {
  background-color: #e6007e;
  color: white;
  border: none;
  padding: 0.6em 1.5em;
  font-size: 1em;
  border-radius: 6px;
  cursor: pointer;
}

.form-links {
  margin-top: 1em;
}

.form-links a {
  margin: 0 1em;
  text-decoration: underline;
  color: #3333cc;
}

.password-hint {
  font-size: 0.85em;
  color: #555;
  max-width: 320px;
  text-align: left;
}




.year-selector-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.year-selector-form {
  display: flex;
  align-items: center;
  gap: 6px;
}

.year-selector-form input[type="number"] {
  width: 70px;
  padding: 4px;
  font-size: 14px;
  border: 1px solid #ccc;
  border-radius: 4px;
  text-align: center;
}

.year-selector-form button {
  background-color: #eee;
  border: 1px solid #ccc;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
}

.year-selector-form button:hover {
  background-color: #ddd;
}

.tab-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: absolute;
  top: -32px;
  left: 20px;
  right: 20px;
}

@media (max-width: 768px) {
  .tab-button .text-label {
    display: none;
  }
  
  .year-selector-form {
  gap: 0.2em;
}

.year-selector-form input#yearInput {
  width: 50px;
  height: 28px;
  font-size: 13px;
  padding: 2px;
  text-align: center;
}

.year-selector-form .arrow-button {
  font-size: 14px;
  padding: 4px 6px;
  height: 26px;
  line-height: 1;
}

}

#message {
  background-color: #f0f8ff;
  color: #333;
  border: 1px solid #ccc;
  padding: 1em;
  margin: 1em auto;
  width: fit-content;
  max-width: 90%;
  border-radius: 5px;
  font-size: 1rem;
  text-align: center;
}

.site-footer {
  background: rgba(255, 255, 255, 0.15); /* light transparent overlay */
  padding: 1em 0;
  text-align: center;
  font-size: 0.9em;
  color: #fff;
}

.site-footer a {
  color: #d0e6ff;
  text-decoration: none;
  margin: 0 0.5em;
}

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






