/* ============================================
   QuestSaber Songs & Playlists Page
   5 Unique Card Styles + Full Page Styling
   ============================================ */

/* === Custom Alert Bar === */
.custom-alert-bar {
    position: fixed;
    top: 85px;
    left: 50%;
    transform: translateX(-50%) translateY(-120%);
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 28px;
    border-radius: 16px;
    background: var(--surface-color);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
    font-size: 0.95rem;
    font-weight: 500;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.4s ease;
    max-width: 90vw;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
}

.custom-alert-bar.show {
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
    opacity: 1;
    visibility: visible;
}

.custom-alert-bar.success {
    border-color: rgba(34, 197, 94, 0.4);
    box-shadow: 0 8px 30px rgba(34, 197, 94, 0.15);
}

.custom-alert-bar.success .alert-icon-wrap {
    color: #22c55e;
}

.custom-alert-bar.error {
    border-color: rgba(239, 68, 68, 0.4);
    box-shadow: 0 8px 30px rgba(239, 68, 68, 0.15);
}

.custom-alert-bar.error .alert-icon-wrap {
    color: #ef4444;
}

.custom-alert-bar.loading .alert-icon-wrap {
    color: var(--primary-color);
    animation: pulse-icon 1.5s ease-in-out infinite;
}

@keyframes pulse-icon {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.9); }
}

.alert-icon-wrap {
    display: flex;
    align-items: center;
    color: var(--primary-color);
}

.alert-icon-wrap svg {
    width: 20px;
    height: 20px;
}

/* === Songs App Layout === */
.songs-app {
    flex-grow: 1;
    padding: 0 2.5rem 4rem;
    max-width: 1600px;
    margin: 0 auto;
    width: 100%;
}

/* === Top Bar === */
.songs-topbar {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px 0;
    flex-wrap: wrap;
}

.topbar-left {
    flex-shrink: 0;
}

.topbar-center {
    flex: 1;
    min-width: 250px;
}

.topbar-right {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-shrink: 0;
}

/* === Mode Toggle === */
.mode-toggle {
    display: flex;
    position: relative;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 4px;
    gap: 4px;
}

.mode-btn {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-muted);
    transition: color 0.3s ease;
    white-space: nowrap;
}

.mode-btn svg {
    width: 18px;
    height: 18px;
}

.mode-btn.active {
    color: #fff;
}

.mode-slider {
    position: absolute;
    top: 4px;
    left: 4px;
    height: calc(100% - 8px);
    width: calc(50% - 6px);
    background: var(--primary-color);
    border-radius: 10px;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
    z-index: 1;
}

.mode-toggle[data-active="playlists"] .mode-slider {
    transform: translateX(calc(100% + 4px));
}

/* === Search === */
.search-wrap {
    position: relative;
    width: 100%;
}

.search-btn {
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    padding: 8px;
    border-radius: 10px;
    cursor: pointer;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 2;
}

.search-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
}

.search-icon {
    width: 18px;
    height: 18px;
    pointer-events: none;
    opacity: 0.8;
}

.search-wrap input {
    width: 100%;
    padding: 13px 20px 13px 50px;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    color: var(--text-main);
    font-size: 0.95rem;
    font-family: var(--font-family);
    transition: all var(--transition);
}

.search-wrap input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
    outline: none;
}

.search-wrap:focus-within .search-btn {
    color: var(--primary-color);
}

.search-wrap input::placeholder {
    color: var(--text-muted);
}

/* === Top Bar Buttons === */
.topbar-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.85rem;
    transition: all var(--transition);
}

.topbar-btn:hover {
    background: var(--surface-hover);
    color: var(--text-main);
    border-color: rgba(255, 255, 255, 0.15);
}

.topbar-btn svg {
    width: 18px;
    height: 18px;
}

/* === Card Style Picker === */
.card-style-picker {
    position: relative;
}

.style-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--surface-color);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 8px;
    display: none;
    flex-direction: column;
    gap: 4px;
    z-index: 100;
    min-width: 160px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
    animation: dropIn 0.2s ease;
}

.style-dropdown.open {
    display: flex;
}

@keyframes dropIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.style-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 10px;
    font-weight: 500;
    font-size: 0.85rem;
    color: var(--text-muted);
    transition: all 0.2s;
    white-space: nowrap;
}

.style-option:hover {
    background: var(--surface-hover);
    color: var(--text-main);
}

.style-option.active {
    background: var(--primary-color);
    color: #fff;
}

.style-option svg {
    width: 16px;
    height: 16px;
}

/* === Filters Panel === */
.filters-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), padding 0.3s;
    background: var(--surface-color);
    border: 1px solid transparent;
    border-radius: 20px;
    margin-bottom: 20px;
}

.filters-panel.open {
    max-height: 800px;
    padding: 28px;
    border-color: var(--border-color);
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
}

.filter-group h3 {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 14px;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-group h3 svg {
    width: 16px;
    height: 16px;
    color: var(--primary-color);
}

.filter-group label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 6px;
    font-weight: 500;
}

/* Custom Checkbox */
.filter-check {
    display: flex !important;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    cursor: pointer;
    transition: color 0.2s;
}

.filter-check:hover {
    color: var(--text-main) !important;
}

.filter-check input[type="checkbox"] {
    display: none;
}

.filter-check .checkmark {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    border: 2px solid var(--border-color);
    flex-shrink: 0;
    position: relative;
    transition: all 0.2s;
    background: rgba(255, 255, 255, 0.03);
}

.filter-check input:checked + .checkmark {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.filter-check input:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}

.filter-input {
    width: 100%;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-main);
    font-size: 0.85rem;
    font-family: var(--font-family);
    margin-bottom: 8px;
    transition: all var(--transition);
}

.filter-input:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.filter-select {
    width: 100%;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-main);
    font-size: 0.85rem;
    font-family: var(--font-family);
    margin-bottom: 8px;
    cursor: pointer;
    appearance: none;
    transition: all var(--transition);
}

.filter-select:focus {
    border-color: var(--primary-color);
    outline: none;
}

.filter-select option {
    background: #1a1a2e;
    color: #fff;
}

.min-max {
    display: flex;
    gap: 8px;
}

.filter-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.filter-actions .hero-btn {
    padding: 10px 24px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-actions .hero-btn svg {
    width: 16px;
    height: 16px;
}

/* === Pagination === */
.songs-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 30px 0 10px;
}

.page-indicator {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-muted);
    padding: 8px 20px;
    background: var(--surface-color);
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.songs-pagination .hero-btn {
    padding: 10px 22px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.songs-pagination .hero-btn svg {
    width: 16px;
    height: 16px;
}

.songs-pagination .hero-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

/* === Loading === */
.loader-wrap {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    gap: 20px;
}

.loader-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loader-wrap p {
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
}

/* === Error === */
.error-display {
    text-align: center;
    padding: 20px;
    color: #ef4444;
    font-weight: 500;
}

/* === No Results === */
.no-results {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-muted);
    font-size: 1.1rem;
    grid-column: 1 / -1;
}

/* === Common Card Elements === */
.difficulty {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.difficulty.Easy { background: rgba(34, 197, 94, 0.15); color: #22c55e; }
.difficulty.Normal { background: rgba(59, 130, 246, 0.15); color: #3b82f6; }
.difficulty.Hard { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }
.difficulty.Expert { background: rgba(239, 68, 68, 0.15); color: #ef4444; }
.difficulty.ExpertPlus { background: rgba(168, 85, 247, 0.15); color: #a855f7; }

.characteristic-group {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}

.characteristic-icon {
    width: 18px;
    height: 18px;
    filter: brightness(0) invert(0.7);
    margin-right: 2px;
}

/* === Song Install Button Base === */
.btn-install {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 18px;
    background: var(--primary-color);
    color: #fff;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.8rem;
    letter-spacing: 0.3px;
    transition: all var(--transition);
    border: none;
    cursor: pointer;
    white-space: nowrap;
}

.btn-install:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.btn-install:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-source-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 14px;
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-weight: 500;
    font-size: 0.8rem;
    transition: all var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

.btn-source-link:hover {
    background: var(--surface-hover);
    color: var(--text-main);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Queued state */
.queued .btn-install {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
    pointer-events: none;
}

/* === Audio Play Indicator for Cover === */
.cover-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s;
    cursor: pointer;
    border-radius: inherit;
}

.cover-play svg.play-icon {
    width: 36px;
    height: 36px;
    color: #fff;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5));
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.cover-play svg:not(.play-icon):not(.progress-ring) {
    width: 36px;
    height: 36px;
    color: #fff;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5));
}

.cover-container-clickable:hover .cover-play {
    opacity: 1;
}

.cover-container-clickable.playing .cover-play {
    opacity: 1;
    background: rgba(0, 0, 0, 0.6);
}

/* Audio Progress Ring */
.audio-progress-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
}

.progress-ring {
    position: absolute;
    top: 0;
    left: 0;
    transform: rotate(-90deg);
    filter: drop-shadow(0 0 8px rgba(99, 102, 241, 0.5));
}

.progress-ring .ring-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.15);
    stroke-width: 6;
}

.progress-ring .ring-fill {
    fill: none;
    stroke: var(--primary-color);
    stroke-width: 6;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.audio-progress-wrap .pause-icon {
    width: 24px;
    height: 24px;
    color: #fff;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.5));
}

/* Pulsing glow on the cover while playing */
.cover-container-clickable.playing {
    animation: cover-pulse 2s ease-in-out infinite;
}

@keyframes cover-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0); }
    50% { box-shadow: 0 0 20px 4px rgba(99, 102, 241, 0.25); }
}

/* ============================================
   CARD STYLE 1: GLASSMORPHIC FLOATING CARDS
   Rounded, blurred glass with gradient accents
   ============================================ */
.content-grid.card-style-1 {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
    gap: 24px;
    padding: 8px 0;
}

.song-card-1 {
    background: var(--surface-color);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
}

.song-card-1::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--neon-blue), var(--primary-color));
    opacity: 0;
    transition: opacity 0.3s;
}

.song-card-1:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3), 0 0 30px rgba(99, 102, 241, 0.08);
    border-color: rgba(99, 102, 241, 0.3);
}

.song-card-1:hover::before {
    opacity: 1;
}

.song-card-1 .sc1-cover {
    position: relative;
    width: 100%;
    height: 190px;
    overflow: hidden;
}

.song-card-1 .sc1-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.song-card-1:hover .sc1-cover img {
    transform: scale(1.06);
}

.song-card-1 .sc1-cover .sc1-bpm-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(12px);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--neon-blue);
    display: flex;
    align-items: center;
    gap: 4px;
}

.song-card-1 .sc1-body {
    padding: 18px 20px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.song-card-1 .sc1-title {
    font-size: 1.05rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.song-card-1 .sc1-artist {
    font-size: 0.82rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.song-card-1 .sc1-mapper {
    font-size: 0.78rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
    opacity: 0.8;
}

.song-card-1 .sc1-mapper svg {
    width: 14px;
    height: 14px;
    color: var(--primary-color);
}

.song-card-1 .sc1-diffs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 2px;
}

.song-card-1 .sc1-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px 16px;
    border-top: 1px solid var(--border-color);
    gap: 8px;
}

.song-card-1 .sc1-actions {
    display: flex;
    gap: 8px;
}

.song-card-1 .sc1-rating {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
}

.song-card-1 .sc1-rating svg {
    width: 15px;
    height: 15px;
    color: #f59e0b;
}

/* ============================================
   CARD STYLE 2: HORIZONTAL PANORAMIC STRIPS
   Wide cinematic strips with side-by-side layout
   ============================================ */
.content-grid.card-style-2 {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 8px 0;
}

.song-card-2 {
    display: flex;
    align-items: center;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    min-height: 100px;
}

.song-card-2:hover {
    background: var(--surface-hover);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateX(6px);
    box-shadow: -6px 0 25px rgba(99, 102, 241, 0.1), 0 8px 25px rgba(0, 0, 0, 0.2);
}

.song-card-2 .sc2-cover {
    width: 100px;
    height: 100px;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.song-card-2 .sc2-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}

.song-card-2:hover .sc2-cover img {
    transform: scale(1.1);
}

.song-card-2 .sc2-info {
    flex: 1;
    padding: 14px 20px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.song-card-2 .sc2-title {
    font-size: 1rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.song-card-2 .sc2-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.song-card-2 .sc2-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.song-card-2 .sc2-meta svg {
    width: 13px;
    height: 13px;
}

.song-card-2 .sc2-diffs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.song-card-2 .sc2-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    flex-shrink: 0;
}

/* ============================================
   CARD STYLE 3: IMMERSIVE FULL-IMAGE OVERLAY
   Full background image with gradient overlay
   ============================================ */
.content-grid.card-style-3 {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    padding: 8px 0;
}

.song-card-3 {
    position: relative;
    height: 340px;
    border-radius: 22px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: default;
}

.song-card-3:hover {
    transform: translateY(-10px) scale(1.01);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5), 0 0 40px rgba(99, 102, 241, 0.1);
    border-color: var(--primary-color);
}

.song-card-3 .sc3-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s ease;
}

.song-card-3:hover .sc3-bg {
    transform: scale(1.1);
}

.song-card-3 .sc3-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.95) 0%,
        rgba(0, 0, 0, 0.6) 40%,
        rgba(0, 0, 0, 0.1) 70%,
        transparent 100%
    );
}

.song-card-3 .sc3-top-badges {
    position: absolute;
    top: 16px;
    right: 16px;
    display: flex;
    gap: 8px;
    z-index: 3;
}

.song-card-3 .sc3-badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    color: #fff;
    display: flex;
    align-items: center;
    gap: 4px;
}

.song-card-3 .sc3-badge svg {
    width: 12px;
    height: 12px;
}

.song-card-3 .sc3-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 24px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.song-card-3 .sc3-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.3;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.song-card-3 .sc3-subtitle {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    gap: 8px;
}

.song-card-3 .sc3-subtitle .dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
}

.song-card-3 .sc3-diffs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.song-card-3 .sc3-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 4px;
}

.song-card-3 .sc3-actions {
    display: flex;
    gap: 8px;
}

.song-card-3 .sc3-actions .btn-install {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.song-card-3 .sc3-actions .btn-install:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.song-card-3 .sc3-actions .btn-source-link {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.8);
}

/* ============================================
   CARD STYLE 4: VINYL RECORD / DISC STYLE
   Circular cover with disc animation
   ============================================ */
.content-grid.card-style-4 {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    padding: 20px 0;
}

.song-card-4 {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 30px 24px 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
}

.song-card-4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--neon-blue));
    opacity: 0;
    transition: opacity 0.3s;
}

.song-card-4:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.song-card-4:hover::after {
    opacity: 1;
}

.song-card-4 .sc4-disc-wrap {
    position: relative;
    width: 140px;
    height: 140px;
}

.song-card-4 .sc4-disc {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    position: absolute;
    top: 0;
    left: 0;
    background: conic-gradient(
        from 0deg,
        #1a1a2e 0deg,
        #2a2a4e 30deg,
        #1a1a2e 60deg,
        #2a2a4e 90deg,
        #1a1a2e 120deg,
        #2a2a4e 150deg,
        #1a1a2e 180deg,
        #2a2a4e 210deg,
        #1a1a2e 240deg,
        #2a2a4e 270deg,
        #1a1a2e 300deg,
        #2a2a4e 330deg,
        #1a1a2e 360deg
    );
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    transition: transform 2s linear;
}

.song-card-4:hover .sc4-disc {
    animation: vinyl-spin 3s linear infinite;
}

@keyframes vinyl-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.song-card-4 .sc4-disc::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--bg-color);
    border: 2px solid var(--border-color);
}

.song-card-4 .sc4-cover-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--bg-color);
    z-index: 2;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.song-card-4 .sc4-cover-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.song-card-4 .sc4-title {
    font-size: 1.05rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    line-height: 1.3;
}

.song-card-4 .sc4-artist {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: -8px;
}

.song-card-4 .sc4-mapper {
    font-size: 0.75rem;
    color: var(--text-muted);
    opacity: 0.7;
}

.song-card-4 .sc4-diffs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: center;
}

.song-card-4 .sc4-actions {
    display: flex;
    gap: 8px;
    width: 100%;
    margin-top: 4px;
}

.song-card-4 .sc4-actions .btn-install {
    flex: 1;
}

.song-card-4 .sc4-actions .btn-source-link {
    flex: 0;
}

/* ============================================
   CARD STYLE 5: COMPACT MOSAIC GRID
   Tight square tiles with hover reveal info
   ============================================ */
.content-grid.card-style-5 {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 8px;
    padding: 8px 0;
}

.song-card-5 {
    position: relative;
    aspect-ratio: 1;
    border-radius: 14px;
    overflow: hidden;
    cursor: default;
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

.song-card-5:hover {
    border-color: var(--primary-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    transform: scale(1.03);
    z-index: 2;
}

.song-card-5 .sc5-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease, filter 0.3s ease;
}

.song-card-5:hover .sc5-img {
    transform: scale(1.15);
    filter: brightness(0.4);
}

.song-card-5 .sc5-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 16px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.song-card-5:hover .sc5-overlay {
    opacity: 1;
}

.song-card-5 .sc5-title {
    font-size: 1rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.3;
    margin-bottom: 4px;
    transform: translateY(8px);
    transition: transform 0.3s ease;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.song-card-5:hover .sc5-title {
    transform: translateY(0);
}

.song-card-5 .sc5-artist {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 10px;
    transform: translateY(8px);
    transition: transform 0.3s ease 0.05s;
}

.song-card-5:hover .sc5-artist {
    transform: translateY(0);
}

.song-card-5 .sc5-bottom {
    display: flex;
    gap: 6px;
    transform: translateY(12px);
    transition: transform 0.3s ease 0.1s;
}

.song-card-5:hover .sc5-bottom {
    transform: translateY(0);
}

.song-card-5 .sc5-bottom .btn-install {
    flex: 1;
    padding: 7px 12px;
    font-size: 0.75rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.song-card-5 .sc5-bottom .btn-install:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.song-card-5 .sc5-bottom .btn-source-link {
    padding: 7px 10px;
    font-size: 0.75rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
}

/* Always-visible mini title at bottom of tile */
.song-card-5 .sc5-mini-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 10px 14px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    font-size: 0.78rem;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: opacity 0.3s;
}

.song-card-5:hover .sc5-mini-title {
    opacity: 0;
}

/* ============================================
   PLAYLIST CARDS
   Shared style for playlists in any view
   ============================================ */
.playlist-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
}

.playlist-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.3);
    border-color: rgba(99, 102, 241, 0.3);
}

.playlist-card .pl-cover {
    width: 100%;
    height: 200px;
    overflow: hidden;
    position: relative;
}

.playlist-card .pl-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.playlist-card:hover .pl-cover img {
    transform: scale(1.05);
}

.playlist-card .pl-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 5px 12px;
    border-radius: 20px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--neon-blue);
    display: flex;
    align-items: center;
    gap: 5px;
}

.playlist-card .pl-badge svg {
    width: 13px;
    height: 13px;
}

.playlist-card .pl-body {
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.playlist-card .pl-title {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.playlist-card .pl-owner {
    font-size: 0.82rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.playlist-card .pl-owner svg {
    width: 14px;
    height: 14px;
    color: var(--primary-color);
}

.playlist-card .pl-stats {
    display: flex;
    gap: 16px;
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.playlist-card .pl-stats span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.playlist-card .pl-stats svg {
    width: 14px;
    height: 14px;
}

.playlist-card .pl-footer {
    display: flex;
    gap: 8px;
    padding: 14px 20px;
    border-top: 1px solid var(--border-color);
}

.playlist-card .pl-footer .btn-install {
    flex: 1;
}

/* Playlist grid layout */
.content-grid.playlist-mode {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)) !important;
    gap: 24px !important;
    flex-direction: unset !important;
}

/* Image placeholder */
.image-placeholder {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(0, 240, 255, 0.05));
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-placeholder::after {
    content: '🎵';
    font-size: 2rem;
}

/* === Responsive === */
@media (max-width: 900px) {
    .songs-app {
        padding: 0 1rem 3rem;
    }

    .songs-topbar {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .topbar-left, .topbar-center, .topbar-right {
        width: 100%;
    }

    .topbar-right {
        justify-content: flex-end;
    }

    .mode-toggle {
        width: 100%;
    }

    .mode-btn {
        flex: 1;
        justify-content: center;
    }

    .mode-slider {
        width: calc(50% - 6px);
    }

    .content-grid.card-style-2 .song-card-2 {
        flex-direction: column;
        height: auto;
    }

    .song-card-2 .sc2-cover {
        width: 100%;
        height: 160px;
    }

    .song-card-2 .sc2-actions {
        flex-direction: row;
        width: 100%;
        justify-content: flex-start;
        padding: 0 14px 14px;
    }

    .content-grid.card-style-5 {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    .filter-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .content-grid.card-style-1 {
        grid-template-columns: 1fr;
    }

    .content-grid.card-style-3 {
        grid-template-columns: 1fr;
    }

    .content-grid.card-style-4 {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }

    .content-grid.playlist-mode {
        grid-template-columns: 1fr !important;
    }

    .songs-pagination {
        gap: 10px;
    }

    .songs-pagination .hero-btn span {
        display: none;
    }
}

/* Detailed Modals CSS */
.detail-modal-inner {
    position: relative;
    background: #111;
    color: #eee;
    border-radius: 12px;
    overflow: hidden;
}

.detail-header {
    position: relative;
    height: 180px;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    padding: 20px;
}

.detail-bg-blur {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(20px) brightness(0.4);
    z-index: 1;
}

.detail-header-content {
    position: relative;
    z-index: 2;
    display: flex;
    gap: 20px;
    width: 100%;
}

.detail-cover {
    width: 120px;
    height: 120px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
    object-fit: cover;
}

.detail-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.detail-info h2 {
    margin: 0 0 5px 0;
    font-size: 1.8rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
}

.detail-info p {
    margin: 0 0 10px 0;
    font-size: 0.9rem;
    color: #ddd;
    max-height: 40px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.detail-tag {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    color: #fff;
}

.detail-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 10;
    background: rgba(0,0,0,0.5);
    border: none;
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.2s;
}

.detail-close-btn:hover {
    background: rgba(255,255,255,0.2);
}

.detail-body {
    padding: 20px;
    display: grid;
    grid-template-columns: 1fr 250px;
    gap: 20px;
    background: #1a1a1a;
}

.detail-stats-panel {
    background: #222;
    border-radius: 8px;
    padding: 15px;
    border: 1px solid #333;
}

.detail-stat-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #333;
    font-size: 0.9rem;
}

.detail-stat-row:last-child {
    border-bottom: none;
}

.detail-stat-row span {
    color: #aaa;
}

.detail-stat-row strong {
    color: #fff;
}

.detail-action-panel {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.detail-iframe-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 20px;
    max-height: 70vh;
    overflow-y: auto;
    background: #1a1a1a;
}

.playlist-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    background: #222;
    border-bottom: 1px solid #333;
}

.playlist-modal-header h2 {
    margin: 0;
    font-size: 1.3rem;
    color: #fff;
}

@media (max-width: 768px) {
    .detail-body {
        grid-template-columns: 1fr;
    }
}
