:root {
    --bg-color: #0b0f19;
    --primary-color: #6366f1;
    --secondary-color: #ec4899;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --font-family: 'Outfit', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    line-height: 1.6;
}

/* Background Animation */
.background-animation {
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 50% 50%, rgba(99, 102, 241, 0.15), transparent 60%),
        radial-gradient(circle at 80% 20%, rgba(236, 72, 153, 0.15), transparent 50%);
    animation: rotateBg 30s linear infinite;
    z-index: -1;
    pointer-events: none;
}

@keyframes rotateBg {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Header */
.hero {
    text-align: center;
    padding: 6rem 2rem 4rem;
    position: relative;
}

.logo-wrapper {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.main-logo-img {
    width: 120px;
    height: 120px;
    object-fit: contain;
    border-radius: 30px;
    box-shadow: 0 10px 30px rgba(236, 72, 153, 0.4), inset 0 0 20px rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.1);
    animation: floatLogo 6s ease-in-out infinite;
    backdrop-filter: blur(10px);
}

@keyframes floatLogo {
    0% {
        transform: translateY(0px) scale(1);
    }

    50% {
        transform: translateY(-10px) scale(1.02);
    }

    100% {
        transform: translateY(0px) scale(1);
    }
}

.logo {
    font-size: 4.5rem;
    font-weight: 800;
    letter-spacing: -1.5px;
    background: linear-gradient(135deg, #a855f7, #ec4899, #f43f5e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.glow-text {
    text-shadow: 0 0 30px rgba(236, 72, 153, 0.3);
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    font-weight: 300;
    margin-bottom: 2.5rem;
}

.subtitle strong {
    color: var(--text-main);
    font-weight: 600;
}

.artist-badge {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 1.2rem 3rem;
    border-radius: 50px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.artist-badge:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.2);
}

.artist-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    color: var(--text-muted);
}

.artist-name {
    font-size: 1.8rem;
    font-weight: 600;
    margin-top: 0.2rem;
    background: linear-gradient(135deg, #60a5fa, #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Section */
.section-title {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 3rem;
    position: relative;
    display: inline-block;
    color: #e2e8f0;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

/* Grid & Cards */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.song-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2.5rem 2rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.song-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.song-card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.7),
        0 0 20px rgba(99, 102, 241, 0.25);
}

.song-card:hover::before {
    opacity: 1;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.song-title {
    font-size: 1.6rem;
    font-weight: 600;
    line-height: 1.2;
    margin-right: 1rem;
    color: #fff;
}

.badge {
    background: rgba(99, 102, 241, 0.15);
    color: #a5b4fc;
    border: 1px solid rgba(99, 102, 241, 0.3);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    letter-spacing: 0.5px;
}

.card-body {
    position: relative;
    z-index: 1;
}

.lyrics-preview {
    font-size: 1rem;
    color: var(--text-muted);
    font-style: italic;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 2rem;
    line-height: 1.7;
}

.read-more {
    display: inline-flex;
    align-items: center;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.read-more::after {
    content: '→';
    margin-left: 8px;
    transition: transform 0.3s ease;
}

.song-card:hover .read-more {
    color: #818cf8;
}

.song-card:hover .read-more::after {
    transform: translateX(6px);
}

.song-description {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.audio-container {
    width: 100%;
    margin-top: 1rem;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.5rem;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.2);
}

.audio-player {
    width: 100%;
    height: 40px;
    outline: none;
    border-radius: 50px;
}

/* Custom styling specifically targeting pseudo-elements for webkit (Chrome/Safari) */
.audio-player::-webkit-media-controls-panel {
    background-color: #1e293b;
    border-radius: 50px;
}

.audio-player::-webkit-media-controls-current-time-display,
.audio-player::-webkit-media-controls-time-remaining-display {
    color: #cbd5e1;
}

.loader {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem;
    color: var(--text-muted);
    font-size: 1.2rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.5;
    }
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    /* Avoid double scrolling */
    background-color: rgba(5, 7, 15, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.modal.show {
    opacity: 1;
}

.glass-panel {
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8),
        0 0 40px rgba(99, 102, 241, 0.1);
}

.modal-content {
    margin: 4% auto;
    padding: 3.5rem;
    width: 90%;
    max-width: 750px;
    max-height: 85vh;
    /* Keep within viewport */
    border-radius: 24px;
    position: relative;
    transform: translateY(30px) scale(0.95);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
}

.modal.show .modal-content {
    transform: translateY(0) scale(1);
}

.close-btn {
    position: absolute;
    top: 1.5rem;
    right: 2rem;
    color: var(--text-muted);
    font-size: 2.5rem;
    font-weight: 300;
    cursor: pointer;
    transition: color 0.3s ease, transform 0.3s ease;
    line-height: 1;
    z-index: 10;
}

.close-btn:hover {
    color: white;
    transform: scale(1.1);
}

.modal-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--glass-border);
    padding-right: 3rem;
    /* Avoid overlapping with close button */
    flex-shrink: 0;
}

#modal-title {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 0.8rem;
    color: #fff;
}

.modal-body {
    overflow-y: auto;
    padding-right: 1rem;
    flex-grow: 1;
}

/* Custom Scrollbar for modal */
.modal-body::-webkit-scrollbar {
    width: 6px;
}

.modal-body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 10px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

.modal-body pre {
    font-family: var(--font-family);
    font-size: 1.2rem;
    line-height: 2;
    color: #e2e8f0;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.modal-footer {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--glass-border);
    color: var(--text-muted);
    font-size: 0.95rem;
    flex-shrink: 0;
}

footer {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
    border-top: 1px solid var(--glass-border);
    margin-top: 5rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.5), transparent);
}

.footer-subtext {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    opacity: 0.7;
}

@media (max-width: 768px) {
    .logo {
        font-size: 3.2rem;
    }

    .hero {
        padding: 4rem 1.5rem 2rem;
    }

    .modal-content {
        padding: 2.5rem;
        margin: 8% auto;
        max-height: 80vh;
    }

    #modal-title {
        font-size: 1.8rem;
    }

    .modal-body pre {
        font-size: 1.05rem;
    }

    .artist-badge {
        padding: 1rem 2rem;
    }

    .artist-name {
        font-size: 1.5rem;
    }
}