
:root {
    --color-background: #000;
    --color-surface: #1e1e1e;
    --color-text-primary: #FFFFFF;
    --color-text-secondary: #b3b3b3;
    --color-border: #2c2c2c;
    --color-error: #e53935;
    --font-family: 'Montserrat', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    --header-height: 80px;
    --player-height: 90px;
}


*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family);
    background-color: var(--color-background);
    color: var(--color-text-primary);
    padding-bottom: var(--player-height);
    font-weight: 400;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: var(--color-text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--color-text-primary);
}

button {
    font-family: inherit;
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}


.floating-alert {
    position: fixed;
    left: 50%;
    background-color: var(--color-surface);
    color: var(--color-text-primary);
    border: 2px solid var(--color-error);
    border-radius: 6px;
    padding: 1rem 1.5rem;
    z-index: 2000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    text-align: center;
    max-width: 90%;
    opacity: 0;
    transform: translate(-50%, -100%);
    transition: opacity 0.4s ease, transform 0.4s ease;
    pointer-events: none;
}

.floating-alert.show {
    opacity: 1;
    transform: translate(-50%, 1rem);
}


@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes now-playing-anim-1 {
    0%, 100% { transform: scaleY(0.2); }
    50% { transform: scaleY(1.0); }
}
@keyframes now-playing-anim-2 {
    0%, 100% { transform: scaleY(0.4); }
    25% { transform: scaleY(0.8); }
    75% { transform: scaleY(1.0); }
}
@keyframes now-playing-anim-3 {
    0%, 100% { transform: scaleY(0.5); }
    50% { transform: scaleY(0.2); }
    75% { transform: scaleY(0.9); }
}
@keyframes now-playing-anim-4 {
    0%, 100% { transform: scaleY(0.3); }
    33% { transform: scaleY(0.7); }
    66% { transform: scaleY(0.1); }
}

@keyframes move-gradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}



.main-header {
    background-color: transparent;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1200;
    transition: transform 0.3s ease-in-out, background-color 0.4s ease, backdrop-filter 0.4s ease;
}

.main-header:not(.header-top) {
    background-color: rgba(18, 18, 18, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-border);
}

.main-header.header-hidden {
    transform: translateY(-100%);
}

.header-content {
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
    min-height: var(--header-height);
}

.social-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
}

.social-nav a {
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}


.chladni-logo {
    width: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem;
    overflow: hidden;
}

#chladni-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.hero-logo {
    width: 250px;
    height: 250px;
    margin-bottom: 2rem;
    filter: drop-shadow(0 0 25px rgba(0, 0, 0, 1));
}

.hero-text {
    max-width: 800px;
    color: var(--color-text-primary);
    text-shadow: 0 2px 20px rgba(0, 0, 0, 1);
    font-size: 1.1rem;
    font-weight: 500;
}

.hero-text p {
    line-height: 1.6;
    margin-bottom: 1rem;
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    width: 100%;
    color: white;
    filter: drop-shadow(0 0 10px rgba(0, 0, 0, 1));
    animation: float 2.5s infinite ease-in-out;
    display: flex;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: auto;
    cursor: pointer;
}

.scroll-indicator.visible {
    opacity: 1;
}


main {
    padding-top: 0; 
}

.music-library {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
    align-items: center;
    justify-content: space-between;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.filter-btn {
    background-color: var(--color-surface);
    color: var(--color-text-secondary);
    border: 1px solid var(--color-border);
    border-radius: 20px;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    font-weight: 700;
    transition: all 0.2s ease;
}

.filter-btn:hover {
    background-color: var(--color-border);
    color: var(--color-text-primary);
}

.filter-btn.active {
    color: var(--color-background);
    border-color: transparent;
    background-color: #00ca00;
    /*background-image: linear-gradient(90deg, #FF00EE, #00EEFF, #EEFF00, #FF00EE);*/
    background-size: 300% 100%;
    animation: move-gradient 21s linear infinite;
}

.search-container {
    flex-grow: 1;
    max-width: 300px;
}

#search-input {
    width: 100%;
    background-color: var(--color-surface);
    color: var(--color-text-primary);
    border: 1px solid var(--color-border);
    border-radius: 20px;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    font-family: inherit;
}

#search-input::placeholder {
    color: var(--color-text-secondary);
}


.library-list {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: 1fr;
}

.library-item-wrapper {
    background-color: var(--color-surface);
    border-radius: 6px;
    transition: background-color 0.2s ease;
}

.library-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    cursor: pointer;
    border-radius: 6px;
    transition: background-color 0.2s ease;
}

.library-item:hover {
    background-color: var(--color-border);
}

.library-item.playing,
.library-item.album-open {
    background-color: #2a2a2a;
}

.item-cover-wrapper {
    position: relative;
    width: 50px;
    height: 50px;
    flex-shrink: 0;
}

.item-cover {
    width: 100%;
    height: 100%;
    border-radius: 4px;
}

.now-playing-overlay,
.play-icon-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(24, 24, 24, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.library-item.playing .now-playing-overlay {
    opacity: 1;
}

.library-item-wrapper:hover .play-icon-overlay {
    opacity: 1;
}

.library-item.playing .play-icon-overlay {
    opacity: 0;
}

.now-playing-icon {
    display: flex;
    gap: 2px;
    height: 16px;
    align-items: flex-end;
}
.now-playing-line {
    width: 3px;
    height: 100%;
    background-color: var(--color-primary);
    transform-origin: bottom;
}
.library-item.playing .now-playing-line {
    background-color: #00ca00;
    /*background-image: linear-gradient(90deg, #FF00EE, #00EEFF, #EEFF00, #FF00EE);*/
    background-size: 300% 100%;
}
.library-item.playing .now-playing-line:nth-child(1) { animation: move-gradient 21s linear infinite, now-playing-anim-1 1.2s infinite ease-in-out; }
.library-item.playing .now-playing-line:nth-child(2) { animation: move-gradient 21s linear infinite, now-playing-anim-2 1.4s infinite ease-in-out; }
.library-item.playing .now-playing-line:nth-child(3) { animation: move-gradient 21s linear infinite, now-playing-anim-3 1.1s infinite ease-in-out; }
.library-item.playing .now-playing-line:nth-child(4) { animation: move-gradient 21s linear infinite, now-playing-anim-4 1.3s infinite ease-in-out; }

.play-icon-overlay svg {
    width: 28px;
    height: 28px;
    color: var(--color-text-primary);
}

.item-info {
    flex-grow: 1;
    min-width: 0;
}

.item-title {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.library-item.playing .item-title,
.track-item.playing .track-title,
.track-item.playing .track-duration {
    background-color: #00ca00;
    /*background-image: linear-gradient(90deg, #FF00EE, #00EEFF, #EEFF00, #FF00EE);*/
    background-size: 300% 100%;
    animation: move-gradient 21s linear infinite;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.item-type {
    font-size: 0.8rem;
    color: var(--color-text-secondary);
}


.item-actions {
    position: relative;
}

.more-btn {
    padding: 0.5rem;
    border-radius: 50%;
    color: var(--color-text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.more-btn:hover {
    color: var(--color-text-primary);
}

.more-icon {
    display: block;
    width: 20px;
    height: 20px;
    background-color: currentColor;
    -webkit-mask-image: url('../images/icon-more.svg');
    mask-image: url('../images/icon-more.svg');
    -webkit-mask-size: contain;
    mask-size: contain;
}

.links-dropdown {
    display: none;
}

.links-dropdown-portal {
    position: fixed;
    background-color: #282828;
    border-radius: 4px;
    padding: 0.5rem;
    z-index: 1100;
    min-width: 150px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.links-dropdown-portal a {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--color-text-primary);
    font-size: 0.9rem;
    border-radius: 3px;
}

.links-dropdown-portal a:hover {
    background-color: #3e3e3e;
}


.album-tracklist {
    display: none;
}

.album-tracklist-portal {
    position: absolute;
    background-color: var(--color-surface);
    border-radius: 6px;
    padding: 0.375rem 0.75rem;
    z-index: 900;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.track-item {
    display: flex;
    align-items: center;
    padding: 0.6rem 0;
    border-top: 1px solid var(--color-border);
    cursor: pointer;
}

.track-item:first-child {
    border-top: none;
}

.track-item:hover {
    background-color: var(--color-border);
    border-radius: 4px;
    margin: 0 -0.5rem;
    padding: 0.6rem 0.5rem;
}

.track-title {
    flex-grow: 1;
    font-size: 0.9rem;
}

.track-duration {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
}


.library-item-wrapper.unavailable .library-item {
    cursor: not-allowed;
}

.library-item-wrapper.unavailable .library-item:hover {
    background-color: var(--color-surface); 
}

.library-item-wrapper.unavailable .play-icon-overlay {
    display: none;
}



.player-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: var(--player-height);
    background-color: #181818;
    border-top: 1px solid var(--color-border);
    z-index: 1000;
    transform: translateY(0);
    transition: transform 0.3s ease-in-out;
}

.player-bar.is-hidden {
    transform: translateY(100%);
}

.player-content {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    height: 100%;
}

.song-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.player-cover {
    height: 56px;
    width: 56px;
    border-radius: 4px;
}

.player-title {
    font-weight: 700;
}

.player-artist {
    font-size: 0.8rem;
    color: var(--color-text-secondary);
}

.player-controls-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.player-buttons {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.player-btn {
    position: relative; 
    color: var(--color-text-secondary);
    transition: color 0.2s ease;
    display: flex; 
    justify-content: center; 
    align-items: center; 
    width: 24px; 
    height: 24px; 
}

.player-btn:hover {
    color: var(--color-text-primary);
}

.player-btn.active {
    
    color: var(--color-text-secondary); 
}


#shuffle-btn.active svg,
#repeat-btn.active svg {
    visibility: hidden;
}


#shuffle-btn.active::before,
#repeat-btn.active::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #00ca00;
    /*background-image: linear-gradient(90deg, #FF00EE, #00EEFF, #EEFF00, #FF00EE);*/
    background-size: 300% 100%;
    animation: move-gradient 10s linear infinite;
    -webkit-mask-size: 24px 24px;
    mask-size: 24px 24px;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
}


#shuffle-btn.active::before {
    -webkit-mask-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3e%3cpath fill='black' fill-rule='evenodd' clip-rule='evenodd' d='M10.7663 9.52375L6.23375 5L5 6.23375L9.52375 10.7575L10.7663 9.52375ZM14.1875 5L15.9725 6.785L5 17.7663L6.23375 19L17.215 8.0275L19 9.8125V5H14.1875ZM13.2425 14.4675L14.4763 13.2337L17.215 15.9725L19 14.1875V19H14.1875L15.9813 17.2062L13.2425 14.4675Z'%3e%3c/path%3e%3c/svg%3e");
    mask-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3e%3cpath fill='black' fill-rule='evenodd' clip-rule='evenodd' d='M10.7663 9.52375L6.23375 5L5 6.23375L9.52375 10.7575L10.7663 9.52375ZM14.1875 5L15.9725 6.785L5 17.7663L6.23375 19L17.215 8.0275L19 9.8125V5H14.1875ZM13.2425 14.4675L14.4763 13.2337L17.215 15.9725L19 14.1875V19H14.1875L15.9813 17.2062L13.2425 14.4675Z'%3e%3c/path%3e%3c/svg%3e");
}

#repeat-btn.active::before {
    -webkit-mask-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3e%3cpath fill='black' d='M17,17H7V14L3,18L7,22V19H19V13H17M7,7H17V10L21,6L17,2V5H5V11H7V7Z'%3e%3c/path%3e%3c/svg%3e");
    mask-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3e%3cpath fill='black' d='M17,17H7V14L3,18L7,22V19H19V13H17M7,7H17V10L21,6L17,2V5H5V11H7V7Z'%3e%3c/path%3e%3c/svg%3e");
}

.player-btn svg {
    width: 24px;
    height: 24px;
}

#play-pause-btn {
    background-color: var(--color-text-primary);
    color: #000;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    justify-content: center;
    align-items: center;
}

#play-pause-btn:hover {
    transform: scale(1.05);
}

#play-pause-btn .pause-icon {
    display: none;
}

#play-pause-btn.playing .pause-icon {
    display: block;
}

#play-pause-btn.playing .play-icon {
    display: none;
}

#repeat-btn {
    position: relative;
}

.repeat-one-badge {
    display: none;
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 10px;
    height: 10px;
    background-color: #00ca00;
    /*background-image: linear-gradient(90deg, #FF00EE, #00EEFF, #EEFF00, #FF00EE);*/
    background-size: 300% 100%;
    animation: move-gradient 21s linear infinite;
    color: var(--color-background);
    border-radius: 50%;
    font-size: 7px;
    font-weight: bold;
    line-height: 10px;
    text-align: center;
}

#repeat-btn.repeat-one .repeat-one-badge {
    display: block;
}

.progress-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    max-width: 450px;
}

.progress-container span {
    font-size: 0.75rem;
    color: var(--color-text-secondary);
    min-width: 40px;
    text-align: center;
}

.progress-bar {
    flex-grow: 1;
    height: 4px;
    background-color: #404040;
    border-radius: 2px;
    cursor: pointer;
}

.progress {
    height: 100%;
    width: 0%;
    background-color: #00ca00;
    /*background-image: linear-gradient(90deg, #FF00EE, #00EEFF, #EEFF00, #FF00EE);*/
    background-size: 300% 100%;
    animation: move-gradient 21s linear infinite;
    border-radius: 2px;
    pointer-events: none;
}

.player-volume {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.5rem;
}

#volume-btn {
    width: 20px;
    height: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.volume-icon {
    display: block;
    width: 100%;
    height: 100%;
    background-color: currentColor;
    -webkit-mask-size: cover;
    mask-size: cover;
}

#volume-btn.volume-mute .volume-icon {
    -webkit-mask-image: url('../images/icon-volume-mute.svg');
    mask-image: url('../images/icon-volume-mute.svg');
}

#volume-btn.volume-low .volume-icon {
    -webkit-mask-image: url('../images/icon-volume-low.svg');
    mask-image: url('../images/icon-volume-low.svg');
}

#volume-btn.volume-high .volume-icon {
    -webkit-mask-image: url('../images/icon-volume-high.svg');
    mask-image: url('../images/icon-volume-high.svg');
}

input[type=range] {
    --volume-progress: 100%;
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    cursor: pointer;
    width: 100px;
}

input[type=range]::-webkit-slider-runnable-track {
    height: 4px;
    border-radius: 2px;
    background-image: linear-gradient(to right, #00ca00, #00ca00), linear-gradient(to right, #404040, #404040);
    /*background-image: linear-gradient(to right, #FF00EE, #00EEFF, #EEFF00), linear-gradient(to right, #404040, #404040);*/
    background-size: var(--volume-progress) 100%, 100% 100%;
    background-repeat: no-repeat;
}

input[type=range]::-moz-range-track {
    height: 4px;
    border-radius: 2px;
    background-image: linear-gradient(to right, #00ca00, #00ca00), linear-gradient(to right, #404040, #404040);
    /*background-image: linear-gradient(to right, #FF00EE, #00EEFF, #EEFF00), linear-gradient(to right, #404040, #404040);*/
    background-size: var(--volume-progress) 100%, 100% 100%;
    background-repeat: no-repeat;
}

input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    margin-top: -4px;
    background-color: var(--color-text-primary);
    height: 12px;
    width: 12px;
    border-radius: 50%;
}

input[type=range]::-moz-range-thumb {
    border: none;
    border-radius: 50%;
    background-color: var(--color-text-primary);
    height: 12px;
    width: 12px;
}


.main-footer-bottom {
    padding: 3rem 2rem;
    text-align: center;
}

.footer-logo {
    height: 50px;
    width: 50px;
    margin: 0 auto 2rem;
}

.disclaimers {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    text-align: left;
}

.disclaimer-item h3 {
    margin-bottom: 0.5rem;
    color: var(--color-text-primary);
    font-weight: 700;
}

.disclaimer-item p {
    font-size: 0.8rem;
    color: var(--color-text-secondary);
    line-height: 1.5;
}


@media (min-width: 600px) {
    .library-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 992px) {
    .library-list {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    .social-nav {
        gap: 1rem;
    }
    .social-nav a {
        font-size: 0.8rem;
    }
    .music-library {
        padding: 2rem 1rem;
    }
    .filters {
        flex-direction: column;
        align-items: center;
    }
    .filter-buttons {
        gap: 0.6rem;
    }
    .player-content {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto;
        justify-items: center;
        gap: 0.5rem;
        padding: 1rem;
    }
    .song-info {
        grid-row: 2;
    }
    .player-controls-center {
        grid-row: 1;
        width: 100%;
    }
    .player-buttons {
        gap: 1.5rem;
        justify-content: center;
    }
    .player-volume {
        display: none;
    }
}

@media (max-width: 480px) {
    .hero-logo {
        width: 250px;
        height: 250px;
    }
    .hero-text {
        font-size: 1rem;
        font-weight: 600;
    }
    .player-content .song-info {
        display: none;
    }
    .player-content {
        grid-template-columns: 1fr;
    }
}