/* Music Releases Showcase - Frontend Styles */

.mrs-grid-container {
    width: 100%;
    margin: 2rem 0;
}

.mrs-grid {
    display: grid;
    gap: 2rem;
    margin-bottom: 3rem;
}

.mrs-columns-1 { grid-template-columns: 1fr; }
.mrs-columns-2 { grid-template-columns: repeat(2, 1fr); }
.mrs-columns-3 { grid-template-columns: repeat(3, 1fr); }
.mrs-columns-4 { grid-template-columns: repeat(4, 1fr); }
.mrs-columns-5 { grid-template-columns: repeat(5, 1fr); }

@media (max-width: 640px) {
    .mrs-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem;
    }
}

@media (min-width: 641px) and (max-width: 1024px) {
    .mrs-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

.mrs-card {
    perspective: 1000px;
    cursor: pointer;
    width: 100%;
}

.mrs-card-inner {
    position: relative;
    width: 100%;
    padding-bottom: 100%;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

.mrs-flip-enabled:hover .mrs-card-inner,
.mrs-flip-enabled.mrs-flipped .mrs-card-inner {
    transform: rotateY(180deg);
}

.mrs-card-front,
.mrs-card-back {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: 12px;
    overflow: hidden;
    background: white;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.mrs-card:hover .mrs-card-front,
.mrs-card:hover .mrs-card-back {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.mrs-card:not(.mrs-flip-enabled):hover .mrs-card-inner {
    transform: translateY(-4px) scale(1.02);
}

.mrs-card-back {
    transform: rotateY(180deg);
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    background: #1a1a2e;
}

.mrs-back-artwork {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    filter: grayscale(60%) brightness(0.35) blur(4px);
    transform: scale(1.05);
}

.mrs-back-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0.3) 0%,
        rgba(0, 0, 0, 0.5) 50%,
        rgba(0, 0, 0, 0.7) 100%
    );
}

.mrs-back-content {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    padding: 1rem;
    overflow-y: auto;
    box-sizing: border-box;
    gap: 0.5rem;
}

.mrs-back-content::-webkit-scrollbar {
    width: 4px;
}

.mrs-back-content::-webkit-scrollbar-track {
    background: transparent;
}

.mrs-back-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
}

.mrs-artwork-container {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
}

.mrs-artwork {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.mrs-artwork-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
}

.mrs-artwork-placeholder .dashicons {
    font-size: 64px;
    width: 64px;
    height: 64px;
    color: rgba(255, 255, 255, 0.8);
}

.mrs-shimmer-overlay {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.3) 50%,
        transparent 100%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mrs-card:hover .mrs-shimmer-overlay {
    animation: mrs-shimmer 1.5s ease-in-out;
    opacity: 1;
}

@keyframes mrs-shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.mrs-gloss-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.4) 0%,
        rgba(255, 255, 255, 0) 50%,
        rgba(255, 255, 255, 0.1) 100%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.mrs-card:hover .mrs-gloss-overlay {
    opacity: 1;
}

.mrs-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

.mrs-card-front {
    display: flex;
    flex-direction: column;
}

.mrs-info-front {
    padding: 1rem;
    flex: 1;
}

.mrs-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 0.25rem 0;
    line-height: 1.3;
}

.mrs-artist {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0 0 0.5rem 0;
}

.mrs-type {
    display: inline-block;
    font-size: 0.75rem;
    color: #2563eb;
    background: #dbeafe;
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 600;
}

.mrs-title-back {
    font-size: 1.125rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    line-height: 1.3;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.mrs-artist-back {
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.75);
    margin: 0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.mrs-description {
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.5;
    margin: 0;
}

.mrs-back-actions {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    margin-top: auto;
    flex-shrink: 0;
}

.mrs-action-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mrs-action-row .mrs-watch-video-btn,
.mrs-action-row .mrs-main-link {
    width: 100%;
    margin: 0;
}

.mrs-action-row .mrs-watch-video-btn {
    margin-top: 5px;
}

.mrs-main-link,
.mrs-info-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    border-radius: 8px;
    font-size: 0.8125rem;
    font-weight: 600;
    transition: background 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none;
    white-space: nowrap;
    box-sizing: border-box;
}

.mrs-main-link,
.mrs-main-link:link,
.mrs-main-link:visited {
    background: rgba(255, 255, 255, 0.95);
    color: #1f2937 !important;
}

.mrs-main-link:hover,
.mrs-main-link:active,
.mrs-main-link:focus {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    background: #ffffff;
    color: #1f2937 !important;
}

.mrs-info-link,
.mrs-info-link:link,
.mrs-info-link:visited {
    background: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.9) !important;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.mrs-info-link:hover,
.mrs-info-link:active,
.mrs-info-link:focus {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff !important;
}

.mrs-audio-player {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.75rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    gap: 0.625rem;
    backdrop-filter: blur(4px);
}

.mrs-play-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    color: #1f2937;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.mrs-play-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.mrs-play-btn .dashicons {
    width: 18px;
    height: 18px;
    font-size: 18px;
    color: #1f2937;
}

.mrs-progress-container {
    flex: 1;
}

.mrs-progress-bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
    margin-bottom: 0.375rem;
}

.mrs-progress-fill {
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    transition: width 0.1s linear;
    width: 0;
}

.mrs-time {
    font-size: 0.6875rem;
    color: rgba(255, 255, 255, 0.6);
}

.mrs-audio-element {
    display: none;
}

.mrs-platform-buttons {
    padding-top: 0.375rem;
    flex-shrink: 0;
}

.mrs-platform-label {
    font-size: 0.6875rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.375rem;
}

.mrs-platform-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

.mrs-platform-btn,
.mrs-platform-btn:link,
.mrs-platform-btn:visited {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.625rem;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 6px;
    font-size: 0.6875rem;
    font-weight: 600;
    text-decoration: none !important;
    color: rgba(255, 255, 255, 0.9) !important;
    transition: all 0.2s ease;
    backdrop-filter: blur(4px);
}

.mrs-platform-btn:hover,
.mrs-platform-btn:active,
.mrs-platform-btn:focus {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(255, 255, 255, 0.95);
    color: #1f2937 !important;
    transform: translateY(-1px);
}

.mrs-platform-btn:hover .mrs-platform-icon svg {
    fill: #1f2937;
}

.mrs-platform-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.mrs-platform-icon svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

.mrs-platform-name {
    white-space: nowrap;
}

.mrs-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 3rem;
}

.mrs-pagination a,
.mrs-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 0.75rem;
    border-radius: 8px;
    background: white;
    border: 1px solid #e5e7eb;
    color: #374151;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.mrs-pagination a:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}

.mrs-pagination .current {
    background: #1f2937;
    border-color: #1f2937;
    color: white;
}

.mrs-no-releases {
    text-align: center;
    padding: 3rem;
    color: #6b7280;
    font-size: 1.125rem;
}

/* Hover overlay for non-flippable cards */
.mrs-hover-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 20;
    border-radius: 12px;
}

.mrs-card:not(.mrs-flip-enabled):hover .mrs-hover-overlay {
    opacity: 1;
}

.mrs-hover-button,
.mrs-hover-button:link,
.mrs-hover-button:visited {
    background: white;
    color: #1f2937 !important;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none !important;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.mrs-hover-button:hover,
.mrs-hover-button:active,
.mrs-hover-button:focus {
    transform: scale(1.05);
    background: #f3f4f6;
    color: #1f2937 !important;
}

/* Hide text and gradient based on settings */
.mrs-no-text-front .mrs-info-front {
    display: none;
}

.mrs-no-text-back .mrs-title-back,
.mrs-no-text-back .mrs-artist-back {
    display: none;
}

.mrs-watch-video-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.85) 0%, rgba(185, 28, 28, 0.9) 100%);
    color: #ffffff;
    transition: background 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none;
    font-family: inherit;
    white-space: nowrap;
    box-sizing: border-box;
    margin-bottom: 0;
}

.mrs-watch-video-btn:hover {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.95) 0%, rgba(220, 38, 38, 1) 100%);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.4);
}

.mrs-watch-video-btn svg {
    flex-shrink: 0;
    width: 14px;
    height: 14px;
}

.mrs-video-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    box-sizing: border-box;
}

.mrs-video-modal.mrs-modal-open {
    display: flex;
}

.mrs-video-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0);
    transition: background 0.3s ease;
    cursor: pointer;
}

.mrs-video-modal.mrs-modal-open .mrs-video-modal-backdrop {
    background: rgba(0, 0, 0, 0.85);
}

.mrs-video-modal-content {
    position: relative;
    width: 100%;
    max-width: 960px;
    z-index: 1;
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.mrs-video-modal.mrs-modal-visible .mrs-video-modal-content {
    opacity: 1;
    transform: scale(1);
}

.mrs-video-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-family: inherit;
}

.mrs-video-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.mrs-video-modal-player {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

.mrs-video-modal-player iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

@media (max-width: 640px) {
    .mrs-video-modal {
        padding: 1rem;
    }

    .mrs-video-modal-close {
        top: -36px;
        right: 0;
    }
}
