/* SyncRate Styles */

/* Google Fonts Import */
@import url("https://fonts.googleapis.com/css2?family=League+Spartan:wght@300;400;500;600;700&family=SUSE+Mono:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800&display=swap");

/* Avenir Font Faces */
@font-face {
  font-family: "Avenir";
  src: url("/static/fonts/Avenir Font Family/AvenirLTStd-Light.otf")
    format("opentype");
  font-weight: 300;
  font-style: normal;
}

@font-face {
  font-family: "Avenir";
  src: url("/static/fonts/Avenir Font Family/AvenirLTStd-LightOblique.otf")
    format("opentype");
  font-weight: 300;
  font-style: italic;
}

@font-face {
  font-family: "Avenir";
  src: url("/static/fonts/Avenir Font Family/AvenirLTStd-Roman.otf")
    format("opentype");
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: "Avenir";
  src: url("/static/fonts/Avenir Font Family/AvenirLTStd-Oblique.otf")
    format("opentype");
  font-weight: 400;
  font-style: italic;
}

@font-face {
  font-family: "Avenir";
  src: url("/static/fonts/Avenir Font Family/AvenirLTStd-Book.otf")
    format("opentype");
  font-weight: 450;
  font-style: normal;
}

@font-face {
  font-family: "Avenir";
  src: url("/static/fonts/Avenir Font Family/AvenirLTStd-BookOblique.otf")
    format("opentype");
  font-weight: 450;
  font-style: italic;
}

@font-face {
  font-family: "Avenir";
  src: url("/static/fonts/Avenir Font Family/AvenirLTStd-Medium.otf")
    format("opentype");
  font-weight: 500;
  font-style: normal;
}

@font-face {
  font-family: "Avenir";
  src: url("/static/fonts/Avenir Font Family/AvenirLTStd-MediumOblique.otf")
    format("opentype");
  font-weight: 500;
  font-style: italic;
}

@font-face {
  font-family: "Avenir";
  src: url("/static/fonts/Avenir Font Family/AvenirLTStd-Heavy.otf")
    format("opentype");
  font-weight: 700;
  font-style: normal;
}

@font-face {
  font-family: "Avenir";
  src: url("/static/fonts/Avenir Font Family/AvenirLTStd-HeavyOblique.otf")
    format("opentype");
  font-weight: 700;
  font-style: italic;
}

@font-face {
  font-family: "Avenir";
  src: url("/static/fonts/Avenir Font Family/AvenirLTStd-Black.otf")
    format("opentype");
  font-weight: 900;
  font-style: normal;
}

@font-face {
  font-family: "Avenir";
  src: url("/static/fonts/Avenir Font Family/AvenirLTStd-BlackOblique.otf")
    format("opentype");
  font-weight: 900;
  font-style: italic;
}

/* CSS Custom Properties for Theme Colors - Nord Palette */
:root {
  /* Light theme colors - Nord Snow Storm & Polar Night */
  --bg-primary: #eceff4; /* Nord Snow Storm 0 */
  --bg-secondary: #e5e9f0; /* Nord Snow Storm 1 */
  --bg-tertiary: #d8dee9; /* Nord Snow Storm 2 */
  --bg-accent: #e5e9f0; /* Nord Snow Storm 1 */
  --bg-error: #ebccd1; /* Nord Aurora Red tinted */

  --text-primary: #2e3440; /* Nord Polar Night 0 */
  --text-secondary: #3b4252; /* Nord Polar Night 1 */
  --text-muted: #4c566a; /* Nord Polar Night 3 */
  --text-inverse: #eceff4; /* Nord Snow Storm 0 */

  --border-light: #d8dee9; /* Nord Snow Storm 2 */
  --border-medium: #bfcbd9; /* Between Snow Storm 2 & 3 */
  --border-dark: #a3b3c6; /* Darker Snow Storm tone */
  --border-error: #d08b95; /* Nord Aurora Red muted */

  --accent-primary: #5e81ac; /* Nord Frost 3 */
  --accent-hover: #81a1c1; /* Nord Frost 4 */
  --accent-danger: #bf616a; /* Nord Aurora Red */
  --accent-danger-hover: #a54a53; /* Darker Aurora Red */

  --shadow-light: rgba(46, 52, 64, 0.1);
  --shadow-medium: rgba(46, 52, 64, 0.2);
}

/* Dark theme colors - Nord Polar Night & Snow Storm */
[data-theme="dark"] {
  --bg-primary: #2e3440; /* Nord Polar Night 0 */
  --bg-secondary: #3b4252; /* Nord Polar Night 1 */
  --bg-tertiary: #434c5e; /* Nord Polar Night 2 */
  --bg-accent: #4c566a; /* Nord Polar Night 3 */
  --bg-error: #4a3137; /* Nord Aurora Red darkened */

  --text-primary: #eceff4; /* Nord Snow Storm 0 */
  --text-secondary: #e5e9f0; /* Nord Snow Storm 1 */
  --text-muted: #d8dee9; /* Nord Snow Storm 2 */
  --text-inverse: #2e3440; /* Nord Polar Night 0 */

  --border-light: #434c5e; /* Nord Polar Night 2 */
  --border-medium: #4c566a; /* Nord Polar Night 3 */
  --border-dark: #5e81ac; /* Nord Frost 3 for subtle accent */
  --border-error: #6b404a; /* Nord Aurora Red muted */

  --accent-primary: #88c0d0; /* Nord Frost 1 */
  --accent-hover: #8fbcbb; /* Nord Frost 2 */
  --accent-danger: #bf616a; /* Nord Aurora Red */
  --accent-danger-hover: #d08770; /* Nord Aurora Orange */

  --shadow-light: rgba(0, 0, 0, 0.3);
  --shadow-medium: rgba(0, 0, 0, 0.5);
}

/* Base layout */
body {
  font-family: "Avenir", "Fredoka", sans-serif;
  font-weight: 400;
  margin: 0;
  padding: 20px;
  background: var(--bg-primary);
  color: var(--text-primary);
  /* transition: */
  /*   background-color 0.3s ease, */
  /*   color 0.3s ease; */
}

/* Typography */
h1,
h2,
h3 {
  font-weight: 600;
}

h1 {
  font-size: 2.5rem;
}

h2 {
  font-size: 2rem;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  background: var(--bg-secondary);
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px var(--shadow-light);
  /* transition: */
  /*   background-color 0.3s ease, */
  /*   box-shadow 0.3s ease; */
}

/* Header and navigation */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-light);
}

.logo-link {
  text-decoration: none;
  color: var(--text-primary);
  /* transition: color 0.3s ease; */
}

.header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

/* Theme Toggle Button */
.theme-toggle {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-medium);
  border-radius: 20px;
  padding: 10px 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 16px;
  /* transition: all 0.3s ease; */
  position: relative;
  min-width: 60px;
  min-height: 38px;
  justify-content: center;
}

.theme-toggle:hover {
  background: var(--bg-accent);
  border-color: var(--border-dark);
  transform: translateY(-1px);
}

.theme-icon {
  display: flex;
  align-items: center;
  /* transition: opacity 0.3s ease; */
}

/* Show sun icon in light mode */
:root .theme-toggle .sun-icon {
  opacity: 1;
}

:root .theme-toggle .moon-icon {
  opacity: 0;
  position: absolute;
}

/* Show moon icon in dark mode */
[data-theme="dark"] .theme-toggle .sun-icon {
  opacity: 0;
  position: absolute;
}

[data-theme="dark"] .theme-toggle .moon-icon {
  opacity: 1;
}

.nav a {
  margin-right: 20px;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 500;
  /* transition: color 0.3s ease; */
}

.nav a:hover {
  color: var(--accent-primary);
}

/* Song grid and cards */
.song-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.song-card {
  border: 1px solid var(--border-medium);
  border-radius: 8px;
  padding: 15px;
  background: var(--bg-tertiary);
  /* transition: */
  /*   background-color 0.3s ease, */
  /*   border-color 0.3s ease; */
}

.song-card h3 {
  margin: 0 0 10px 0;
  color: var(--text-primary);
  font-weight: 500;
}

.song-card .artist {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 300;
}

.song-card .units {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 300;
}

.song-card .albums {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 300;
}

.song-card .categories {
  margin-top: 8px;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 300;
}

.song-card .category,
.song-info .category,
.category {
  background: var(--accent-primary);
  color: var(--text-inverse);
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  display: inline-block;
  margin-right: 4px;
}

/* Forms */
.form-container {
  max-width: 400px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 15px;
}

.form-label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
}

.form-input {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--border-medium);
  border-radius: 4px;
  box-sizing: border-box;
  background: var(--bg-secondary);
  color: var(--text-primary);
  /* transition: */
  /*   border-color 0.3s ease, */
  /*   background-color 0.3s ease; */
}

.form-select {
  width: 100%;
  padding: 8px;
  border: 1px solid var(--border-medium);
  border-radius: 4px;
  background: var(--bg-secondary);
  color: var(--text-primary);
  /* transition: */
  /*   border-color 0.3s ease, */
  /*   background-color 0.3s ease; */
}

.form-textarea {
  width: 100%;
  padding: 8px;
  border: 1px solid var(--border-medium);
  border-radius: 4px;
  resize: vertical;
  min-height: 60px;
  background: var(--bg-secondary);
  color: var(--text-primary);
  /* transition: */
  /*   border-color 0.3s ease, */
  /*   background-color 0.3s ease; */
}

/* Color input styling */
.color-input-group {
  display: flex;
  gap: 10px;
  align-items: center;
}

.color-picker {
  width: 60px;
  height: 40px;
  border: 1px solid var(--border-medium);
  border-radius: 4px;
  cursor: pointer;
  padding: 0;
  background: var(--bg-secondary);
  /*   transition: border-color 0.3s ease; */
}

.color-text {
  flex: 1;
  text-transform: uppercase;
  font-family: "SUSE Mono", monospace;
  font-weight: 400;
}

.color-text:invalid {
  border-color: var(--accent-danger);
  background-color: var(--bg-error);
}

/* Color input styling */
input[type="color"] {
  width: 60px;
  height: 40px;
  padding: 2px;
  border: 2px solid var(--border-primary);
  border-radius: 6px;
  background: var(--bg-secondary);
  cursor: pointer;
  transition: border-color 0.3s ease;
}

input[type="color"]:hover {
  border-color: var(--accent-primary);
}

input[type="color"]:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 2px var(--accent-primary-alpha);
}

.btn-primary {
  padding: 12px;
  background: var(--accent-primary);
  color: var(--text-inverse);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 500;
  width: 100%;
  /*   transition: background-color 0.3s ease; */
}

.btn-secondary {
  padding: 10px;
  background: var(--accent-primary);
  color: var(--text-inverse);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
  /*   transition: background-color 0.3s ease; */
}

/* Song detail page */
.song-detail-layout {
  display: flex;
  gap: 30px;
}

.song-info {
  flex: 1;
}

.song-info .artist,
.song-info .units,
.song-info .albums,
.song-info .categories {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 300;
  margin-bottom: 8px;
}

/* YouTube embed styling */
.youtube-embed {
  margin: 20px 0;
  position: relative;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.youtube-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 8px;
}

.song-sidebar {
  flex: 0 0 300px;
}

.song-image {
  width: 60%;
  max-width: 300px;
  border-radius: 8px;
  margin-bottom: 20px;
}

.song-card-image {
  width: 60%;
  max-width: 200px;
  border-radius: 8px;
  margin-bottom: 12px;
}

.rating-form {
  background: var(--bg-accent);
  padding: 20px;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  /*   transition: background-color 0.3s ease; */
}

.votes-section {
  margin-top: 40px;
}

.vote-card {
  background: var(--bg-accent);
  padding: 15px;
  border-radius: 8px;
  border-left: 4px solid var(--accent-primary);
  margin-bottom: 15px;
  /*   transition: background-color 0.3s ease; */
}

.vote-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.vote-rating {
  background: var(--accent-primary);
  color: var(--text-inverse);
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.vote-comment {
  margin: 0;
  color: var(--text-secondary);
  font-weight: 300;
}

/* Error page */
.error-box {
  text-align: center;
  padding: 40px;
  background: var(--bg-error);
  border: 1px solid var(--border-error);
  border-radius: 8px;
  color: var(--accent-danger);
  /* transition: */
  /*   background-color 0.3s ease, */
  /*   border-color 0.3s ease; */
}

/* Admin pages */
.admin-menu {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 20px;
}

.admin-menu-item {
  background: var(--bg-accent);
  padding: 20px;
  border-radius: 8px;
  border: 1px solid var(--border-light);
  /* transition: */
  /*   background-color 0.3s ease, */
  /*   border-color 0.3s ease; */
}

.admin-menu-item h3 {
  margin-top: 0;
  color: var(--text-primary);
  font-weight: 500;
  border-bottom: 2px solid var(--accent-primary);
  padding-bottom: 10px;
}

.admin-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.admin-link {
  display: block;
  padding: 10px 15px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-medium);
  border-radius: 4px;
  text-decoration: none;
  color: var(--text-primary);
  /*   transition: all 0.2s; */
}

.admin-link:hover {
  background: var(--accent-primary);
  color: var(--text-inverse);
  border-color: var(--accent-primary);
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid #eee;
}

.admin-form {
  max-width: none;
}

/* Search and Filter Components */
.search-filter-container {
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 24px;
}

.search-filter-row {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.search-group {
  flex: 2;
  min-width: 300px;
  max-width: 500px;
}

.filter-group {
  flex: 1;
  min-width: 180px;
  max-width: 220px;
  margin-top: 0;
}

.search-group .form-label,
.filter-group .form-label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
}

.search-input,
.filter-select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-medium);
  border-radius: 6px;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 14px;
  height: 42px;
  box-sizing: border-box;
}

.search-input:focus,
.filter-select:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 2px rgba(94, 129, 172, 0.2);
}

.search-stats {
  color: var(--text-muted);
  font-size: 12px;
  margin-top: 8px;
  height: 16px; /* Reserve space so both columns have same height */
}


/* Checkbox styling for filters */
.filter-group .form-checkbox {
  margin-right: 8px;
  accent-color: var(--accent-primary);
  transform: scale(1.1);
}

.filter-group label input[type="checkbox"] {
  margin-right: 8px;
}

/* Covers filter positioning */
.covers-filter-label {
  display: block;
  margin-top: 8px;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.no-results {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
  background: var(--bg-secondary);
  border-radius: 8px;
  border: 1px dashed var(--border-medium);
  margin-top: 20px;
}

.no-results h3 {
  margin: 0 0 8px 0;
  color: var(--text-secondary);
}

.no-results p {
  margin: 0;
  font-size: 14px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .search-filter-row {
    flex-direction: column;
  }

  .search-group,
  .filter-group {
    flex: 1;
    min-width: auto;
    max-width: none;
  }
}

/* Fuzzy search */
.fuzzy-search-container {
  position: relative;
}

.fuzzy-search {
  width: 100%;
}

.fuzzy-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  border-top: none;
  border-radius: 0 0 4px 4px;
  max-height: 200px;
  overflow-y: auto;
  z-index: 1000;
  box-shadow: 0 2px 4px var(--shadow-light);
}

.fuzzy-option {
  padding: 10px 15px;
  cursor: pointer;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-primary);
}

.fuzzy-option:hover,
.fuzzy-option.active {
  background: var(--accent-primary);
  color: var(--text-inverse);
}

.fuzzy-option:last-child {
  border-bottom: none;
}

.selected-items {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
  min-height: 20px;
}

.selected-tag {
  display: inline-flex;
  align-items: center;
  background: var(--accent-primary);
  color: var(--text-inverse);
  padding: 4px 8px;
  border-radius: 16px;
  font-size: 14px;
  font-weight: 500;
  gap: 6px;
}

.remove-tag {
  background: none;
  border: none;
  color: var(--text-inverse);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 0;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.remove-tag:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Reference sections */
.reference-section {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid #eee;
}

.reference-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.reference-list h4 {
  margin-top: 0;
  color: #333;
  font-weight: 600;
  border-bottom: 1px solid #ddd;
  padding-bottom: 8px;
}

.reference-items {
  max-height: 300px;
  overflow-y: auto;
}

.reference-item {
  padding: 8px;
  border-bottom: 1px solid #f0f0f0;
  font-size: 14px;
  font-weight: 300;
}

.reference-item:last-child {
  border-bottom: none;
}

/* View pages and modals */
.view-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.view-card {
  border: 1px solid var(--border-medium);
  border-radius: 8px;
  background: var(--bg-tertiary);
  overflow: hidden;
  transition: transform 0.2s ease;
}

.view-card:hover {
  transform: translateY(-2px);
}

/* Rating Room Styles */
.rating-room {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
}

.room-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--border-medium);
}

.room-header h2 {
  margin: 0;
  color: var(--accent-primary);
  font-weight: 600;
}

.room-controls {
  display: flex;
  gap: 12px;
}

.room-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 30px;
  min-height: 600px;
}

/* Video Section */
.video-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.video-container {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  background: var(--bg-secondary);
  border-radius: 8px;
  overflow: hidden;
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.no-video {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: var(--text-secondary);
  font-size: 18px;
}

.song-info {
  background: var(--bg-secondary);
  padding: 20px;
  border-radius: 8px;
  border: 1px solid var(--border-medium);
}

.song-info h3 {
  margin: 0 0 10px 0;
  color: var(--text-primary);
  font-size: 24px;
  font-weight: 600;
}

.song-details {
  color: var(--text-secondary);
  font-size: 16px;
}

#song-units-container {
  margin-top: 0.5em;
}

#song-albums-container {
  margin-top: 0.5em;
}

#song-tags-container {
  margin-top: 0.5em;
}

.separator {
  margin: 0 8px;
  color: var(--text-tertiary);
}

/* Sidebar */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Voting Section */
.voting-section {
  background: var(--bg-secondary);
  padding: 20px;
  border-radius: 8px;
  border: 1px solid var(--border-medium);
}

.voting-section h4 {
  margin: 0 0 15px 0;
  color: var(--text-primary);
  font-weight: 600;
}

.rating-input {
  margin-bottom: 15px;
}

.rating-input label {
  display: block;
  margin-bottom: 5px;
  color: var(--text-secondary);
  font-weight: 500;
}

.rating-input input {
  width: 100%;
  padding: 8px;
  border: 1px solid var(--border-medium);
  border-radius: 4px;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 16px;
}

.comment-input {
  margin-bottom: 15px;
}

.comment-input label {
  display: block;
  margin-bottom: 5px;
  color: var(--text-secondary);
  font-weight: 500;
}

.comment-input textarea {
  width: 100%;
  min-height: 80px;
  padding: 8px;
  border: 1px solid var(--border-medium);
  border-radius: 4px;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 14px;
  resize: vertical;
}

.current-vote {
  background: var(--bg-tertiary);
  padding: 15px;
  border-radius: 6px;
  border: 1px solid var(--border-light);
}

.current-vote h5 {
  margin: 0 0 10px 0;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 14px;
}

.vote-display {
  margin-bottom: 10px;
}

.vote-display .vote-rating {
  display: block;
  margin-bottom: 5px;
}

.vote-display .vote-comment {
  display: block;
  color: var(--text-secondary);
  font-style: italic;
  font-size: 14px;
}

/* Users Section */
.users-section {
  background: var(--bg-secondary);
  padding: 20px;
  border-radius: 8px;
  border: 1px solid var(--border-medium);
}

.users-section h4 {
  margin: 0 0 15px 0;
  color: var(--text-primary);
  font-weight: 600;
}

.users-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.user-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: var(--bg-tertiary);
  border-radius: 6px;
  border: 1px solid var(--border-light);
}

.username {
  color: var(--text-primary);
  font-weight: 500;
}

.user-status {
  font-size: 14px;
  font-weight: 600;
}

.user-status.voted {
  color: var(--accent-success);
}

.user-status.pending {
  color: var(--text-tertiary);
}

/* Votes Section */
.votes-section {
  background: var(--bg-secondary);
  padding: 20px;
  border-radius: 8px;
  border: 1px solid var(--border-medium);
  max-height: 300px;
  overflow-y: auto;
}

.votes-section h4 {
  margin: 0 0 15px 0;
  color: var(--text-primary);
  font-weight: 600;
}

.votes-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.vote-item {
  padding: 12px;
  background: var(--bg-tertiary);
  border-radius: 6px;
  border: 1px solid var(--border-light);
}

.vote-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 5px;
}

.voter-name {
  color: var(--text-primary);
  font-weight: 500;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .room-content {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .sidebar {
    order: -1;
  }
}

@media (max-width: 768px) {
  .room-header {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }

  .room-controls {
    justify-content: center;
  }

  .rating-room {
    padding: 15px;
  }
}

/* Home Page Styles */
.home-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.action-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-medium);
  border-radius: 12px;
  padding: 30px;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.action-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.action-card.featured {
  border: 2px solid var(--accent-primary);
  background: linear-gradient(135deg, var(--bg-secondary) 0%, rgba(var(--accent-primary-rgb), 0.05) 100%);
}

.action-card h3 {
  margin: 0 0 15px 0;
  color: var(--text-primary);
  font-size: 24px;
  font-weight: 600;
}

.action-card.featured h3 {
  color: var(--accent-primary);
}

.action-card p {
  margin: 0 0 25px 0;
  color: var(--text-secondary);
  font-size: 16px;
  line-height: 1.5;
}

.action-card .btn-primary {
  display: inline-block;
  margin: 0;
}

.action-card-link {
  text-decoration: none !important;
  color: inherit;
  display: block;
}

.action-card-link:hover {
  text-decoration: none !important;
  color: inherit;
}

.action-card-link:visited {
  text-decoration: none !important;
  color: inherit;
}

.action-card-link:focus {
  text-decoration: none !important;
  color: inherit;
}

/* Rating Room Additional Styles */
.no-song-message {
  text-align: center;
  padding: 20px;
  color: var(--text-secondary);
  font-style: italic;
}

.no-song-message p {
  margin: 5px 0;
}

.no-votes {
  text-align: center;
  color: var(--text-tertiary);
  font-style: italic;
  padding: 15px;
  margin: 0;
}

/* Room Creation Result Styles */
.room-result {
  background: var(--bg-secondary);
  border: 1px solid var(--border-medium);
  border-radius: 8px;
  padding: 25px;
  margin-top: 20px;
}

.room-result h3 {
  margin: 0 0 20px 0;
  color: var(--accent-primary);
  text-align: center;
  font-size: 24px;
  font-weight: 600;
}

.room-details {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.room-code-section,
.room-url-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.room-code-section label,
.room-url-section label {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 14px;
}

.room-code,
.room-url {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-light);
  border-radius: 4px;
  padding: 12px;
  font-family: 'SUSE Mono', monospace;
  font-size: 16px;
  color: var(--text-primary);
  word-break: break-all;
  min-height: 20px;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.room-code:hover,
.room-url:hover {
  background: var(--bg-secondary);
  border-color: var(--border-medium);
}

.room-code {
  font-size: 24px;
  font-weight: 700;
  text-align: center;
  letter-spacing: 2px;
}

#copy-code-btn,
#copy-url-btn {
  margin-top: 8px;
  align-self: flex-start;
}

#join-room-link {
  margin-top: 10px;
  text-align: center;
  font-size: 18px;
  font-weight: 600;
}

.view-card-header {
  padding: 15px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
  /* transition: background-color 0.3s ease; */
}

.view-card-header h3 {
  margin: 0;
  color: var(--text-primary);
  font-weight: 500;
}

.view-card-actions {
  display: flex;
  gap: 10px;
}

.view-card-details {
  padding: 15px;
}

.view-card-details p {
  margin: 5px 0;
  font-size: 14px;
  font-weight: 300;
}

.view-card-details strong {
  color: var(--text-primary);
}

.color-preview {
  display: inline-block;
  width: 16px;
  height: 16px;
  border-radius: 3px;
  border: 1px solid var(--border-dark);
  vertical-align: middle;
  margin-right: 5px;
}

.member-list {
  margin: 5px 0 10px 20px;
  font-size: 14px;
  font-weight: 300;
}

.member-list li {
  margin: 3px 0;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-secondary);
}

.empty-state p {
  font-size: 18px;
  margin-bottom: 20px;
  font-weight: 300;
}

.btn-danger {
  background: var(--accent-danger);
  color: var(--text-inverse);
  border: none;
  padding: 8px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  /* transition: background-color 0.3s ease; */
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-secondary:hover {
  background: var(--accent-hover);
}

.btn-secondary:disabled {
  background: var(--border-medium);
  color: var(--text-secondary);
  cursor: not-allowed;
  opacity: 0.6;
}

.btn-danger:hover {
  background: var(--accent-danger-hover);
}

/* Pagination controls */
.pagination-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-top: 30px;
  padding: 20px;
}

.pagination-controls button {
  min-width: 100px;
}

#page-info {
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
}

/* Modal styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  justify-content: center;
  align-items: center;
}

.modal-content {
  background-color: var(--bg-secondary);
  border-radius: 8px;
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 4px 6px var(--shadow-light);
  /* transition: background-color 0.3s ease; */
}

.modal-content form {
  padding: 0 30px;
}

.large-modal {
  max-width: 700px;
}

.modal-header {
  padding: 20px 30px 0 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 20px;
}

.modal-header h3 {
  margin: 0;
  color: var(--text-primary);
  font-weight: 600;
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--text-muted);
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  /* transition: color 0.3s ease; */
}

.modal-close:hover {
  color: var(--text-secondary);
}

.modal-body {
  padding: 0 30px;
}

.modal-actions {
  padding: 20px 30px;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  border-top: 1px solid #eee;
  margin-top: 20px;
}

.warning {
  color: #dc3545;
  font-weight: 500;
}

/* Responsive design */
@media (max-width: 768px) {
  .container {
    padding: 10px;
  }

  .header {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }

  .nav a {
    margin: 0 10px;
  }

  .song-grid {
    grid-template-columns: 1fr;
  }

  .view-grid {
    grid-template-columns: 1fr;
  }

  .view-card-header {
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
  }

  .view-card-actions {
    justify-content: center;
  }

  .modal-content {
    width: 95%;
    margin: 20px;
  }

  .modal-actions {
    flex-direction: column-reverse;
  }

  .song-detail-layout {
    flex-direction: column;
    gap: 20px;
  }

  .song-sidebar {
    flex: none;
  }

  .admin-menu {
    grid-template-columns: 1fr;
  }

  .admin-header {
    flex-direction: column;
    gap: 15px;
    align-items: flex-start;
  }

  .header-right {
    flex-direction: column;
    gap: 10px;
  }

  .theme-toggle {
    min-width: 50px;
    min-height: 32px;
    padding: 8px 12px;
    font-size: 14px;
  }

  .reference-grid {
    grid-template-columns: 1fr;
  }
}

/* Authentication Styles */
.error-message {
  background-color: var(--error-bg, #fee);
  color: var(--error-text, #c33);
  border: 1px solid var(--error-border, #fcc);
  border-radius: 4px;
  padding: 12px;
  margin-bottom: 20px;
  font-size: 14px;
  display: block;
}

[data-theme="dark"] .error-message {
  --error-bg: #2d1b1b;
  --error-text: #ff6b6b;
  --error-border: #553333;
}

.user-info {
  color: var(--text-primary);
  font-weight: 500;
  font-size: 14px;
  margin-right: 10px;
}

.logout-btn {
  background: var(--accent-primary);
  color: var(--bg-primary);
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.logout-btn:hover {
  background: var(--accent-secondary);
}

.nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

@media (max-width: 768px) {
  .nav {
    gap: 10px;
    flex-wrap: wrap;
  }

  .user-info {
    font-size: 12px;
    margin-right: 5px;
  }

  .logout-btn {
    padding: 4px 8px;
    font-size: 12px;
  }
}

/* Song Card Average Score Styles */
.song-card-header {
  position: relative;
  display: flex;
  align-items: flex-start;
}

.song-average-score {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--bg-primary);
  backdrop-filter: blur(4px);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  z-index: 2;
  opacity: 0.95;
}

.score-value {
  color: var(--accent-primary);
  font-weight: 700;
}

.score-separator {
  color: var(--text-secondary);
  margin: 0 1px;
}

.score-max {
  color: var(--text-secondary);
  font-weight: 500;
}

[data-theme="dark"] .song-average-score {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

@media (max-width: 768px) {
  .song-average-score {
    top: 4px;
    right: 4px;
    padding: 2px 6px;
    font-size: 11px;
  }
}

/* Song Page Score Styles */
.song-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
}

.song-titles {
  flex: 1;
}

.song-page-score {
  text-align: center;
  padding: 8px 12px;
  background: var(--bg-accent);
  border: 1px solid var(--accent-primary);
  border-radius: 8px;
  min-width: 70px;
  margin-left: 20px;
}

.score-main {
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 2px;
}

.score-main .score-value {
  color: var(--accent-primary);
  font-size: 18px;
}

.score-main .score-max {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
}

.score-subtitle {
  font-size: 10px;
  color: var(--text-secondary);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

@media (max-width: 768px) {
  .song-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .song-page-score {
    margin-left: 0;
    margin-top: 10px;
    align-self: flex-start;
    padding: 6px 10px;
    min-width: 60px;
  }

  .score-main {
    font-size: 14px;
  }

  .score-main .score-value {
    font-size: 16px;
  }

  .score-main .score-max {
    font-size: 12px;
  }

  .score-subtitle {
    font-size: 9px;
  }
}
