body {
    font-family: sans-serif;
    margin: 0;
    padding: 0;
    background-color: #1a1a1a;
    color: #ffffff;
}

header {
    background-color: #000000; /* Will be covered by video, but good fallback */
    padding: 1em 0;
    text-align: center;
    position: relative; /* Crucial for positioning the video */
    overflow: hidden; /* Prevents video overflow if aspect ratios differ */
    isolation: isolate; /* Add this line */
}

#header-background-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Cover the area, crop if needed */
    z-index: -1;       /* Place it behind other header content */
}

header h1 {
    position: relative;
    z-index: 1; /* Revert to 1 */
    color: #ffffff;
    text-shadow: 0px 0px 8px rgba(0, 0, 0, 0.7); /* Restore this */
}

main {
    padding: 1em;
    max-width: 800px;
    margin: auto;
}

section {
    margin-bottom: 2em;
    padding: 1em;
    background-color: #2a2a2a;
    border-radius: 8px;
}

h2 {
    color: #00ccff;
}

/* DJ Bio Feature Styles */
#toggle-headings {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1.5em;
    border-bottom: 1px solid #444;
    padding-bottom: 0.5em;
}

.toggle-heading {
    flex: 1;
    text-align: center;
    cursor: pointer;
    padding: 0.75em 1em;
    margin: 0 0.5em;
    border-radius: 8px;
    transition: all 0.3s ease;
    background-color: #333;
    border: 2px solid #444;
    color: #aaa;
    font-size: 1.1em;
    font-weight: bold;
}

.toggle-heading:hover {
    background-color: #444;
    color: #00ccff;
    border-color: #00ccff;
}

.toggle-heading.active {
    background-color: #00ccff;
    color: #000;
    border-color: #00ccff;
    box-shadow: 0 0 10px rgba(0, 204, 255, 0.3);
}

#toggle-content {
    transition: opacity 0.5s ease;
    opacity: 1;
    min-height: 200px;
}

#toggle-content.fade-out {
    opacity: 0;
    pointer-events: none;
}

/* DJ Bio Content Styles */
.bio-item {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    position: relative;
    min-height: 140px;
    background: transparent;
    border: 1px solid #444;
    border-radius: 8px;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #2a2a2a 0%, #1e1e1e 100%);
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    padding: 15px;
}

.bio-content-wrapper {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    width: 100%;
    margin-bottom: 15px;
}

.bio-image {
    flex-shrink: 0;
    margin-right: 15px;
}

.bio-image img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #444;
}

.bio-text {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: center;
    min-width: 0;
}

.bio-text .bio-title {
    font-size: 1.2em;
    font-weight: bold;
    margin-top: 0;
    margin-bottom: 8px;
    color: #00ccff;
}

.bio-text .bio-description {
    font-size: 1em;
    color: #ffffff;
    line-height: 1.5;
    margin: 0;
}

/* Responsive design for bio content */
@media (max-width: 600px) {
    #toggle-headings {
        flex-direction: column;
        gap: 0.5em;
    }
    
    .toggle-heading {
        margin: 0;
        font-size: 1em;
    }
    
    .bio-content-wrapper {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .bio-image {
        margin-right: 0;
        margin-bottom: 15px;
    }
    
    .bio-image img {
        width: 60px;
        height: 60px;
    }
}

/* EXACT CSS FROM test_minimal_player.html - Lines 9-168 */
.track-item {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  position: relative;
  min-height: 140px;
  background: transparent;
  border: 1px solid #444;
  border-radius: 8px;
  margin-bottom: 20px;
  background: linear-gradient(135deg, #2a2a2a 0%, #1e1e1e 100%);
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  padding: 15px;
}
.track-info {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  justify-content: center;
  min-width: 0;
}
.minimal-media-player {
  width: 100%;
  margin-top: 1em;
  margin-bottom: 0;
  align-self: stretch;
  border-radius: 0 0 8px 8px;
  box-shadow: none;
  background: transparent;
  border: none;
  padding: 0.5em 0 0 0;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.75em;
}
.minimal-toggle-button {
  margin: 0 0.5em 0 0;
  background: #222 !important;
  color: #00ccff !important;
  border: none !important;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 2px #111, 0 2px 8px rgba(0,0,0,0.2);
  transition: background 0.2s, color 0.2s, border 0.2s;
  cursor: pointer;
  outline: none;
  font-size: 0;
  padding: 0 !important;
}
.minimal-toggle-button::before,
.minimal-toggle-button::after {
  display: none !important;
  content: none !important;
}
.minimal-toggle-button:focus {
  outline: 2px solid #00ccff;
}
.minimal-toggle-button svg {
  width: 24px;
  height: 24px;
  display: block;
}
.minimal-toggle-button .material-icon {
  fill: #00ccff;
  width: 24px;
  height: 24px;
  display: block;
}
.minimal-toggle-button.pause .material-icon {
  fill: #00ccff;
}
.minimal-progress-bar {
  flex: 1;
  width: 100%;
  margin: 0;
  height: 6px;
  background: #222;
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}
.minimal-progress-filled {
  height: 100%;
  background: linear-gradient(90deg, #00ccff 0%, #0099cc 100%);
  width: 0%;
  transition: width 0.1s linear;
  border-radius: 3px;
  box-shadow: 0 0 4px rgba(0, 204, 255, 0.6);
}
@media (max-width: 900px) {
  .track-item {
    flex-direction: column;
    align-items: stretch;
  }
  .minimal-media-player {
    position: static;
    padding-left: 0;
    padding-right: 0;
  }
}
/* Ensure track content (album art + track info) stays in row layout */
.track-content {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  width: 100%;
  margin-bottom: 15px;
}

/* Album art styles */
.album-art {
  flex-shrink: 0;
  margin-right: 15px;
}

.album-art img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid #444;
}

@media (max-width: 600px) {
  .album-art img {
    width: 60px;
    height: 60px;
  }
}

/* Override external CSS button styles for minimal toggle button */
.minimal-toggle-button {
  background-color: #222 !important;
  color: #00ccff !important;
  padding: 0 !important;
  margin: 0 0.5em 0 0 !important;
  border-radius: 50% !important;
  font-size: 0 !important;
}
.minimal-toggle-button:hover {
  background-color: #333 !important;
  color: #00ccff !important;
}
@media (max-width: 600px) {
  .track-item {
    min-height: 120px;
  }
  .minimal-toggle-button {
    width: 28px;
    height: 28px;
  }
  .minimal-toggle-button svg {
    width: 18px;
    height: 18px;
  }
  .minimal-progress-bar {
    height: 4px;
  }
}



.track-info .artist-title {
    font-size: 1.2em;
    font-weight: bold;
    margin-top: 0;
    margin-bottom: 8px;
    color: #ffffff;
}

.track-info .artist {
    color: #00ccff;
}

.track-info .title {
    color: #ffffff;
}

.track-info .meta-info {
    font-size: 0.9em;
    color: #aaa;
    margin-top: 0;
    margin-bottom: 10px;
}

.track-info .meta-info span:not(:last-child)::after {
    content: " || "; /* Separator */
    margin: 0 3px;
}

.track-info .download-link {
    font-size: 0.9em;
    text-decoration: none !important;
    text-decoration-line: none !important;
    text-decoration-style: none !important;
    text-decoration-color: transparent !important;
    color: #00ccff;
    align-self: flex-start;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

.track-info .download-link:hover {
    text-decoration: underline !important;
}

.track-info .download-link:link,
.track-info .download-link:visited,
.track-info .download-link:active,
.track-info .download-link:focus {
    text-decoration: none !important;
    text-decoration-line: none !important;
    text-decoration-style: none !important;
    text-decoration-color: transparent !important;
    border: none !important;
    outline: none !important;
}

/* Error message for minimal player */
.minimal-error-message {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    color: #ff4444;
    font-size: 0.7em;
    background-color: rgba(255, 68, 68, 0.1);
    padding: 0.25em 0.5em;
    border-radius: 3px;
    border-left: 2px solid #ff4444;
    margin-top: 0.25em;
    z-index: 10;
}

.minimal-progress-bar:hover {
    background-color: #3a3a3a;
    border-color: rgba(0, 204, 255, 0.4);
}

#posts-list {
    margin-top: 1em;
}

footer {
    text-align: center;
    padding: 1em 0;
    background-color: #000000;
    margin-top: 2em;
}

/* Admin Interface Styles */
.form-group {
    margin-bottom: 1em;
}

.form-group label {
    display: block;
    margin-bottom: 0.5em;
    color: #00ccff;
}

.form-group input {
    width: 100%;
    padding: 0.5em;
    border: 1px solid #555;
    border-radius: 4px;
    background-color: #333;
    color: #fff;
    box-sizing: border-box;
}

.form-group small {
    display: block;
    text-align: center;
    margin: 0.5em 0;
    color: #aaa;
}

button {
    background-color: #00ccff;
    color: #000;
    border: none;
    padding: 0.5em 1em;
    border-radius: 4px;
    cursor: pointer;
    margin: 0.25em;
}

button:hover {
    background-color: #0099cc;
}

#logout-button {
    background-color: #ff4444;
    color: #fff;
}

#logout-button:hover {
    background-color: #cc3333;
}

.admin-buttons {
    margin-top: 1em;
    padding-top: 1em;
    border-top: 1px solid #555;
}

.edit-button {
    background-color: #ffaa00;
    color: #000;
}

.edit-button:hover {
    background-color: #cc8800;
}

.delete-button {
    background-color: #ff4444;
    color: #fff;
}

.delete-button:hover {
    background-color: #cc3333;
}

.status {
    padding: 0.5em;
    border-radius: 4px;
    margin-top: 1em;
}

.status.success {
    background-color: #004400;
    color: #00ff00;
    border: 1px solid #00aa00;
}

.status.error {
    background-color: #440000;
    color: #ff4444;
    border: 1px solid #aa0000;
}

.post {
    background-color: #333;
    padding: 1em;
    margin-bottom: 1em;
    border-radius: 8px;
    border: 1px solid #555;
}

.post h3 {
    margin-top: 0;
    color: #00ccff;
}

/* Pagination Styles */
#pagination-controls {
    margin-top: 2em;
    padding: 1em 0;
    border-top: 1px solid #555;
    display: none; /* Hidden by default, shown by JavaScript when needed */
}

#pagination-controls.visible {
    display: flex;
    flex-direction: column;
}

/* Ensure that inline style display: none always takes precedence */
#pagination-controls[style*="display: none"] {
    display: none !important;
}

.pagination-info {
    text-align: center;
    margin-bottom: 1em;
    color: #aaa;
    font-size: 0.9em;
}

.pagination-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5em;
    flex-wrap: wrap;
}

.pagination-btn {
    background-color: #00ccff;
    color: #000;
    border: none;
    padding: 0.5em 1em;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
    min-width: 80px;
}

.pagination-btn:hover:not(:disabled) {
    background-color: #0099cc;
}

.pagination-btn:disabled {
    background-color: #555;
    color: #999;
    cursor: not-allowed;
}

#page-numbers {
    display: flex;
    gap: 0.25em;
    align-items: center;
}

.page-number-btn {
    background-color: #333;
    color: #fff;
    border: 1px solid #555;
    padding: 0.5em 0.75em;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
    min-width: 40px;
    text-align: center;
}

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

.page-number-btn.active {
    background-color: #00ccff;
    color: #000;
    border-color: #00ccff;
}

.page-ellipsis {
    color: #aaa;
    padding: 0.5em 0.25em;
    font-size: 0.9em;
}