/* General Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(
        to bottom,
        #1c1c22,
        #2a2a3a 15%,
        #3a3a52 30%,
        #4a4a6a 45%,
        #5a5a82 60%,
        #6a6a9a 75%,
        #7a7ab2 90%,
        #8a8aca 100%
    );
    overflow: hidden;
    font-family: "Arial", sans-serif;
    cursor: none; /* Hide default cursor */
    position: relative;
    transition: box-shadow 1s ease-in-out;
}

body.bright {
    box-shadow: inset 0 0 50px 25px rgba(100, 200, 255, 0.5);
}

/* Noise Overlay to Break Banding */
body::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><filter id="noise"><feTurbulence type="fractalNoise" baseFrequency="10" numOctaves="16" stitchTiles="stitch" /></filter><rect width="100" height="100" filter="url(%23noise)" fill-opacity="0.3" /></svg>');
    background-size: cover;
    mix-blend-mode: overlay; /* Blends noise with gradient */
    opacity: 0.1; /* Subtle texture */
    pointer-events: none;
}

/* Title Styling */
.title {
    font-family: "Arial Black", sans-serif;
    font-size: 20vw;
    font-weight: 900;
    position: relative;
    background: linear-gradient(
        90deg,
        rgba(255, 111, 145, 0.9),
        rgba(96, 123, 245, 0.9)
    );
    background-clip: text;
    -webkit-background-clip: text;
    text-fill-color: transparent;
    -webkit-text-fill-color: transparent;
    animation: gradientMove 6s linear infinite;
    text-shadow: 0 0 2px rgba(255, 255, 255, 0.3);
    z-index: 1;
}

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

/* Frost Overlay */
.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.shape {
    position: absolute;
    width: 40vmin;
    height: 40vmin;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    animation: float 8s ease-in-out infinite;
    backdrop-filter: blur(6px);
    z-index: 4;
    transition:
        background 0.5s ease-in-out,
        transform 0.05s ease-out,
        blur 1s ease-in-out,
        box-shadow 0.5s ease-in-out;
}

.shape.active {
    background: rgba(100, 200, 255, 0.45);
    mix-blend-mode: add;
    backdrop-filter: blur(3px);
    box-shadow:
        0 0 10px rgba(100, 200, 255, 0.5),
        0 0 20px rgba(100, 200, 255, 0.4),
        0 0 30px rgba(100, 200, 255, 0.3);
    transition:
        background 0.5s ease-in-out,
        transform 0.05s ease-out,
        backdrop-filter 1s ease-in-out,
        box-shadow 0.5s ease-in-out;
}

.shape.active.bright {
    background: rgba(100, 200, 255, 0.5);
    mix-blend-mode: add;
    backdrop-filter: blur(1px);
    box-shadow:
        0 0 20px rgba(100, 200, 255, 0.8),
        0 0 40px rgba(153, 219, 255, 0.4);
    transition:
        background 0.5s ease-in-out,
        transform 0.1s ease-out,
        backdrop-filter 0.5s ease-in-out,
        box-shadow 0.5s ease-in-out;
}

/* Custom Cursor */
.cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 12px;
    height: 12px;
    background: rgba(255, 111, 145, 0.9);
    border: 2px solid rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    pointer-events: none;
    box-shadow: none; /* Remove box-shadow to prevent double artifacts in Safari */
    transform: translate(-50%, -50%);
    transition:
        width 0.1s ease,
        height 0.1s ease,
        transform 0.05s ease-out;
    z-index: 4;
}

.cursor.active {
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.3);
    box-shadow: none; /* Remove box-shadow to prevent double artifacts in Safari */
}

.consent {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(30deg, #2a2a3a, #4a4a6a);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    cursor: pointer;
    padding: 2rem;
}

.consent h1 {
    font-size: 8vw;
    margin: 1rem 0;
    width: 40%;
    text-align: center;
}

.consent p {
    font-size: 1.2em;
    margin: 1rem 0;
    width: 30%;
    text-align: center;
}

@media (max-width: 768px), (orientation: portrait) {
    .consent h1,
    .consent p {
        width: 100%;
    }
}

.consent .anywhere {
    background: linear-gradient(
        90deg,
        rgba(255, 111, 145, 0.9),
        rgba(96, 123, 245, 0.9)
    );
    background-clip: text;
    -webkit-background-clip: text;
    text-fill-color: transparent;
    -webkit-text-fill-color: transparent;
    animation: gradientMove 6s linear infinite;
}

.debug {
    position: absolute;
    bottom: 0;
    left: 0;
    color: white;
    font-size: medium;
    display: none;
}
