/* ============================================
   My Songs Card Layout Styles
   ============================================ */

/* Cards Container */
.mysongs-cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 16px;
    padding: 8px 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

@media (max-width: 420px) {
    .mysongs-cards-container {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 6px 0;
    }
}

/* Individual Card */
.mysong-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-primary);
    border-radius: 12px;
    padding: 12px;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: visible;
}

.mysong-card:hover {
    border-color: var(--accent-primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

/* Card Rows */
.card-row {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-width: 0; /* Allow flex children to shrink */
}

/* Row 1: Title Row (Checkbox + Title) */
.card-title-row {
    gap: 10px;
    flex-wrap: nowrap;
    align-items: center;
    margin-bottom: 10px;
}

/* Row 2: Actions Row (All 6 buttons) */
.card-actions-row {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

/* Row 3: Metadata Row (Artist, Composer, Genre, Privacy) */
.card-metadata-row {
    gap: 0;
    flex-wrap: nowrap;
    overflow: hidden;
    padding-top: 4px;
}

/* Primary Actions (Play, Playlist, Share) */
.card-primary-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* Secondary Actions (Edit, View Reviews, Delete) */
.card-secondary-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* Card Separator */
.card-separator {
    color: var(--text-tertiary, #888);
    font-size: 11px;
    opacity: 0.5;
    flex-shrink: 0;
    margin: 0 6px;
    user-select: none;
    line-height: 1;
}

/* Card Fields */
.card-field {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 13px;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.4;
}

.card-title-field {
    font-weight: 700; /* Bold for prominence */
    font-size: 15px; /* Slightly larger than metadata (13px) */
    flex: 1 1 auto; /* Allow title to grow and shrink */
    min-width: 120px;
    color: var(--text-primary);
    line-height: 1.3;
    overflow: hidden; /* 넘치는 텍스트 처리 */
    text-overflow: ellipsis; /* 말줄임표 표시 */
    white-space: nowrap; /* 한 줄 표시 */
}

.card-artist-field,
.card-composer-field {
    flex: 1 1 auto;
    min-width: 50px;
    max-width: 120px; /* Limit max width */
    color: var(--text-secondary);
    font-size: 13px; /* Same as other metadata */
}

.card-genre-field {
    flex: 0.8 1 auto;
    min-width: 45px;
    max-width: 90px;
    color: var(--text-secondary);
    font-size: 13px; /* Same as other metadata */
}

.card-privacy-field {
    flex: 0.6 1 auto;
    min-width: 45px;
    max-width: 75px;
    flex-shrink: 0;
    font-size: 13px; /* Same as other metadata */
}

.song-checkbox {
    width: 20px;
    height: 20px;
    margin: 0;
    cursor: pointer;
    accent-color: var(--accent-primary);
    flex-shrink: 0;
    margin-right: 4px; /* Small spacing after checkbox */
}

/* Privacy Badge */
.card-privacy-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    background: transparent;
}

.card-privacy-badge.public {
    color: var(--accent-success, #28a745);
}

.card-privacy-badge.private {
    color: var(--text-tertiary, #6c757d);
}

/* Card Actions Row - All buttons together */

.main-v2-mysong-action-btn {
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1.5px solid var(--border-primary);
    background: transparent;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    color: var(--text-secondary);
    flex-shrink: 0;
    position: relative;
}

/* Hover state - persistent visual feedback */
.main-v2-mysong-action-btn:hover,
.main-v2-mysong-action-btn:focus {
    background: rgba(0, 123, 255, 0.08);
    border-color: var(--accent-primary);
    border-width: 2px;
    color: var(--accent-primary);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.15);
}

/* Active state - persists while mouse/touch is held */
.main-v2-mysong-action-btn:active,
.main-v2-mysong-action-btn:active:hover,
.main-v2-mysong-action-btn:active:focus {
    background: rgba(0, 123, 255, 0.12);
    border-color: var(--accent-primary);
    border-width: 2px;
    color: var(--accent-primary);
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(0, 123, 255, 0.2);
}

/* Focus-visible for keyboard navigation */
.main-v2-mysong-action-btn:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 3px;
    background: rgba(0, 123, 255, 0.08);
    border-color: var(--accent-primary);
    border-width: 2px;
    color: var(--accent-primary);
}

/* Combined focus and hover for keyboard users */
.main-v2-mysong-action-btn:focus-visible:hover {
    background: rgba(0, 123, 255, 0.12);
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.15);
}

/* Icon styling */
.main-v2-mysong-action-btn .card-action-icon {
    width: 18px;
    height: 18px;
    color: inherit;
    transition: color 0.15s ease;
}

/* Ensure icon color matches button state */
.main-v2-mysong-action-btn:hover .card-action-icon,
.main-v2-mysong-action-btn:focus .card-action-icon,
.main-v2-mysong-action-btn:active .card-action-icon,
.main-v2-mysong-action-btn:focus-visible .card-action-icon {
    color: var(--accent-primary);
}

/* Danger Button Style */
.card-action-danger {
    color: var(--accent-danger, #dc3545) !important;
}

.card-action-danger:hover,
.card-action-danger:focus {
    background: rgba(220, 53, 69, 0.08) !important;
    border-color: var(--accent-danger, #dc3545) !important;
    color: var(--accent-danger, #dc3545) !important;
}

/* Legacy Card Buttons (kept for backward compatibility, but not used in new cards) */
.card-btn {
    padding: 5px 12px;
    border: 1.5px solid var(--border-primary);
    background: transparent;
    color: var(--text-primary);
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
    flex-shrink: 0;
    line-height: 1.3;
    height: 28px; /* Match icon button height for vertical alignment */
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.card-btn:hover,
.card-btn:focus {
    background: rgba(0, 123, 255, 0.08);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 123, 255, 0.15);
}

.card-btn:active,
.card-btn:active:hover,
.card-btn:active:focus {
    background: rgba(0, 123, 255, 0.12);
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(0, 123, 255, 0.2);
}

.card-btn:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

.card-btn.edit-btn:hover,
.card-btn.edit-btn:focus {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.card-btn.delete-btn:hover,
.card-btn.delete-btn:focus {
    background: rgba(220, 53, 69, 0.08);
    border-color: var(--accent-danger, #dc3545);
    color: var(--accent-danger, #dc3545);
    box-shadow: 0 2px 6px rgba(220, 53, 69, 0.15);
}

.card-btn.delete-btn:active,
.card-btn.delete-btn:active:hover,
.card-btn.delete-btn:active:focus {
    background: rgba(220, 53, 69, 0.12);
}

/* Panel Header Controls */
.panel-header-controls {
    display: flex;
    gap: 8px;
    flex-shrink: 0; /* Prevent shrinking */
    align-items: center;
}

.panel-header-controls .main-v2-action-btn {
    white-space: nowrap; /* Prevent text wrapping */
    width: auto !important; /* Override fixed width */
    height: auto !important; /* Override fixed height */
    padding: 8px 16px !important; /* Add proper padding for text buttons */
    min-width: 80px; /* Minimum width for buttons */
}

/* Bulk Toolbar (reuse existing styles) */
.bulk-toolbar {
    background: var(--bg-secondary);
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.bulk-count {
    font-weight: 600;
    color: var(--text-primary);
}

.bulk-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.bulk-btn {
    padding: 8px 16px;
    border: 1px solid var(--border-primary);
    background: var(--bg-primary);
    color: var(--text-primary);
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

.bulk-btn:hover {
    background: var(--bg-hover);
    border-color: var(--accent-primary);
}

.bulk-btn.danger {
    color: var(--accent-danger);
    border-color: var(--accent-danger);
}

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

/* Responsive Design */
@media (max-width: 1024px) {
    .mysongs-cards-container {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 12px;
    }
}

@media (max-width: 768px) {
    .mysongs-cards-container {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .mysong-card {
        padding: 12px;
    }
    
    .card-field {
        font-size: 13px;
    }
    
    .card-title-row {
        gap: 8px;
    }
    
    .card-actions-row {
        gap: 6px;
    }
    
    .card-primary-actions,
    .card-secondary-actions {
        gap: 6px;
    }
    
    .main-v2-mysong-action-btn {
        width: 32px;
        height: 32px;
    }
    
    .main-v2-mysong-action-btn .card-action-icon {
        width: 16px;
        height: 16px;
    }
    
    
    .card-btn {
        padding: 4px 10px;
        font-size: 11px;
        height: 26px;
    }
    
    .card-title-field {
        font-size: 14px;
        min-width: 100px;
    }
    
    .card-artist-field,
    .card-composer-field {
        min-width: 45px;
        max-width: 100px;
        font-size: 12px;
    }
    
    .card-genre-field {
        min-width: 40px;
        max-width: 75px;
        font-size: 12px;
    }
    
    .card-privacy-field {
        min-width: 40px;
        max-width: 65px;
        font-size: 12px;
    }
    
    .card-row {
        gap: 8px;
    }
    
    .card-metadata-row {
        gap: 0;
        flex-wrap: nowrap; /* Still no wrapping on tablet */
    }
    
    .card-actions-row {
        gap: 8px;
    }
    
    .card-separator {
        margin: 0 5px;
        font-size: 10px;
    }
    
    /* Keep buttons horizontal on tablet */
    .panel-header-controls {
        gap: 6px;
    }
    
    .panel-header-controls .main-v2-action-btn {
        font-size: 13px;
        padding: 6px 12px;
    }
}

/* 360px viewport optimization */
@media (max-width: 420px) {
    .mysong-card {
        padding: 8px;
        gap: 6px;
    }
    
    .card-field {
        font-size: 11px;
    }
    
    .card-title-field {
        font-size: 12px;
        min-width: 60px;
        font-weight: 700;
    }
    
    .card-artist-field,
    .card-composer-field,
    .card-genre-field,
    .card-privacy-field {
        font-size: 10px;
    }
    
    .card-title-actions-row {
        gap: 6px;
    }
    
    .main-v2-mysong-action-btn {
        width: 26px;
        height: 26px;
        min-width: 26px;
    }
    
    .main-v2-mysong-action-btn .card-action-icon {
        width: 12px;
        height: 12px;
    }
    
    .card-btn {
        padding: 3px 8px;
        font-size: 10px;
        height: 24px;
    }
    
    .card-metadata-row {
        gap: 0;
    }
    
    .card-separator {
        margin: 0 3px;
        font-size: 9px;
    }
    
    .song-checkbox {
        width: 18px;
        height: 18px;
        margin-right: 3px;
    }
}

@media (max-width: 360px) {
    .mysong-card {
        padding: 6px;
        gap: 5px;
    }
    
    .card-field {
        font-size: 10px;
    }
    
    .card-title-field {
        font-size: 11px;
        min-width: 50px;
    }
    
    .card-artist-field,
    .card-composer-field,
    .card-genre-field,
    .card-privacy-field {
        font-size: 9px;
    }
    
    .card-title-row {
        gap: 4px;
    }
    
    .card-actions-row {
        gap: 4px;
    }
    
    .card-primary-actions,
    .card-secondary-actions {
        gap: 4px;
    }
    
    .main-v2-mysong-action-btn {
        width: 24px;
        height: 24px;
        min-width: 24px;
        padding: 6px; /* Ensure minimum tap target */
    }
    
    .main-v2-mysong-action-btn .card-action-icon {
        width: 10px;
        height: 10px;
    }
    
    .card-btn {
        padding: 2px 6px;
        font-size: 9px;
        height: 22px;
    }
    
    .card-separator {
        margin: 0 2px;
        font-size: 8px;
    }
    
    .song-checkbox {
        width: 16px;
        height: 16px;
        margin-right: 2px;
    }
}

@media (max-width: 576px) {
    .mysong-card {
        padding: 10px;
    }
    
    .card-field {
        font-size: 12px;
    }
    
    .card-title-field {
        min-width: 80px;
        flex: 1.2 1 80px;
    }
    
    
    .card-artist-field,
    .card-composer-field {
        min-width: 50px;
        flex: 0.8 1 50px;
    }
    
    .card-genre-field {
        min-width: 40px;
        flex: 0.6 1 40px;
    }
    
    .card-privacy-field {
        min-width: 45px;
        flex: 0.5 1 45px;
    }
    
    .card-row {
        gap: 6px;
    }
    
    .card-title-actions-row {
        gap: 8px;
        flex-wrap: nowrap;
        overflow-x: auto; /* Allow horizontal scroll if absolutely necessary */
        -webkit-overflow-scrolling: touch;
    }
    
    .main-v2-mysong-action-btn {
        width: 28px;
        height: 28px;
    }
    
    .main-v2-mysong-action-btn .card-action-icon {
        width: 14px;
        height: 14px;
    }
    
    .card-btn {
        padding: 4px 10px;
        font-size: 11px;
        height: 26px;
    }
    
    .card-metadata-row {
        gap: 0;
        flex-wrap: nowrap; /* Still no wrapping on mobile - prioritize single row */
        overflow-x: auto; /* Allow horizontal scroll if absolutely necessary */
        -webkit-overflow-scrolling: touch;
    }
    
    .card-actions-row {
        gap: 6px;
        justify-content: flex-start;
        flex-wrap: wrap;
    }
    
    .card-separator {
        margin: 0 4px;
        font-size: 10px;
    }
    
    .card-title-field {
        font-size: 14px;
        min-width: 80px;
    }
    
    .card-artist-field,
    .card-composer-field {
        min-width: 40px;
        max-width: 90px;
        font-size: 12px;
    }
    
    .card-genre-field {
        min-width: 35px;
        max-width: 65px;
        font-size: 12px;
    }
    
    .card-privacy-field {
        min-width: 35px;
        max-width: 60px;
        font-size: 12px;
    }
    
    .card-privacy-badge {
        font-size: 11px;
        padding: 3px 8px;
    }
    
    .main-v2-mysong-action-btn {
        width: 32px;
        height: 32px;
    }
    
    .main-v2-mysong-action-btn .card-action-icon {
        width: 14px;
        height: 14px;
    }
    
    .card-btn {
        padding: 5px 10px;
        font-size: 12px;
    }
    
    /* Only on mobile, make header buttons vertical */
    .panel-header-controls {
        flex-direction: column;
        width: 100%;
        gap: 4px;
    }
    
    .panel-header-controls .main-v2-action-btn {
        width: 100% !important;
        min-width: unset !important;
        font-size: 12px !important;
        padding: 8px 10px !important;
    }
    
    .bulk-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .bulk-actions {
        flex-direction: column;
    }
    
    .bulk-btn {
        width: 100%;
    }
}

/* Dark mode specific adjustments */
[data-theme="dark"] .mysong-card {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .mysong-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

/* Animation for card entrance */
@keyframes cardFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mysong-card {
    animation: cardFadeIn 0.3s ease-out;
}

/* ============================================
   SONG REVIEWS MODAL & ACCORDION
   ============================================ */

/* Reviews Button */
.card-btn.reviews-btn {
    border-color: var(--border-primary);
    color: var(--text-primary);
}

.card-btn.reviews-btn:hover,
.card-btn.reviews-btn:focus {
    background: rgba(52, 152, 219, 0.08);
    border-color: #3498db;
    color: #3498db;
    box-shadow: 0 2px 6px rgba(52, 152, 219, 0.15);
}

.card-btn.reviews-btn:active,
.card-btn.reviews-btn:active:hover,
.card-btn.reviews-btn:active:focus {
    background: rgba(52, 152, 219, 0.12);
}

/* Song Reviews Modal */
.song-reviews-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: block;
    animation: fadeIn 0.3s ease;
    pointer-events: none;
}

.song-reviews-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    pointer-events: auto;
}

.song-reviews-modal-content {
    position: absolute;
    top: 0;
    left: 0;
    transform: none;
    transform-origin: top left;
    background: var(--bg-card);
    border-radius: 16px;
    width: calc(100vw - 20px);
    max-width: calc(100vw - 20px);
    min-width: 320px;
    height: calc(100vh - 20px);
    max-height: calc(100vh - 20px);
    min-height: 340px;
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: var(--shadow-lg);
    animation: scaleIn 0.3s ease;
    display: flex;
    flex-direction: column;
    pointer-events: auto;
    box-sizing: border-box;
}

.song-reviews-modal-content.is-dragging {
    cursor: grabbing;
}

.song-reviews-modal-content.is-resizing {
    cursor: nwse-resize;
}

.song-reviews-modal-resizer {
    position: absolute;
    width: 24px;
    height: 24px;
    right: 8px;
    bottom: 8px;
    cursor: nwse-resize;
    pointer-events: auto;
    touch-action: none;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, transparent 50%, var(--border-primary) 50%);
    border-radius: 0 0 12px 0;
    opacity: 0.6;
    transition: all 0.2s ease;
}

.song-reviews-modal-resizer::before {
    content: '';
    position: absolute;
    right: 2px;
    bottom: 2px;
    width: 14px;
    height: 14px;
    background-image: 
        linear-gradient(135deg, transparent 45%, var(--text-secondary) 45%, var(--text-secondary) 48%, transparent 48%),
        linear-gradient(135deg, transparent 55%, var(--text-secondary) 55%, var(--text-secondary) 58%, transparent 58%),
        linear-gradient(135deg, transparent 65%, var(--text-secondary) 65%, var(--text-secondary) 68%, transparent 68%);
    background-size: 100% 100%;
    background-repeat: no-repeat;
}

.song-reviews-modal-resizer:hover {
    opacity: 1;
    background: linear-gradient(135deg, transparent 50%, rgba(52, 152, 219, 0.2) 50%);
}

.song-reviews-modal-resizer:hover::before {
    background-image: 
        linear-gradient(135deg, transparent 45%, #3498db 45%, #3498db 48%, transparent 48%),
        linear-gradient(135deg, transparent 55%, #3498db 55%, #3498db 58%, transparent 58%),
        linear-gradient(135deg, transparent 65%, #3498db 65%, #3498db 68%, transparent 68%);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.song-reviews-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid var(--border-primary);
    flex-shrink: 0;
    cursor: grab;
    user-select: none;
    touch-action: none;
}

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

.song-reviews-modal-header.is-dragging {
    cursor: grabbing;
}

.song-reviews-modal-close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.song-reviews-modal-close:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

/* Reviews Summary */
.reviews-summary {
    padding: 12px 25px;
    border-bottom: 1px solid var(--border-primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
}

.reviews-count {
    font-size: 0.95em;
    color: var(--text-secondary);
}

.reviews-average-score {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
}

.average-score-label {
    font-size: 0.85em;
    color: var(--text-secondary);
}

.average-score-value {
    font-size: 2em;
    font-weight: 700;
    color: #3498db;
    line-height: 1;
}

.score-max {
    font-size: 0.6em;
    color: var(--text-tertiary);
    font-weight: 500;
}

/* Review Tabs Navigation */
.review-tabs-nav {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--border-primary);
    padding: 8px 20px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    scrollbar-color: var(--text-secondary) var(--bg-secondary);
    -webkit-overflow-scrolling: touch;
    flex-wrap: wrap;
}

.review-tabs-nav::-webkit-scrollbar {
    height: 6px;
}

.review-tabs-nav::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 3px;
}

.review-tabs-nav::-webkit-scrollbar-thumb {
    background: var(--text-secondary);
    border-radius: 3px;
}

.review-tabs-nav::-webkit-scrollbar-thumb:hover {
    background: var(--text-primary);
}

.review-tab-btn {
    padding: 12px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 0.9em;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-right: 8px;
    margin-bottom: 8px;
}

.review-tab-btn:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.review-tab-btn.active {
    color: var(--text-primary);
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
}

/* Review Tab Content Area */
.review-tab-content-area {
    flex: 1;
    padding: 20px 25px;
    overflow-y: auto;
    overflow-x: hidden;
    max-height: calc(100vh - 320px);
    scrollbar-width: thin;
    scrollbar-color: var(--text-secondary) var(--bg-secondary);
    -webkit-overflow-scrolling: touch;
}

.review-tab-content-area::-webkit-scrollbar {
    width: 10px;
}

.review-tab-content-area::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 5px;
}

.review-tab-content-area::-webkit-scrollbar-thumb {
    background: var(--text-secondary);
    border-radius: 5px;
}

.review-tab-content-area::-webkit-scrollbar-thumb:hover {
    background: var(--text-primary);
}

.review-tab-panel {
    display: none;
}

.review-tab-panel.active {
    display: block;
}

.review-tab-panel .review-scores-badges {
    margin-top: 0;
}

.review-tab-panel .review-final-score-display {
    margin-top: 12px;
}

.review-tab-panel .review-text-scroll {
    margin-top: 12px;
}

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

.reviews-empty-state .empty-icon {
    margin-bottom: 15px;
    opacity: 0.5;
}

.reviews-empty-state p {
    margin: 0;
    font-size: 0.95em;
}

/* Review Accordion Item */
.review-accordion-item {
    background: var(--bg-elevated);
    border: 1px solid var(--border-primary);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.review-accordion-item:hover {
    border-color: var(--border-secondary);
    box-shadow: var(--shadow-sm);
}

.review-accordion-header {
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s ease;
}

.review-accordion-header:hover {
    background: var(--bg-hover);
}

.review-accordion-item.active .review-accordion-header {
    background: var(--bg-hover);
    border-bottom: 1px solid var(--border-primary);
}

.review-number {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95em;
}

.review-separator {
    color: var(--text-tertiary);
    opacity: 0.5;
}

.review-date {
    color: var(--text-secondary);
    font-size: 0.9em;
}

.review-chevron {
    margin-left: auto;
    color: var(--text-tertiary);
    transition: transform 0.3s ease;
    display: flex;
    align-items: center;
}

.review-accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    padding: 0 20px;
}

.review-accordion-item.active .review-accordion-content {
    padding: 16px;
    overflow: visible;
    margin: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: 10px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
    max-height: 5000px;
}

/* Review Scores Badges */
.review-scores-badges {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 4px;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-primary);
}

.review-score-badge-small {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2px 2px;
    background: transparent;
    border: none;
    transition: all 0.2s ease;
}

.review-score-badge-small:hover {
    background: rgba(52, 152, 219, 0.05);
    border-radius: 6px;
}

.review-score-badge-small .score-label {
    font-size: 0.7em;
    color: var(--text-tertiary);
    margin-bottom: 2px;
    text-align: center;
    line-height: 1.0;
}

.review-score-badge-small .score-value {
    font-size: 1.1em;
    font-weight: 700;
    color: #3498db;
}

/* Review Final Score Display */
.review-final-score-display {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    margin-bottom: 10px;
    border-bottom: 1px solid var(--border-primary);
}

.final-score-label {
    font-size: 0.85em;
    font-weight: 600;
    color: var(--text-primary);
}

.final-score-value {
    font-size: 1.3em;
    font-weight: 700;
    color: #3498db;
}

/* Review Text Content */
.review-text-content {
    color: var(--text-primary);
    font-size: 0.95em;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.review-text-scroll {
    color: var(--text-primary);
    font-size: 0.95em;
    line-height: 1.6;
    max-height: 700px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 10px;
    margin-top: 0;
    white-space: pre-wrap;
    word-break: break-word;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
    scrollbar-color: var(--text-secondary) var(--bg-secondary);
    -webkit-overflow-scrolling: touch;
    text-indent: 0;
}

.review-text-scroll:focus {
    outline: none;
}

.review-text-scroll::-webkit-scrollbar {
    width: 10px;
}

.review-text-scroll::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 5px;
    margin: 4px 0;
}

.review-text-scroll::-webkit-scrollbar-thumb {
    background: var(--text-secondary);
    border-radius: 5px;
    border: 2px solid var(--bg-card);
}

.review-text-scroll::-webkit-scrollbar-thumb:hover {
    background: var(--text-primary);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .song-reviews-modal-content {
        min-width: calc(100vw - 40px);
        max-width: calc(100vw - 40px);
        border-radius: 14px;
    }

    .song-reviews-modal-header {
        padding: 15px 20px;
    }
    
    .song-reviews-modal-header h3 {
        font-size: 1.2em;
    }
    
    .reviews-summary {
        padding: 10px 20px;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .reviews-average-score {
        align-items: flex-start;
    }
    
    .average-score-value {
        font-size: 1.8em;
    }
    
    .review-tabs-nav {
        padding: 0 15px;
    }
    
    .review-tab-btn {
        padding: 10px 15px;
        font-size: 0.85em;
    }
    
    .review-tab-content-area {
        padding: 15px 20px;
        max-height: calc(100vh - 280px);
    }
    
    .review-scores-badges {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }
    
    .review-score-badge-small {
        padding: 2px 2px;
    }
    
    .review-score-badge-small .score-label {
        font-size: 0.65em;
    }
    
    .review-score-badge-small .score-value {
        font-size: 1.1em;
    }
    
    .review-final-score-display {
        padding: 8px 0;
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
    
    .final-score-value {
        font-size: 1.3em;
    }
    
    .review-text-scroll {
        max-height: 500px;
    }
}

@media (max-width: 480px) {
    .song-reviews-modal-content {
        min-width: calc(100vw - 24px);
        max-width: calc(100vw - 24px);
        border-radius: 12px;
    }
    
    .song-reviews-modal-header {
        padding: 12px 15px;
    }
    
    .song-reviews-modal-header h3 {
        font-size: 1.1em;
    }
    
    .reviews-summary {
        padding: 8px 15px;
    }
    
    .average-score-value {
        font-size: 1.6em;
    }
    
    .review-tabs-nav {
        padding: 0 12px;
    }
    
    .review-tab-btn {
        padding: 8px 12px;
        font-size: 0.8em;
    }
    
    .review-tab-content-area {
        padding: 12px 15px;
        max-height: calc(100vh - 260px);
    }
    
    .review-scores-badges {
        grid-template-columns: 1fr;
        gap: 4px;
    }
    
    .review-score-badge-small {
        flex-direction: row;
        justify-content: space-between;
        padding: 4px 6px;
    }
    
    .review-score-badge-small .score-label {
        margin-bottom: 0;
        margin-right: 10px;
    }
    
    .review-text-content {
        font-size: 0.9em;
    }
    
    .review-text-scroll {
        max-height: 400px;
    }
}

