html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: 'Inter', 'Circular', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background-color: #121212;
    color: #FFFFFF;
}

:root {
    --spotify-black: #121212;
    --spotify-dark-gray: #181818;
    --spotify-gray: #282828;
    --spotify-light-gray: #B3B3B3;
    --spotify-green: #1DB954;
    --spotify-green-hover: #1ED760;
}

.cover {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    z-index: 1;
    padding: 0 20px;
    background: var(--spotify-black);
}

.cover::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 80%, rgba(29, 185, 84, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(29, 185, 84, 0.05) 0%, transparent 50%);
    animation: pulse 4s ease-in-out infinite alternate;
}

@keyframes pulse {
    0% { opacity: 0.3; }
    100% { opacity: 0.6; }
}

.music-icon {
    font-size: 4em;
    margin-bottom: 20px;
    color: var(--spotify-green);
    animation: bounce 2s infinite;
    filter: drop-shadow(0 0 10px rgba(29, 185, 84, 0.3));
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

.title {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    font-weight: 900;
    margin: 0 0 20px 0;
    letter-spacing: -0.02em;
    text-shadow: 0 4px 8px rgba(0,0,0,0.5);
    animation: fadeInUp 1s ease-out;
}

.subtitle {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    margin: 0 0 40px 0;
    opacity: 0.8;
    max-width: 600px;
    line-height: 1.6;
    color: var(--spotify-light-gray);
    animation: fadeInUp 1s ease-out 0.5s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .top-nav {
        padding: 12px 16px;
        flex-direction: column;
        gap: 16px;
    }

    .top-nav nav {
        width: 100%;
        justify-content: center;
    }

    .section {
        padding: 120px 16px 40px;
    }

    .viz-container {
        gap: 16px;
    }

    .title {
        font-size: 2.5rem;
    }
}


/* main page */
.top-nav {
    position: fixed;
    top: 0;
    width: 96%;
    background: rgba(18, 18, 18, 0.85);
    padding: 1% 2%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(20px);
    transform: translateY(0);
    transition: transform 0.3s ease;
}

.top-nav.hidden {
    transform: translateY(-100%);
}

.top-nav:hover {
    transform: translateY(0) !important;
}

.top-nav h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 300;
    color: #FFFFFF;
}

.title-link {
    text-decoration: none;
    color: inherit;
}

.title-link:hover h2 {
    color: var(--spotify-green);
}

.top-nav nav {
    display: flex;
    gap: 8px;
}

.nav-link {
    text-decoration: none;
    color: var(--spotify-light-gray);
    padding: 12px 24px;
    border-radius: 500px;
    transition: all 0.2s ease;
    /* font-weight: 600; */
    font-size: 100%;
}

.nav-link:hover {
    background-color: var(--spotify-gray);
    color: #FFFFFF;
}

.nav-link.active {
    background-color: var(--spotify-green);
    color: #FFFFFF;
}

.section {
    min-height: 100vh;
    padding: 80px 32px 80px;
    background: var(--spotify-black);
    color: #FFFFFF;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.text {
    max-width: 800px;
    text-align: center;
    margin-bottom: 48px;
}

.text h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 900;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.text p {
    font-size: clamp(1rem, 2vw, 1.125rem);
    line-height: 1.6;
    color: var(--spotify-light-gray);
    margin: 0;
}

.intro {
    height: 100vh;
}

.viz-container {
    display: flex;
    gap: 32px;
    width: 100%;
    max-width: 1200px;
    flex-wrap: wrap;
    justify-content: center;
}

#dashboard {
    margin-top: 32px;
    height: 600px;
    background: var(--spotify-dark-gray);
    border-radius: 12px;
    border: 1px solid var(--spotify-gray);
    width: 100%;
    max-width: 1000px;
}

/* --- Duration Section --- */

.duration-stat {
    font-size: clamp(4rem, 10vw, 8rem);
    font-weight: 900;
    color: var(--spotify-green);
    text-align: center;
    margin-bottom: 32px;
    letter-spacing: -0.04em;
    line-height: 1;
}

.duration-stat .stat-label {
    display: block;
    font-size: clamp(0.875rem, 1.5vw, 1.125rem);
    font-weight: 400;
    color: var(--spotify-light-gray);
    margin-top: 8px;
    letter-spacing: 0;
}

#duration-line {
    width: 100%;
    max-width: 800px;
    background: var(--spotify-dark-gray);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}

#duration-line svg {
    display: block;
    width: 100%;
    height: auto;
}

.duration-tooltip {
    position: absolute;
    pointer-events: none;
    background: var(--spotify-gray);
    color: #FFFFFF;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.6;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    opacity: 0;
    transition: opacity 0.15s ease;
    z-index: 100;
    white-space: nowrap;
}

.duration-tooltip.visible {
    opacity: 1;
}

.duration-tooltip strong {
    color: var(--spotify-green);
}