/* MP3 Song Voting Styles */

.mp3-song-voting-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Ecommerce Purchase Buttons */
.purchase-buttons-container {
    text-align: center;
    margin-top: 20px;
    padding: 20px;
    background: linear-gradient(135deg, #f9f9f9 0%, #f0f0f0 100%);
    border-radius: 12px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.purchase-buttons-container h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
    font-size: 18px;
    font-weight: 600;
}

.purchase-song-btn, .subscribe-btn {
    background: linear-gradient(135deg, #0073aa 0%, #005a87 100%);
    color: white;
    padding: 12px 24px;
    margin: 8px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    min-width: 200px;
}

.purchase-song-btn:hover, .subscribe-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    background: linear-gradient(135deg, #005a87 0%, #004666 100%);
}

.subscribe-btn {
    background: linear-gradient(135deg, #d63638 0%, #b52d2f 100%);
}

.subscribe-btn:hover {
    background: linear-gradient(135deg, #b52d2f 0%, #942426 100%);
}

.purchase-song-btn:disabled, .subscribe-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.purchase-buttons-container p {
    margin-bottom: 0;
    color: #666;
    font-size: 14px;
    margin-top: 15px;
}

/* Preview mode indicator */
.preview-mode-indicator {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 6px;
    padding: 10px;
    margin: 10px 0;
    text-align: center;
    color: #856404;
    font-size: 14px;
}

.preview-timer {
    font-weight: bold;
    color: #d63638;
}

/* Enhanced Mobile Responsive Fixes for Auto-cycle Controls */
@media (max-width: 768px) {
    .cover-flow-container {
        height: 350px;
    }

    .cover-item {
        width: 150px;
        height: 150px;
    }

    .cover-item.center {
        width: 220px;
        height: 220px;
    }

    .mp3-song-upload {
        padding: 15px;
    }

    /* Enhanced autoplay controls alignment on mobile */
    .player-options {
        margin-top: 15px;
        text-align: center;
        padding: 0 15px; /* Increased padding for better spacing */
        box-sizing: border-box;
        display: flex;
        justify-content: center;
        align-items: center;
        min-height: 44px; /* Minimum touch target size */
    }

    .auto-cycle-container {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        max-width: calc(100% - 30px); /* Account for padding */
        width: auto;
        margin: 0 auto;
        padding: 10px 15px; /* Larger padding for easier touch */
        font-size: 14px;
        box-sizing: border-box;
        border-radius: 20px; /* More rounded for mobile */
        background-color: rgba(0, 0, 0, 0.08);
        transition: all 0.3s ease;
        min-height: 44px; /* iOS recommended touch target */
    }

    .auto-cycle-container:hover,
    .auto-cycle-container:active {
        background-color: rgba(0, 0, 0, 0.12);
        transform: scale(1.02);
    }

    .auto-cycle-label {
        font-size: 14px; /* Consistent size on mobile */
        white-space: nowrap;
        font-weight: 500;
        color: #333;
    }

    .auto-cycle-container input[type="checkbox"] {
        margin-right: 10px; /* Increased spacing */
        transform: scale(1.2); /* Larger checkbox for easier tapping */
        cursor: pointer;
    }

    .purchase-song-btn, .subscribe-btn {
        display: block;
        width: 100%;
        margin: 8px 0;
        min-width: auto;
    }

    .purchase-buttons-container {
        padding: 15px;
        margin-top: 15px;
    }

    .purchase-buttons-container h3 {
        font-size: 16px;
    }
}

/* Additional fixes for very small screens */
@media (max-width: 480px) {
    .player-options {
        margin-top: 12px;
        padding: 0 10px;
    }

    .auto-cycle-container {
        padding: 8px 12px;
        font-size: 13px;
        max-width: calc(100% - 20px);
        min-height: 40px;
    }

    .auto-cycle-label {
        font-size: 13px;
    }

    .auto-cycle-container input[type="checkbox"] {
        margin-right: 8px;
        transform: scale(1.1);
    }
}

/* Fix for landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .player-options {
        margin-top: 10px;
    }

    .auto-cycle-container {
        padding: 6px 12px;
        min-height: 36px;
    }
}

/* Ensure proper touch targets and accessibility */
@media (hover: none) and (pointer: coarse) {
    /* This targets touch devices */
    .auto-cycle-container {
        min-height: 44px;
        padding: 10px 16px;
    }

    .auto-cycle-container input[type="checkbox"] {
        min-width: 20px;
        min-height: 20px;
    }
}

/* Touch feedback for mobile */
.auto-cycle-container.touching {
    background-color: rgba(0, 0, 0, 0.15);
    transform: scale(0.98);
}

/* Focus styles for accessibility */
.auto-cycle-container:focus-within {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

.auto-cycle-container input[type="checkbox"]:focus {
    outline: none; /* Remove default since container handles it */
}

/* Cover Flow Styles */
.cover-flow-container {
    position: relative;
    height: 400px;
    margin-bottom: 40px;
}

.cover-flow-wrapper {
    position: relative;
    height: 100%;
    perspective: 1200px;
}

.cover-item {
    position: absolute;
    width: 200px;
    height: 200px;
    left: 50%;
    top: 50%;
    transition: all 0.5s ease;
    opacity: 0;
    transform: translateX(-50%) translateY(-50%) translateZ(-200px);
    cursor: pointer;
    overflow: hidden; /* Prevent content from spilling outside */
}

/* Make center item larger */
.cover-item.center {
    width: 300px;
    height: 300px;
    z-index: 5;
}

.cover-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* Enhanced styling for center album artwork */
.cover-item.center img {
    border-radius: 12px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.3);
    border: 2px solid rgba(255,255,255,0.2);
}

.cover-item.center {
    opacity: 1;
    transform: translateX(-50%) translateY(-50%) translateZ(50px);
    /* z-index is now set in the .cover-item.center rule above */
}

.cover-item.left-1 {
    opacity: 0.7;
    transform: translateX(-170%) translateY(-50%) translateZ(-120px) rotateY(40deg);
    z-index: 2;
}

.cover-item.left-2 {
    opacity: 0.4;
    transform: translateX(-270%) translateY(-50%) translateZ(-220px) rotateY(55deg);
    z-index: 1;
}

.cover-item.right-1 {
    opacity: 0.7;
    transform: translateX(70%) translateY(-50%) translateZ(-120px) rotateY(-40deg);
    z-index: 2;
}

.cover-item.right-2 {
    opacity: 0.4;
    transform: translateX(170%) translateY(-50%) translateZ(-220px) rotateY(-55deg);
    z-index: 1;
}

.cover-flow-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    border-radius: 4px;
}

.cover-flow-nav.prev { left: 20px; }
.cover-flow-nav.next { right: 20px; }

.cover-flow-nav:hover {
    background-color: rgba(0, 0, 0, 0.7);
}

/* Visual indicator for auto-cycling */
.cover-flow-nav.auto-cycling {
    background-color: rgba(0, 115, 170, 0.7);
    box-shadow: 0 0 10px rgba(0, 115, 170, 0.7);
    transform: scale(1.1);
    transition: all 0.3s ease;
}

/* Player Section */
.player-section {
    text-align: center;
    margin-bottom: 30px;
}

.song-info {
    margin-bottom: 15px;
}

.current-title {
    margin: 0;
    font-size: 24px;
}

.current-artist {
    margin: 5px 0;
    color: #666;
}

/* Song description styles */
.song-description-container {
    margin: 15px 0;
    position: relative;
    border-top: 1px solid #eee;
    padding-top: 10px;
}

.read-more-link {
    display: none; /* Hidden by default */
    color: #0073aa;
    text-decoration: none;
    font-size: 16px;
    margin: 5px 0;
    transition: color 0.2s;
    cursor: pointer;
    font-weight: 500;
    background-color: transparent;
    border: none;
    padding: 0;
    text-align: left;
}

/* Only when explicitly shown via JavaScript */
.read-more-link.visible {
    display: inline-block !important;
}

.read-more-link:hover {
    color: #005177;
    text-decoration: underline;
}

.song-description {
    background-color: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 15px;
    margin-top: 10px;
    line-height: 1.6;
    color: #333;
    max-height: 500px; /* Increased height to accommodate embedded content */
    overflow-y: auto;
    font-size: 14px;
    word-wrap: break-word;
    text-align: left !important; /* Force left alignment */
}

/* Ensure all paragraphs in the description are left-aligned */
.song-description p,
.song-description div,
.song-description span,
.song-description a {
    text-align: left !important;
}

/* Styles for embedded content in descriptions */
.song-description iframe {
    max-width: 100%;
    margin: 10px 0;
    border: none;
    display: block;
}

.song-description .wp-block-embed,
.song-description .wp-embed {
    margin: 15px 0;
}

.song-description .wp-block-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    grid-gap: 10px;
    margin: 15px 0;
}

.song-description .wp-caption {
    max-width: 100%;
    margin: 15px 0;
}

.song-description .wp-caption-text {
    font-style: italic;
    font-size: 0.9em;
    text-align: center;
    margin-top: 5px;
}

/* YouTube embeds */
.song-description .wp-block-embed-youtube iframe,
.song-description .embed-youtube iframe,
.song-description iframe[src*="youtube.com"],
.song-description iframe[src*="youtu.be"] {
    width: 100%;
    aspect-ratio: 16/9;
    height: auto;
    min-height: 200px;
}

/* Make sure the description is visible when shown */
.song-description.visible {
    display: block !important;
}

.song-description a {
    color: #0073aa;
    text-decoration: none;
}

.song-description a:hover {
    text-decoration: underline;
}

.song-description img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 10px 0;
}

audio {
    width: 100%;
    max-width: 500px;
    margin: 15px 0;
}

.voting-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.voting-buttons button {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    padding: 10px 18px;
    border-radius: 20px;
    transition: all 0.2s ease;
}

.like-button {
    color: #4CAF50;
    box-shadow: 0 2px 5px rgba(76, 175, 80, 0.2);
}

.like-button:hover {
    background-color: rgba(76, 175, 80, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(76, 175, 80, 0.3);
}

.like-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 3px rgba(76, 175, 80, 0.2);
}

.dislike-button {
    color: #F44336;
    box-shadow: 0 2px 5px rgba(244, 67, 54, 0.2);
}

.dislike-button:hover {
    background-color: rgba(244, 67, 54, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(244, 67, 54, 0.3);
}

.dislike-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 3px rgba(244, 67, 54, 0.2);
}

.voting-buttons .icon {
    font-size: 24px; /* Larger icon size */
}

.voting-buttons .count {
    font-weight: bold;
    font-size: 20px; /* Slightly larger count text */
}

/* Auto-cycle checkbox styling */
.player-options {
    margin-top: 15px;
    text-align: center;
}

.auto-cycle-container {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    padding: 5px 10px;
    border-radius: 15px;
    background-color: rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

.auto-cycle-container:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

.auto-cycle-container input[type="checkbox"] {
    margin-right: 8px;
    cursor: pointer;
}

.auto-cycle-container input[type="checkbox"]:focus {
    outline: none;
}

.auto-cycle-label {
    font-size: 14px;
    color: #555;
}

/* Visual indicator for next song when auto-cycle is enabled */
.cover-item.right-1.next-up {
    box-shadow: 0 0 15px rgba(0, 115, 170, 0.7);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 15px rgba(0, 115, 170, 0.7); }
    50% { box-shadow: 0 0 25px rgba(0, 115, 170, 0.9); }
    100% { box-shadow: 0 0 15px rgba(0, 115, 170, 0.7); }
}

/* Song List */
.song-list {
    max-width: 800px;
    margin: 0 auto;
}

.song-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.song-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #eee;
}

.vote-counts {
    display: flex;
    gap: 15px;
}

.vote-counts span {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Upload Form Styling */
.mp3-song-upload {
    margin-top: 40px;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.mp3-song-upload h3 {
    margin-top: 0;
    margin-bottom: 20px;
    text-align: center;
    color: #333;
}

.mp3-song-upload .form-group {
    margin-bottom: 15px;
}

.mp3-song-upload label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.mp3-song-upload input[type="text"] {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

.mp3-song-upload button {
    background-color: #0073aa;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.mp3-song-upload button:hover {
    background-color: #005177;
}

.mp3-song-upload button[type="submit"] {
    display: block;
    width: 100%;
    padding: 10px;
    font-size: 16px;
    margin-top: 10px;
}

.mp3-song-upload .artwork-preview {
    text-align: center;
    margin-bottom: 15px;
}

.mp3-song-upload .artwork-preview img {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 3px;
    background-color: white;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .cover-flow-container {
        height: 350px;
    }

    .cover-item {
        width: 150px;
        height: 150px;
    }

    .cover-item.center {
        width: 220px;
        height: 220px;
    }
	
	/* Add the fix here */
    .cover-item.next-up {
        box-shadow: none !important;
        animation: none !important;
    }

    .mp3-song-upload {
        padding: 15px;
    }

    /* Fix autoplay controls alignment on mobile */
    .player-options {
        margin-top: 15px;
        text-align: center;
        padding: 0 10px; /* Add padding to prevent edge overflow */
        box-sizing: border-box;
    }

    .auto-cycle-container {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        max-width: 100%;
        width: auto;
        margin: 0 auto;
        padding: 8px 12px; /* Slightly larger padding for easier touch */
        font-size: 14px;
        box-sizing: border-box;
    }

    .auto-cycle-label {
        font-size: 13px; /* Slightly smaller text on mobile */
        white-space: nowrap; /* Prevent text wrapping */
    }
}

/* End of styles */

/* Responsive adjustments */
@media (max-width: 768px) {
    .mp3-song-players {
        flex-direction: column;
    }

    .mp3-player {
        min-width: auto;
    }

    .mp3-song-list li {
        flex-wrap: wrap;
    }

    .song-title, .song-artist {
        flex: 1 1 100%;
        margin-bottom: 5px;
    }

    .song-votes {
        width: auto;
        margin-right: 10px;
    }

    .song-actions {
        margin-left: auto;
    }
}

/* Additional mobile fixes for very small screens */
@media (max-width: 480px) {
    .player-options {
        margin-top: 10px;
        padding: 0 5px;
    }

    .auto-cycle-container {
        padding: 6px 10px;
        font-size: 13px;
    }

    .auto-cycle-label {
        font-size: 12px;
    }

    .auto-cycle-container input[type="checkbox"] {
        margin-right: 6px;
        transform: scale(0.9); /* Slightly smaller checkbox on very small screens */
    }
}

/* Hide all debug elements by default */
.audio-debug,
.description-debug,
.description-debug-info,
.play-count-debug,
.debug-description-button,
.admin-actions,
.alternative-player,
.audio-debug-info,
.toggle-debug-button,
#description-debug-panel,
.description-debug-content {
    display: none !important;
}

/* Only show debug elements when debug mode is enabled via body class */
body.mp3-debug-mode .audio-debug,
body.mp3-debug-mode .description-debug,
body.mp3-debug-mode .description-debug-info,
body.mp3-debug-mode .play-count-debug,
body.mp3-debug-mode .debug-description-button,
body.mp3-debug-mode .admin-actions,
body.mp3-debug-mode .alternative-player,
body.mp3-debug-mode .audio-debug-info,
body.mp3-debug-mode .toggle-debug-button,
body.mp3-debug-mode #description-debug-panel,
body.mp3-debug-mode .description-debug-content {
    display: block !important;
}

/* Debug styles when enabled */
body.mp3-debug-mode .audio-debug {
    margin-top: 20px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #f9f9f9;
    font-family: monospace;
    font-size: 14px;
    line-height: 1.5;
}

body.mp3-debug-mode .audio-debug p {
    margin-top: 0;
    font-weight: bold;
}

body.mp3-debug-mode .audio-debug-info {
    margin-top: 10px;
    white-space: pre-wrap;
    word-break: break-all;
}

body.mp3-debug-mode .toggle-debug-button {
    margin-top: 10px;
}

/* Ensure debug elements don't affect layout when hidden */
.audio-debug,
.description-debug,
.description-debug-info,
.play-count-debug {
    position: relative;
    z-index: 1;
}

/* Admin styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
    background-color: #fefefe;
    margin: 10% auto;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    width: 80%;
    max-width: 600px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
}

.form-actions {
    margin-top: 20px;
    text-align: right;
}

.form-actions button {
    margin-left: 10px;
}

.artwork-preview {
    margin-top: 10px;
    text-align: center;
}

.tab-content {
    margin-top: 20px;
}

/* Play Count Styles */
.play-count {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #666;
    font-size: 14px;
    margin-left: 15px;
}

.play-count .icon {
    font-size: 12px;
}

.play-count .label {
    font-size: 12px;
    color: #888;
}

/* Comments Section */
.song-comments-section {
    margin-top: 30px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.song-comments-section h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 18px;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 8px;
}

.add-comment {
    margin-bottom: 20px;
}

.add-comment textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: vertical;
    font-family: inherit;
    margin-bottom: 10px;
    box-sizing: border-box;
}

.add-comment button {
    padding: 8px 16px;
    background: #0073aa;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.add-comment button:hover {
    background: #005177;
}

.login-prompt {
    text-align: center;
    padding: 15px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 20px;
}

.login-prompt a {
    color: #0073aa;
    text-decoration: none;
    font-weight: 600;
}

.login-prompt a:hover {
    text-decoration: underline;
}

.comment-item {
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 10px;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 12px;
    color: #666;
}

.comment-author {
    font-weight: 600;
    color: #333;
}

.comment-date {
    color: #888;
}

.comment-text {
    color: #333;
    line-height: 1.5;
    text-align: left !important;
}

.comment-actions {
    margin-top: 8px;
    text-align: right;
}

.delete-comment {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    font-size: 12px;
    text-decoration: underline;
}

.delete-comment:hover {
    color: #a71e2a;
}

.loading-comments {
    text-align: center;
    padding: 20px;
    color: #666;
    font-style: italic;
}

.no-comments {
    text-align: center;
    padding: 20px;
    color: #888;
    font-style: italic;
}

/* Rankings Table Play Count */
.plays-column {
    width: 60px;
    text-align: center;
}

.play-count-display {
    font-weight: 600;
    color: #0073aa;
    background: #e6f3ff;
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
    min-width: 30px;
}

/* Guest Comment Form */
.guest-comment .guest-info {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.guest-comment .guest-info input {
    flex: 1;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    box-sizing: border-box;
}

.guest-comment .guest-info input:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 1px #0073aa;
}

.guest-comment .guest-note {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
    margin-bottom: 0;
    font-style: italic;
}

/* Branding */
.mp3-brand-logo {
    text-align: center;
    margin-bottom: 20px;
}

.mp3-brand-logo img {
    max-width: 300px;
    max-height: 150px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
}

.mp3-brand-logo img:hover {
    transform: scale(1.02);
}

/* Clickable logo styling */
.mp3-brand-logo a {
    display: inline-block;
    text-decoration: none;
    border: none;
    outline: none;
}

.mp3-brand-logo a:hover img {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.mp3-brand-logo a:focus img {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* Rankings page logo */
.mp3-brand-logo.rankings-logo {
    margin-bottom: 30px;
    padding: 20px 0;
    border-bottom: 1px solid #eee;
}

.mp3-brand-logo.rankings-logo img {
    max-width: 250px;
    max-height: 125px;
}

/* Admin Logo Upload Interface */
.brand-logo-upload {
    max-width: 400px;
}

.brand-logo-upload .logo-preview {
    margin-bottom: 10px;
}

.brand-logo-upload .logo-preview img {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 5px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.brand-logo-upload .button {
    margin-right: 10px;
}

.brand-logo-upload .description {
    margin-top: 10px;
    font-style: italic;
    color: #666;
}

/* Rankings Expandable Sections */
.description-column,
.comments-column {
    width: 60px;
    text-align: center;
}

.expand-description,
.expand-comments {
    background: none;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 12px;
    color: #666;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.expand-description:hover,
.expand-comments:hover {
    background: #f0f0f0;
    border-color: #0073aa;
    color: #0073aa;
}

.expand-description.expanded,
.expand-comments.expanded {
    background: #0073aa;
    color: white;
    border-color: #0073aa;
}

.no-content {
    color: #ccc;
    font-size: 14px;
}

.description-row,
.comments-row {
    background: #f8f9fa;
    border-top: 2px solid #0073aa;
}

.description-content,
.comments-content {
    padding: 20px;
    margin: 0;
}

.description-content h4,
.comments-content h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 16px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 8px;
}

.description-text {
    background: white;
    padding: 15px;
    border-radius: 4px;
    border: 1px solid #ddd;
    line-height: 1.6;
    color: #333;
}

.description-text p {
    margin-bottom: 10px;
}

.description-text p:last-child {
    margin-bottom: 0;
}

.description-text img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 10px 0;
}

.description-text a {
    color: #0073aa;
    text-decoration: none;
}

.description-text a:hover {
    text-decoration: underline;
}

/* YouTube and other embeds in rankings descriptions */
.description-text iframe {
    max-width: 100%;
    height: auto;
    min-height: 200px;
    border: none;
    border-radius: 4px;
    margin: 10px 0;
}

.description-text .wp-block-embed,
.description-text .wp-embed {
    margin: 15px 0;
    max-width: 100%;
}

.description-text .wp-block-embed iframe,
.description-text .wp-embed iframe {
    width: 100%;
    aspect-ratio: 16/9;
    height: auto;
    min-height: 200px;
}

/* YouTube specific embeds */
.description-text iframe[src*="youtube.com"],
.description-text iframe[src*="youtu.be"] {
    width: 100%;
    aspect-ratio: 16/9;
    height: auto;
    min-height: 200px;
    max-height: 400px;
}

.comments-list {
    background: white;
    border-radius: 4px;
    border: 1px solid #ddd;
    max-height: 400px;
    overflow-y: auto;
}

.ranking-comment-item {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
}

.ranking-comment-item:last-child {
    border-bottom: none;
}

.ranking-comment-item .comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
    font-size: 12px;
}

.ranking-comment-item .comment-author {
    color: #333;
    font-weight: 600;
}

.ranking-comment-item .comment-date {
    color: #888;
}

.ranking-comment-item .comment-text {
    color: #555;
    line-height: 1.4;
    font-size: 14px;
    text-align: left !important;
}

.comments-list .loading-comments,
.comments-list .no-comments,
.comments-list .error {
    padding: 20px;
    text-align: center;
    color: #666;
    font-style: italic;
}

.comments-list .error {
    color: #d63384;
}

/* Mobile responsive adjustments for guest comments */
@media (max-width: 768px) {
    .guest-comment .guest-info {
        flex-direction: column;
        gap: 8px;
    }

    .mp3-brand-logo img {
        max-width: 250px;
        max-height: 120px;
    }

    .mp3-brand-logo.rankings-logo img {
        max-width: 200px;
        max-height: 100px;
    }

    .mp3-brand-logo a:hover img {
        transform: scale(1.03);
    }

    .description-column,
    .comments-column {
        width: 50px;
    }

    .expand-description,
    .expand-comments {
        padding: 2px 4px;
        font-size: 11px;
    }

    .expand-description .expand-text {
        display: none;
    }

    .description-content,
    .comments-content {
        padding: 15px;
    }

    .description-content h4,
    .comments-content h4 {
        font-size: 14px;
    }
}

/* Video Player Styles in Cover Flow */
.cover-video-container {
    position: absolute;
    background: #000;
    border-radius: 8px;
    overflow: visible;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.cover-video-player {
    border-radius: 8px;
    display: block;
    object-fit: cover; /* Fill the exact dimensions we set */
}

/* Video display rules */

/* Always show artwork for video thumbnails (non-center items) */
.cover-item .cover-artwork {
    display: block;
    position: relative;
    z-index: 1;
}

/* Hide artwork only when video is playing in center */
.cover-item.center.playing-video .cover-artwork {
    display: none !important;
}

/* Video containers are hidden by default */
.cover-video-container {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
}

/* Show video container when playing video in center */
.cover-item.center.playing-video .cover-video-container {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

/* Allow center video to extend beyond normal bounds */
.cover-item.center.playing-video {
    overflow: visible;
    z-index: 15;
    position: relative;
}

/* Ensure the cover flow can handle larger videos */
.cover-flow-container {
    overflow: visible;
}

.cover-flow-wrapper {
    overflow: visible;
}

/* Show fullscreen button only for center video */
.cover-item.center.playing-video .center-video-fullscreen-btn {
    display: block !important;
}

/* Video indicator overlay for thumbnails */
.video-indicator-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    border-radius: 8px;
    pointer-events: none;
}

.video-play-icon {
    color: white;
    font-size: 24px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Hide video indicator when video is playing in center */
.cover-item.center.playing-video .video-indicator-overlay {
    display: none;
}

/* Fullscreen button for center video */
.center-video-fullscreen-btn {
    position: absolute !important;
    top: 10px !important;
    right: 10px !important;
    z-index: 20 !important;
    background: rgba(0,0,0,0.3) !important; /* Semi-transparent dark background */
    color: white !important;
    border: 1px solid rgba(255,255,255,0.5) !important; /* Semi-transparent white border */
    padding: 8px 12px !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    font-size: 14px !important;
    font-weight: normal !important;
    backdrop-filter: blur(2px) !important; /* Subtle blur effect */
    transition: all 0.3s ease !important;
}

/* Hover effect for better visibility when needed */
.cover-item.center.playing-video .center-video-fullscreen-btn:hover {
    background: rgba(0,0,0,0.6) !important;
    border: 1px solid rgba(255,255,255,0.8) !important;
    transform: scale(1.05) !important;
}

/* Fullscreen button in fullscreen mode */
.cover-item.mp3-video-fullscreen .center-video-fullscreen-btn {
    position: fixed !important;
    top: 20px !important;
    right: 20px !important;
    z-index: 10000 !important;
}

/* Fullscreen video styles */
.cover-item.mp3-video-fullscreen {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 9999 !important;
    background: #000 !important;
    transform: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.cover-item.mp3-video-fullscreen .cover-video-container {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    transform: none !important;
    width: 100vw !important;
    height: 100vh !important;
    border-radius: 0 !important;
    background: #000 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.cover-item.mp3-video-fullscreen .cover-video-player {
    max-width: 100vw !important;
    max-height: 100vh !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    border-radius: 0 !important;
}

/* Hide body scroll when video is fullscreen */
body.video-fullscreen-active {
    overflow: hidden;
}

/* Video indicator overlay */
.video-indicator-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    pointer-events: none;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.video-play-icon {
    font-size: 48px;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    transform: translateX(3px); /* Slight offset to center the triangle */
}

/* Hide video indicator when video is playing in center */
.cover-item.center.playing-video .video-indicator-overlay {
    display: none;
}

/* Smaller video indicator for side items */
.cover-item:not(.center) .video-play-icon {
    font-size: 24px;
}

/* Hover effect for video indicators */
.cover-item:hover .video-indicator-overlay {
    opacity: 1;
    background: rgba(0, 0, 0, 0.5);
}

.video-fullscreen-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    z-index: 10;
    transition: background-color 0.3s ease;
}

.video-fullscreen-btn:hover {
    background: rgba(0, 0, 0, 0.9);
}

/* Fullscreen video styles */
.mp3-video-fullscreen {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 9999 !important;
    background: #000 !important;
    border-radius: 0 !important;
    margin: 0 !important;
    max-width: none !important;
}

.mp3-video-fullscreen #mp3-video-player {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain;
}

.mp3-video-fullscreen .video-fullscreen-btn {
    top: 20px;
    right: 20px;
    font-size: 16px;
    padding: 10px 15px;
}

/* Hide other elements when video is fullscreen */
body.video-fullscreen-active > *:not(.mp3-video-fullscreen) {
    display: none !important;
}

/* Video aspect ratio containers */
.video-16-9 {
    aspect-ratio: 16/9;
}

.video-4-3 {
    aspect-ratio: 4/3;
}

.video-1-1 {
    aspect-ratio: 1/1;
}

/* Cover item modifications for video thumbnails */
.cover-item[data-file-type="video"] {
    position: relative;
}

.cover-item[data-file-type="video"]::after {
    content: "▶";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    pointer-events: none;
    opacity: 0.8;
}

.cover-item[data-file-type="video"].center::after {
    width: 40px;
    height: 40px;
    font-size: 16px;
}

