:root {
    --primary: #8b5cf6;
    --primary-glow: rgba(139, 92, 246, 0.4);
    --secondary: #3b82f6;
    --bg: #030712;
    --card-bg: rgba(17, 24, 39, 0.6);
    --text: #f8fafc;
    --text-muted: #94a3b8;
    --border: rgba(255, 255, 255, 0.08);
    --glass: rgba(255, 255, 255, 0.03);
    --nav-height: 70px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: 'Outfit', 'Inter', system-ui, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Dynamic Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 10% 20%, rgba(139, 92, 246, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(59, 130, 246, 0.12) 0%, transparent 40%),
        radial-gradient(circle at 50% 50%, rgba(16, 185, 129, 0.05) 0%, transparent 50%);
    z-index: -1;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

header {
    margin-bottom: 4rem;
    text-align: center;
    animation: fadeInDown 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

h1 {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    font-weight: 800;
    background: linear-gradient(135deg, #ddd6fe 0%, #a78bfa 50%, #3b82f6 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.75rem;
    letter-spacing: -0.04em;
    line-height: 1.1;
}

.subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    font-weight: 400;
    letter-spacing: 0.02em;
}

/* Search & Filters */
.controls-section {
    position: sticky;
    top: 1rem;
    z-index: 100;
    margin-bottom: 3rem;
    animation: fadeInUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) 0.2s backwards;
}

.search-bar {
    display: flex;
    gap: 1rem;
    background: rgba(17, 24, 39, 0.7);
    padding: 0.75rem;
    border-radius: 1.5rem;
    border: 1px solid var(--border);
    backdrop-filter: blur(20px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    margin-bottom: 1.5rem;
}

.input-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    padding-left: 1rem;
}

.shuffle-btn {
    border: none;
    border-radius: 1rem;
    padding: 0.7rem 1.4rem;
    background: linear-gradient(135deg, #fbbf24 0%, #f97316 100%);
    color: #111827;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(249, 115, 22, 0.35);
    transition: transform 0.2s ease, filter 0.2s ease;
}

.shuffle-btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.05);
}

.shuffle-btn:active {
    transform: translateY(0);
}

input {
    background: transparent;
    border: none;
    padding: 0.75rem;
    color: var(--text);
    font-size: 1.1rem;
    outline: none;
    width: 100%;
}

::placeholder {
    color: rgba(148, 163, 184, 0.5);
}

.filters-wrapper {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    scrollbar-width: none;
}

.filters-wrapper::-webkit-scrollbar {
    display: none;
}

.filter-pill {
    background: var(--glass);
    border: 1px solid var(--border);
    padding: 0.6rem 1.2rem;
    border-radius: 1rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.filter-pill:hover,
.filter-pill.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 4px 12px var(--primary-glow);
}

select {
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--border);
    padding: 0.5rem 1rem;
    border-radius: 0.75rem;
    outline: none;
    cursor: pointer;
}

/* Grid Layout */
.song-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    animation: fadeInUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) 0.4s backwards;
}

/* Report Menu + Dialog */
.context-menu {
    position: fixed;
    min-width: 200px;
    background: rgba(12, 16, 30, 0.98);
    border: 1px solid var(--border);
    border-radius: 0.9rem;
    padding: 0.4rem;
    display: none;
    z-index: 9999;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(16px);
}

.context-menu button {
    width: 100%;
    padding: 0.6rem 0.8rem;
    border: none;
    background: transparent;
    color: var(--text);
    font-size: 0.9rem;
    text-align: left;
    border-radius: 0.6rem;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.context-menu button:hover {
    background: rgba(59, 130, 246, 0.2);
    color: #fff;
}

.report-dialog {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1300;
}

.report-dialog.is-open {
    display: flex;
}

.report-dialog__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 6, 23, 0.82);
    backdrop-filter: blur(6px);
}

.report-dialog__panel {
    position: relative;
    width: min(720px, 92vw);
    max-height: 90vh;
    overflow-y: auto;
    background: rgba(10, 14, 28, 0.95);
    border: 1px solid var(--border);
    border-radius: 1.5rem;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
    padding: 1.5rem;
    z-index: 1;
}

.report-dialog__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.report-dialog__header h3 {
    font-size: 1.3rem;
    letter-spacing: -0.02em;
}

.report-dialog__close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.6rem;
    cursor: pointer;
    padding: 0 0.25rem;
}

.report-dialog__close:hover {
    color: #fff;
}

.report-dialog__content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.report-form {
    display: none;
}

.report-form.active {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.report-card {
    background: rgba(17, 24, 39, 0.7);
    border: 1px solid var(--border);
    border-radius: 1.25rem;
    padding: 1.75rem;
    backdrop-filter: blur(18px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.report-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.25rem;
}

.report-card label {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.report-card input,
.report-card textarea,
.report-card select {
    background: rgba(3, 7, 18, 0.7);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 0.75rem 0.9rem;
    border-radius: 0.75rem;
    font-size: 0.95rem;
}

.report-card textarea {
    resize: vertical;
    min-height: 100px;
}

.captcha-block {
    border: 1px dashed rgba(255, 255, 255, 0.12);
    border-radius: 0.9rem;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.captcha-block.is-hidden {
    position: absolute;
    left: -9999px;
    top: 0;
    width: 1px;
    height: 1px;
    overflow: hidden;
    padding: 0;
    margin: 0;
    border: 0;
}

.captcha-label {
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

.captcha-widget {
    min-height: 65px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.report-submit {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border: none;
    color: white;
    padding: 0.8rem 1rem;
    border-radius: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.report-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(59, 130, 246, 0.35);
}

.report-status {
    font-size: 0.9rem;
    padding: 0.5rem 0.8rem;
    border-radius: 0.6rem;
    display: none;
}

.report-status.success {
    display: block;
    background: rgba(16, 185, 129, 0.2);
    color: #6ee7b7;
}

.report-status.error {
    display: block;
    background: rgba(239, 68, 68, 0.18);
    color: #fca5a5;
}

/* Song Card */
.song-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 1.5rem;
    padding: 1.75rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.song-card:focus-within {
    outline: 2px solid rgba(59, 130, 246, 0.6);
    outline-offset: 3px;
}

.card-thumb {
    position: relative;
    border-radius: 1rem;
    overflow: hidden;
    background: radial-gradient(circle at top, rgba(56, 189, 248, 0.15), rgba(15, 23, 42, 0.6));
    aspect-ratio: 16 / 9;
    margin-bottom: 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.thumb-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
    filter: saturate(1.05) contrast(1.05);
}

.thumb-fade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.1), rgba(2, 6, 23, 0.65));
    opacity: 0.4;
    transition: opacity 0.3s ease;
}

.song-card:hover .thumb-fade,
.song-card:focus-within .thumb-fade {
    opacity: 0.15;
}

.song-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 0;
}

.song-card:hover {
    transform: translateY(-12px);
    border-color: var(--primary);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.card-content {
    position: relative;
    z-index: 1;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.25rem;
}

.song-info h3 {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    background: linear-gradient(to right, #fff, #cbd5e1);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.artist {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.play-action {
    background: var(--primary);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 16px var(--primary-glow);
    cursor: pointer;
    transition: all 0.3s ease;
}

.play-action:hover {
    transform: scale(1.15) rotate(5deg);
    background: #a78bfa;
}

.share-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-muted);
}

.share-btn:hover {
    transform: scale(1.1);
    background: rgba(139, 92, 246, 0.2);
    border-color: var(--primary);
    color: var(--primary);
}

.more-options-btn {
    position: absolute;
    bottom: 1.25rem;
    right: 1.25rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-muted);
    z-index: 10;
}

.more-options-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text);
    border-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

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


.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tag {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.3rem 0.8rem;
    border-radius: 2rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.tag.movie {
    border-color: rgba(59, 130, 246, 0.3);
    color: #60a5fa;
}

.tag.year {
    border-color: rgba(139, 92, 246, 0.3);
    color: #a78bfa;
}

.details-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: auto;
}

.song-id {
    margin-top: 0.75rem;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    word-break: break-all;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.versions-panel {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
}

.versions-list {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding: 0.5rem 0;
    scrollbar-width: none;
}

.version-chip {
    padding: 0.4rem 0.8rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.2s ease;
}

.version-chip:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
    border-color: var(--primary);
}

/* Video Player Overlay */
.video-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.player-container {
    width: 100%;
    max-width: 1100px;
    background: #000;
    border-radius: 2rem;
    overflow: hidden;
    position: relative;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.8);
}

.close-player {
    position: absolute;
    top: 2rem;
    right: 2rem;
    font-size: 2rem;
    color: white;
    cursor: pointer;
    z-index: 1001;
    opacity: 0.6;
    transition: opacity 0.3s;
}

.close-player:hover {
    opacity: 1;
}

video {
    width: 100%;
    display: block;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.loader {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 4rem auto;
    display: none;
}

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

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }

    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    h1 {
        font-size: 2.8rem;
    }

    .search-bar {
        border-radius: 1rem;
    }

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