/* Custom Styles & Animations */

/* Smooth fade out for enter screen */
.fade-out {
    opacity: 0;
    pointer-events: none;
}

/* Smooth fade in for content */
/* Smooth fade in for content */
.fade-in {
    opacity: 1 !important;
    pointer-events: auto !important;
}

/* Apple Hello Animation (Final Snippet) */
.hello__div {
    display: flex;
    justify-content: center;
    flex-direction: column;
    margin: 0 auto;
    text-align: center;
    width: 100%;
}

.hello__svg {
    fill: none;
    stroke: #fff;
    stroke-linecap: round;
    stroke-miterlimit: 10;
    animation: anim__hello linear 5s forwards;
    width: 320px;
    /* Larger base size */
    margin: 0 auto;
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.25));
}

@media (min-width: 768px) {
    .hello__svg {
        width: 500px;
        /* Big impact on desktop */
    }
}

@keyframes anim__hello {
    0% {
        stroke-dashoffset: 5800;
        stroke-dasharray: 5800;
        opacity: 0;
    }

    15% {
        opacity: 1;
    }

    100% {
        stroke-dashoffset: 0;
        stroke-dasharray: 5800;
        opacity: 1;
    }
}

.click-prompt {
    animation: fade-in-static 1.5s ease-out 5.2s forwards;
}

@keyframes fade-in-static {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animations */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-up {
    animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
    /* Starte hidden */
}

.delay-100 {
    animation-delay: 0.1s;
}

.delay-200 {
    animation-delay: 0.2s;
}

.delay-300 {
    animation-delay: 0.3s;
}

/* Panel utility - Glassmorphism */
.glass-panel {
    background: rgba(10, 10, 15, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

/* Tooltip Styles (Premium Glassmorphism) */
[data-tooltip] {
    position: relative;
}

[data-tooltip]::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.9);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border-radius: 8px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    margin-bottom: 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    z-index: 100;
}

/* Tooltip Arrow */
[data-tooltip]::after {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    border-width: 6px 6px 0 6px;
    border-style: solid;
    border-color: rgba(255, 255, 255, 0.1) transparent transparent transparent;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    margin-bottom: 8px;
    pointer-events: none;
}

[data-tooltip]:hover::before,
[data-tooltip]:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.mask-image-linear-gradient {
    -webkit-mask-image: linear-gradient(to right, transparent, black 40%);
    mask-image: linear-gradient(to right, transparent, black 40%);
}

/* Minimal Volume Slider (Horizontal) */
input[type=range].minimal-slider {
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    cursor: pointer;
    height: 2px;
    border-radius: 5px;
    width: 100%;
    margin: 0;
}

input[type=range].minimal-slider:focus {
    outline: none;
}

/* Chrome/Safari Thumb */
input[type=range].minimal-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    height: 10px;
    width: 10px;
    border-radius: 50%;
    background: #ffffff;
    cursor: pointer;
    margin-top: -4px;
    /* (ThumbHeight - TrackHeight) / 2 * -1  => (10 - 2)/2 * -1 = -4 */
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
    transition: transform 0.1s;
}

/* Firefox Thumb */
input[type=range].minimal-slider::-moz-range-thumb {
    height: 10px;
    width: 10px;
    border: none;
    border-radius: 50%;
    background: #ffffff;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

input[type=range].minimal-slider:hover::-webkit-slider-thumb {
    transform: scale(1.2);
}

/* Track Styling */
input[type=range].minimal-slider::-webkit-slider-runnable-track {
    width: 100%;
    height: 2px;
    cursor: pointer;
    background: transparent;
    /* Important: Let input background (gradient) show through */
    border-radius: 99px;
}

input[type=range].minimal-slider::-moz-range-track {
    width: 100%;
    height: 2px;
    cursor: pointer;
    background: transparent;
    border-radius: 99px;
}

/* Source Protection CSS */
body {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

img {
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
}

/* Firefox Thumb */
input[type=range].minimal-slider::-moz-range-thumb {
    height: 12px;
    width: 12px;
    border: none;
    border-radius: 50%;
    background: #ffffff;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

input[type=range].minimal-slider:hover::-webkit-slider-thumb {
    transform: scale(1.2);
}

/* Track Styling */
input[type=range].minimal-slider::-webkit-slider-runnable-track {
    width: 100%;
    height: 2px;
    cursor: pointer;
    background: transparent;
    /* Important: Let input background (gradient) show through */
    border-radius: 99px;
}

input[type=range].minimal-slider::-moz-range-track {
    width: 100%;
    height: 2px;
    cursor: pointer;
    background: transparent;
    border-radius: 99px;
}

/* --- Mouse Trail --- */
.mouse-dot {
    position: absolute;
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    box-shadow: 0 0 10px white, 0 0 20px rgba(255, 255, 255, 0.5);
    opacity: 1;
    transition: width 0.3s, height 0.3s, opacity 0.3s;
}

/* --- Music Visualizer --- */
@keyframes v-pulse {

    0%,
    100% {
        height: 4px;
        opacity: 0.5;
    }

    50% {
        height: 12px;
        opacity: 1;
    }
}

@keyframes v-pulse-short {

    0%,
    100% {
        height: 3px;
        opacity: 0.4;
    }

    50% {
        height: 8px;
        opacity: 0.8;
    }
}

#music-visualizer.visualizing .v-bar {
    animation: v-pulse 0.6s ease-in-out infinite;
}

#music-visualizer.visualizing .v-bar:nth-child(1) {
    animation-duration: 0.45s;
    animation-delay: 0.1s;
}

#music-visualizer.visualizing .v-bar:nth-child(2) {
    animation-duration: 0.7s;
    animation-delay: 0.3s;
    animation-name: v-pulse-short;
}

#music-visualizer.visualizing .v-bar:nth-child(3) {
    animation-duration: 0.55s;
    animation-delay: 0.0s;
}

#music-visualizer.visualizing .v-bar:nth-child(4) {
    animation-duration: 0.65s;
    animation-delay: 0.2s;
    animation-name: v-pulse-short;
}

#music-visualizer.visualizing .v-bar:nth-child(5) {
    animation-duration: 0.5s;
    animation-delay: 0.4s;
}

/* --- Parallax Support --- */
[data-parallax] {
    transition: transform 0.1s ease-out;
    will-change: transform;
}

/* --- Theme Customizer --- */
#customizer-panel {
    background: rgba(10, 10, 15, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.7);
}

#customizer-panel.active {
    opacity: 1;
    scale: 1;
    pointer-events: auto;
    transform: translateY(-5px);
}

input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

input[type="color"]::-webkit-color-swatch {
    border: none;
    border-radius: 4px;
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.1);
}

#customizer-toggle i {
    transition: transform 0.5s ease;
}

#customizer-toggle:hover i {
    transform: rotate(45deg);
}

/* Shiny Text Animation */
.shiny-text {
    background: linear-gradient(
        to right,
        #b6b6b6 0%,
        #ffffff 50%,
        #b6b6b6 100%
    );
    background-size: 200% auto;
    color: #000;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shine 3s linear infinite;
    display: inline-block;
}

@keyframes shine {
    to {
        background-position: 200% center;
    }
}