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;
}

/* Header container layout for side-by-side Latest Tracks and DJ Bio */
#header-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2em;
    margin-bottom: 1em;
    padding: 0;
}

/* Dark color scheme for tracks heading - expands by default */
#tracks-heading {
    color: #cccccc;
    margin: 0;
    flex-grow: 1;
    flex-shrink: 0;
    flex-basis: auto;
    font-size: 1.5em;
}

/* Dark color scheme for bio section - hidden by default */
#bio-section {
    display: none;
    flex-grow: 1;
    color: #cccccc;
    background-color: #2a2a2a;
    border-radius: 8px;
    padding: 1em;
    border: 1px solid #444;
}

/* Override bright blue colors in bio section for dark theme */
#bio-section .bio-title,
#bio-section .toggle-heading.active {
    color: #cccccc !important;
    background-color: #444 !important;
}

#bio-section .toggle-heading:hover {
    color: #ffffff !important;
    border-color: #666 !important;
}

/* Responsive design for header container */
@media (max-width: 768px) {
    #header-container {
        flex-direction: column;
        gap: 1em;
    }
    
    #tracks-heading {
        align-self: flex-start;
    }
    
    #bio-section {
        width: 100%;
    }
}

/* When DJ bio is active/visible */
#header-container.bio-active #tracks-heading {
    flex-grow: 0; /* Make tracks heading not expand when bio is visible */
}

#header-container.bio-active #bio-section {
    display: block !important; /* Show bio section when active */
}

#google-signin-button {
    cursor: pointer;
    background-color: #4285f4;
    color: white;
    padding: 10px 15px;
    border-radius: 5px;
    display: inline-block;
    margin-top: 10px;
}

/* 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;
}
/* MP3 Streaming Controls Styles */
.mp3-controls-placeholder {
    width: 100%;
    margin-top: 1em;
}

.mp3-player {
    display: flex;
    align-items: center;
    gap: 0.75em;
    padding: 0.75em;
    background: linear-gradient(135deg, #2a2a2a 0%, #1e1e1e 100%);
    border-radius: 8px;
    border: 1px solid #444;
}

.play-pause-btn {
    background: #222 !important;
    color: #00ccff !important;
    border: none !important;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    flex-shrink: 0;
}

.play-pause-btn:hover {
    background: #333 !important;
}

.play-pause-btn svg {
    width: 20px;
    height: 20px;
    fill: #00ccff;
}

.seek-bar {
    flex: 1;
    height: 6px;
    background: #444;
    border-radius: 3px;
    outline: none;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.seek-bar::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #00ccff;
    cursor: pointer;
    box-shadow: 0 0 4px rgba(0, 204, 255, 0.6);
}

.seek-bar::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #00ccff;
    cursor: pointer;
    border: none;
    box-shadow: 0 0 4px rgba(0, 204, 255, 0.6);
}

.time-display {
    font-size: 0.85em;
    color: #aaa;
    white-space: nowrap;
    min-width: 80px;
    text-align: center;
}

.volume-control {
    width: 60px;
    height: 6px;
    background: #444;
    border-radius: 3px;
    outline: none;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.volume-control::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #00ccff;
    cursor: pointer;
}

.volume-control::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #00ccff;
    cursor: pointer;
    border: none;
}

.player-error-message {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    color: #ff4444;
    font-size: 0.8em;
    background-color: rgba(255, 68, 68, 0.1);
    padding: 0.5em;
    border-radius: 4px;
    border-left: 3px solid #ff4444;
    margin-top: 0.5em;
    z-index: 10;
    display: none;
}

/* Responsive design for MP3 controls */
@media (max-width: 600px) {
    .mp3-player {
        flex-direction: column;
        gap: 0.5em;
        align-items: stretch;
    }
    
    .play-pause-btn {
        align-self: center;
        width: 36px;
        height: 36px;
    }
    
    .play-pause-btn svg {
        width: 18px;
        height: 18px;
    }
    
    .time-display {
        text-align: center;
        min-width: auto;
    }
    
    .volume-control {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .mp3-player {
        padding: 0.5em;
    }
    
    .time-display {
        font-size: 0.8em;
    }
}
/* DJ Bio Feature Styles */
#toggle-headings {
    display: flex;
    justify-content: center;
    gap: 2em;
    margin-bottom: 2em;
    border-bottom: 2px solid #444;
    padding-bottom: 1em;
}

.toggle-heading {
    cursor: pointer;
    padding: 0.5em 1em;
    margin: 0;
    color: #aaa;
    transition: color 0.3s ease, border-bottom 0.3s ease;
    border-bottom: 3px solid transparent;
    font-size: 1.2em;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

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

.toggle-heading.active {
    color: #00ccff;
    border-bottom-color: #00ccff;
}

/* Single heading mode when only one heading is visible */
#toggle-headings.single-heading-mode {
    justify-content: center;
}

#toggle-headings.single-heading-mode .toggle-heading {
    border-bottom-color: #00ccff;
    color: #00ccff;
}

/* Static heading styles when DJ Bio is hidden */
.toggle-heading.static-heading {
    cursor: default !important;
    pointer-events: none;
}

.toggle-heading.static-heading:hover {
    color: #00ccff !important;
}

#toggle-headings.single-heading-mode .toggle-heading.static-heading {
    border-bottom-color: #00ccff;
    color: #00ccff;
    cursor: default;
    pointer-events: none;
}

/* Content sections */
#content-container {
    position: relative;
    min-height: 400px;
}

.content-section {
    opacity: 0;
    visibility: hidden;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.content-section.active {
    opacity: 1;
    visibility: visible;
    position: relative;
}

/* DJ Bio specific styles */
#dj-bio {
    padding: 2em;
    background-color: #2a2a2a;
    border-radius: 8px;
    margin-bottom: 2em;
}

#bio-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 2em;
}

.bio-image {
    max-width: 300px;
    width: 100%;
    height: auto;
    border-radius: 8px;
    border: 2px solid #444;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.bio-text {
    font-size: 1.1em;
    line-height: 1.6;
    color: #ffffff;
    max-width: 800px;
}

/* Responsive design for DJ Bio */
@media (max-width: 768px) {
    #toggle-headings {
        flex-direction: column;
        gap: 1em;
        text-align: center;
    }
    
    .toggle-heading {
        font-size: 1em;
        padding: 0.75em;
    }
    
    #bio-content {
        padding: 1em;
        gap: 1.5em;
    }
    
    .bio-image {
        max-width: 250px;
    }
    
    .bio-text {
        font-size: 1em;
    }
}

@media (max-width: 480px) {
    #toggle-headings {
        gap: 0.5em;
    }
    
    .toggle-heading {
        font-size: 0.9em;
        padding: 0.5em;
        letter-spacing: 0.5px;
    }
    
    .bio-image {
        max-width: 200px;
    }
    
    .bio-text {
        font-size: 0.95em;
        line-height: 1.5;
    }
}