:root {
    --bg-light: #1a1a1a;
    --text: #e0e0e0;
    --muted: #888;
    --accent: #EBEBEB;
    --border: #222;
    --glow-color: transparent; /* Default: no glow */
}

/* Global Reset */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
}

/* Body and Background */
body {
    font-family: 'Poppins', sans-serif;
    background-color: #0F0F1A;
    color: #E0E0E0;
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Subtle Wave Background */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 30%, rgba(79, 195, 247, 0.05) 0%, transparent 30%),
        radial-gradient(circle at 80% 70%, rgba(245, 158, 11, 0.05) 0%, transparent 30%);
    z-index: -1;
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    background-color: #0F0F1A;
    flex-wrap: wrap;
}

.logo-container {
    display: flex;
    align-items: center;
}

.header-logo {
    width: 40px;
    height: 40px;
    margin-right: 12px;
}

.logo {
    font-size: 22px;
    font-weight: 500;
    color: white;
    letter-spacing: 2px;
    text-decoration: none;
    transition: opacity 0.3s;
}

.logo-container:hover .header-logo,
.logo-container:hover .logo {
    opacity: 0.8;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
    background: rgba(20, 20, 40, 0.2);
    padding: 12px 20px;
    border-radius: 25px;
    backdrop-filter: blur(3px);
}

nav li {
    display: flex;
    align-items: center;
}

nav a {
    color: #CCC;
    text-decoration: none;
    font-size: 14px;
    padding: 0 5px;
    position: relative;
    transition: color 0.3s;
}

nav a::after {
    content: "";
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 0;
    height: 2px;
    opacity: 0.8;
    background: linear-gradient(90deg, #4FC3F7, #F59E0B);
    transition: width 0.3s;
}

nav a:hover {
    color: white;
}

nav a:hover::after {
    width: 100%;
}

/* Page Header */
.page-header {
    text-align: center;
    padding: 60px 20px 30px;
}

.page-header h1 {
    font-size: 36px;
    color: white;
    margin-bottom: 20px;
}

.back-link {
    color: #CCC;
    margin-bottom: 20px;
}

.back-link:hover {
    color: #EBEBEB;
}

/* Track List */
.track-list {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 28px;
    padding-bottom: 40px;
}

/* Track Item */
.track-item {
    background: var(--bg-light);
    border-radius: 10px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    border: 1px solid var(--border);
    overflow: hidden;
    transition: background 0.2s ease, border-color 0.2s ease;
    max-width: 100%; 
    box-sizing: border-box; 
}

.track-item:hover {
    background: #1d1d1d;
    border-color: #333;
}

/* Header (collapsed) */
.track-header {
    cursor: pointer;
    padding: 5px 10px;
}

.track-header:hover {
    opacity: 0.8;
}

.track-title {
    font-size: 18px;
    font-weight: 500;
}

.track-meta {
    font-size: 13px;
    color: var(--muted);
}

/* Layout for track-main to align album art and meta info side by side */
.track-main {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 20px;
    padding-left: 10px;
    width: 100%;
    max-width: 100%; 
    box-sizing: border-box;
}

/* Album Art */
.track-cover {
    width: 130px;
    height: 130px;
    object-fit: cover;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
    flex-shrink: 0;
    transition: box-shadow 0.3s ease;
}

/* Glow effect for album art */
.track-cover.glow {
    box-shadow: 0 0 10px 2px var(--glow-color);
}

/* Meta Info Container */
.track-info-right {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
}

/* Meta Info Details */
.track-meta-details {
    margin-top: 0;
    font-size: 14px;
    color: var(--muted);
}

.track-meta-details div {
    margin-bottom: 5px;
}

/* Streaming Links */
.streaming-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.streaming-links a,
.bandcamp-link {
    display: inline-block;
    padding: 6px 12px;
    background-color: transparent;
    color: var(--muted);
    text-decoration: none;
    border: 1px solid rgba(128, 128, 128, 0.3);
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.3s ease;
    background-image: linear-gradient(var(--bg-light), var(--bg-light));
    background-origin: border-box;
    background-clip: padding-box, border-box;
}

.streaming-links a:hover,
.bandcamp-link:hover {
    color: #4FC3F7;
    transform: translateY(-1px);
    background-image:
        linear-gradient(var(--bg-light), var(--bg-light)),
        linear-gradient(90deg, #4FC3F7, #F59E0B);
    box-shadow: 0 0 8px rgba(79, 195, 247, 0.25);
}

/* Expandable Details */
.track-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
    padding: 0 10px;
}

.track-item.active .track-details {
    max-height: none;
    padding: 10px 0;
}

/* Waveform */
.waveform-container {
    width: 100%;
    height: auto;
    min-height: 70px;
    background: #212020;
    border-radius: 6px;
    position: relative;
    margin-top: 15px;
    overflow: hidden;
}

.waveform-container canvas {
    width: 100%;
    height: 100%;
    position: relative;
    display: block;
}

/* Footer */
footer {
    text-align: center;
    padding: 60px 50px;
    position: relative;
    font-size: 14px;
    color: #AAA;
}

footer::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, #4FC3F7, #F59E0B);
}

.footer-content {
    max-width: 600px;
    margin: 0 auto;
}

.footer-links {
    margin-bottom: 20px;
}

.footer-links a {
    color: #CCC;
    margin: 0 15px;
}

.copyright {
    margin-top: 20px;
    font-size: 12px;
    color: #888;
}

/* Responsive */
@media (max-width: 768px) {
    .track-main {
        flex-direction: column;
        align-items: center;
        padding-left: 10px;
        gap: 15px;
    }

    .track-cover {
        width: 100%;
        max-width: 140px;
        align-self: center;
    }

    .track-info-right {
        width: 100%;
        text-align: center;
    }

    .waveform-container {
        width: 100%;
        height: auto;
        min-height: 70px;
    }

    .waveform-container canvas {
        width: 100%;
        height: 100%;
    }

    .track-meta-details {
        width: 100%;
        text-align: left;
    }

    .streaming-links {
        justify-content: center;
    }

    .header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .logo-container {
        justify-content: center;
        width: 100%;
    }

    nav {
        width: 100%;
    }

    nav ul {
        width: 100%;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 12px;
        padding: 10px 14px;
        border-radius: 12px;
    }

    nav li {
        flex: 1 1 auto;
        justify-content: center;
    }

    nav a {
        font-size: 13px;
        padding: 6px 8px;
    }
}