/* --- FONTS --- */
.vt323-regular {
    font-family: "VT323", monospace;
    font-weight: 400;
    font-style: normal;
}

/* --- BACKGROUND & ANIMATIONS --- */
@property --gradient-angle {
    syntax: "<angle>";
    initial-value: 0deg;
    inherits: false;
}

body {
    margin: 0;
    padding: 0;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    transition: background 0.1s ease-out;
    background-color: black;
    background-image: linear-gradient(
        var(--gradient-angle, 0deg),
        black,
        black
    );
    background-attachment: fixed;
    display: flex;
    justify-content: center;
    align-items: center;
    -webkit-transform: translateZ(0);
    will-change: --gradient-angle;
}

.rotating-background {
    animation: rotateGradient 10s linear infinite;
}

@keyframes rotateGradient {
    from {
        --gradient-angle: 0deg;
    }
    to {
        --gradient-angle: 360deg;
    }
}

@keyframes shakeOnigiri {
    0% {
        transform: scale(1) rotate(0deg);
    }
    25% {
        transform: scale(1.1) rotate(-8deg);
    }
    50% {
        transform: scale(1.1) rotate(8deg);
    }
    75% {
        transform: scale(1.1) rotate(-8deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
    }
}

.shake {
    animation: shakeOnigiri 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

/* --- METADATA --- */
#metadata-container {
    position: absolute;
    top: calc(50% - 15rem);
    width: 100%;
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    font-family: "VT323", monospace;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#metadata-container.show-title {
    opacity: 1;
}

#song-title {
    font-size: 2.5rem;
    text-transform: uppercase;
    margin: 0;
    line-height: 1;
}

#song-artist {
    font-size: 1.2rem;
    opacity: 0.8;
    text-transform: uppercase;
}

/* --- CONTROLS --- */
#player-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    z-index: 10;
}

.main-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    width: auto;
}

/* --- ONIGIRI --- */
#onigiri-link {
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    user-select: none;
    transition: transform 0.2s ease;
    filter: none;
    will-change: filter, transform;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

#onigiri-img {
    width: 12rem;
    height: auto;
    pointer-events: none;
}

#onigiri-link:hover {
    transform: scale(1.05) translateZ(0);
}

#onigiri-link:active {
    transform: scale(0.95) translateZ(0);
}

.glow-active {
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 1))
        drop-shadow(0 0 60px rgba(255, 255, 255, 0.6)) !important;
}

/* --- BUTTONS --- */
.nav-btn {
    width: 3.5rem;
    height: 3.5rem;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    display: flex;
    justify-content: center;
    align-items: center;
    transition:
        opacity 0.3s ease,
        transform 0.2s ease;
}

.show-nav .nav-btn {
    opacity: 0.2;
    pointer-events: auto;
}

.show-nav .nav-btn:hover {
    opacity: 1 !important;
}

.nav-btn:active {
    transform: scale(0.9);
}

.show-nav .nav-btn.limit-reached,
.show-nav .nav-btn.limit-reached:hover {
    opacity: 0.1 !important;
    cursor: default;
    transform: none;
}

.nav-btn svg {
    width: 100%;
    height: 100%;
}
