:root {
    --main-color: #414073;
    --secondary-color: #568EA3;
    --brightness-level: 1;
    --star-color: white;
    --accent1-color: #26C485;
    --accent2-color: #D8315B;
    --light-color: #F4EBE8;

}

body {}


body {
    position: relative;
    /* Essential for the ::before to work */
    background-color: var(--secondary-color);
    z-index: 1;
    /* Establishes a stacking context */
    overflow: auto;
    min-height: 100vh;
    margin: 0;
    /* Allows the body to grow with content */
    display: flex;
    /*justify-content: center;*/
    /*align-items: center;*/
    flex-direction: column;
}

body::before {
    content: "";
    position: absolute;

    width: 120%;
    height: 120%;
    z-index: -1;
    top: -10%;
    left: -10%;


    background-color: var(--main-color);
    /* Deep Navy */
    background-image:
        radial-gradient(circle at 0% 0%, var(--secondary-color) 0%, transparent 60%),
        radial-gradient(circle at 95% 5%, var(--light-color) 0%, transparent 35%);
}

.container {
    display: flex;
    flex-wrap: wrap;


    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    margin: 1%;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
    border-radius: 24px;
    position: relative;
    border: 2px solid var(--accent1-color);


}

.text-area {
    position: relative;
    flex: 1.5;
    height: auto;
    border-radius: 15px;
    overflow: hidden;
    scroll-behavior: auto;
    justify-content: center;
    align-items: center;
    border: 2px solid var(--accent1-color);


}

.movie {
    position: relative;
    width: 25%;
    height: 400px;

}

.music {
    position: relative;
    width: 25%;
    height: 285px;
}

.regRec {
    background: var(--accent1-color);
    width: 100px;
    height: 25px;
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 4px;

}

.smallText {
    color: white;
    text-shadow: none;

    position: relative;
    font-size: 0.7rem;
    opacity: 80%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    width: 100%;

}

.music-energy-bar {
    -webkit-appearance: none;
    appearance: none;
    width: 55%;
    background: transparent;
    cursor: pointer;
}

/* The Track (The gradient bar) */
.music-energy-bar::-webkit-slider-runnable-track {
    background: linear-gradient(90deg, #00c6ff 0%, #f6d365 50%, #ff4b2b 100%);
    height: 8px;
    border-radius: 10px;
}

.music-energy-bar::-moz-range-track {
    background: linear-gradient(90deg, #00c6ff 0%, #f6d365 50%, #ff4b2b 100%);
    height: 8px;
    border-radius: 10px;
}

/* The Thumb (The "cool" handle) */
.music-energy-bar::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    margin-top: -6px;
    /* Centers handle on the track */
    background-color: #ffffff;
    height: 20px;
    width: 20px;
    border-radius: 50%;
    border: 2px solid #FF4500;
    box-shadow: 0px 0px 10px rgba(255, 69, 0, 0.5);
    transition: 0.2s ease-in-out;
}

.music-energy-bar::-moz-range-thumb {
    background-color: #ffffff;
    height: 20px;
    width: 20px;
    border-radius: 50%;
    border: 2px solid #FF4500;
    box-shadow: 0px 0px 10px rgba(255, 69, 0, 0.5);
}

/* Hover effect for the handle */
.music-energy-bar:hover::-webkit-slider-thumb {
    transform: scale(1.2);
    box-shadow: 0px 0px 15px rgba(255, 204, 0, 0.8);
}



@keyframes fall {
    0% {
        transform: translateY(-20px);
        opacity: 0.8;
        /* Visible at start */
    }

    50% {
        opacity: 0.8;
        /* STILL visible near the bottom */
    }

    100% {
        transform: translateY(400px);
        opacity: 0;
        /* NOW fade out instantly at the end */
    }
}


/* The Raindrop styling */
.drop {
    position: absolute;
    top: -20px;
    /* Start just above the view */
    width: 2px;
    height: 15px;
    background: #a9d6e5;
    opacity: 0.8;
    border-radius: 5px;
    animation: fall 1s linear infinite;
    /* Loop forever */
}

.snowflake {
    position: absolute;
    top: -20px;
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    opacity: 0.8;
    filter: blur(1px);
    animation: fall linear infinite;
}

.clouds {
    /* Top is light/white, bottom is blue */
    opacity: 0.8;
    border: 2px solid var(--accent1-color);
    display: flex;
}

.p5Canvas {
    background-color: transparent;
    !important;
    z-index: 0;
}

.clouds canvas {
    top: 0;
    left: 0;

    position: absolute;
    width: 100% !important;
    height: 100% !important;
    display: flex;
    will-change: contents;
    transform: translate3d(0, 0, 0);
}

.thunder {
    filter: brightness(var(--brightness-level));
}


.sun {
    background-image:
        linear-gradient(to top, #f7f7f7, #2786f2),
        radial-gradient(circle at 1% 2%,
            #ffffff 0%,
            #fff700 3%,
            #fcad03 15%,
            #1E4B85 75%);
    background-blend-mode: overlay;


    border: 2px solid #415a77;
    display: flex;

}

.sun:hover {

    /*box-shadow: inset 20px 20px 50px rgba(255, 200, 50, 0.3);*/
    filter: brightness(1.05) contrast(1.05);
}

.night {
    position: relative;
    /* CRUCIAL: Keeps absolute stars inside this box */
    background-image:
        linear-gradient(to top, #f7f7f7, #0a0152),

        radial-gradient(circle at -5% -5%,

            #ffffff 1%,

            #625d70 20%,

            #3f3c42 55%,

            #0a0152 100%);
    background-blend-mode: overlay;

    border: 2px solid #415a77;
    display: flex;
    overflow: hidden;
    /* Keeps glowing edges from spilling out of the box */
    z-index: auto;
}

.star {
    position: absolute;
    width: 2px;
    height: 2px;
    z-index: -2;
    background-color: var(--star-color, white);
    /* Uses variable, defaults to white */
    border-radius: 5px;
    transition: background-color 0.45s ease-in-out;
    /* Smooth color fade */
}

.user-text {
    position: relative;
    color: white;
    margin: 5% 5% 5%;
}

.topBar {
    width: 100%;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    display: flex;


}

.feeling {
    flex: 1;
    height: auto;

    align-items: center;
    justify-content: center;
    display: flex;
    flex-wrap: nowrap;
}

.feeling canvas#gameCanvas {
    align-items: center;
    justify-content: center;


}

.feeling-slider {
    width: 50%;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    display: flex;

}

.inner-box {
    position: relative;

    width: 95%;
    height: 75%;
    border-radius: 10px;
    display: flex;
    background: rgba(169, 214, 229, 0.25);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);

    transform: translateZ(0);
    will-change: backdrop-filter;

}

.inner-box input[type="text"],
.inner-box textarea {
    position: absolute;
    background: #1b263b00;
    border: none;

    margin: 2% 2% auto;

    color: white;
    font-size: 16px;

    box-sizing: border-box;
    resize: none;

    width: 92%;
    height: 92%;

}

.pop {
    animation: popEffect 0.2s ease;
}

@keyframes popEffect {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }

    /* Grows slightly when word changes */
    100% {
        transform: scale(1);
    }
}

@keyframes popExplode {
    0% {
        transform: scale(1);
    }

    25% {
        transform: scale(1.3);
        opacity: 1
    }

    /* Grows slightly when word changes */
    75% {
        transform: scale(0);
    }

    100% {
        opacity: 0
    }
}

.popExplode {
    animation: popExplode 1s ease;
}



@keyframes textGrow {
    0% {
        font-size: 1.2rem;
        top: 0
    }

    100% {
        font-size: 4rem;
        top: 50%
    }

}

.textGrow {
    animation: textGrow 0.8s ease;
}


#valmain {
    color: white;
    font-weight: bold;
    font-family: "Al Tarikh", "Arial", sans-serif;
    transition: color 0.3s ease, transform 0.2s ease;
    display: inline-block;
    font-size: 20px;
    margin: 3px;
}


#slidermain {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 20px;
    border-radius: 20px;
}

#slidermain::-webkit-slider-thumb:active {
    background-color: #ffffff56;
    transform: scaleX(1.4) scaleY(1.1);
    transition: transform 0.1s ease-out;
    cursor: grabbing;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 21px;
}

/* For Firefox */
#slidermain::-moz-range-thumb:active {
    background-color: #ffffff56;

    transform: scaleX(1.4) scaleY(1.1);
    transition: transform 0.1s ease-out;
    cursor: grabbing;

}

/* Chrome, Safari, Edge */
#slidermain::-webkit-slider-thumb {
    -webkit-appearance: none;
    background: #ffffffbb;
    height: 21px;
    width: 21px;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.15s ease-in-out;


}


/* Firefox */
#slidermain::-moz-range-thumb {
    background: #ffffffbb;
    height: 25px;
    width: 25px;
    border-radius: 50%;
    cursor: pointer;
    border: none;
    transition: transform 0.15s ease-in-out;
}

.baseFeeling {
    position: absolute;
    border-radius: 10px;
    border-color: transparent;
    color: white;
    text-align: center;

}

.baseFeeling:hover {
    filter: brightness(1.1) contrast(1.1);
    transform: scale(1.05);

}

.music-wrapper {
    position: relative;
    width: 30%;
    height: 40px;
    margin: 0px;
    display: flex;
    flex-wrap: wrap;

}

.music-check {
    width: 100%;
    height: 100%;
    opacity: 0;
    position: absolute;
    z-index: 2;
    margin: 0;
    cursor: pointer;
}

.music-button {
    width: 100%;
    height: 100%;
    position: absolute;
    z-index: 1;
    margin: 0;
    border: 1px solid;
    border-radius: 15px;
    background-color: mediumaquamarine;
    color: white;
    transition: ease-in 0.12s;
    font-size: 1rem;
}

.music-check:hover+.music-button {
    filter: brightness(1.1) contrast(1.1);
    transform: scale(1.05);
}

.music-check:checked+.music-button {
    border: 3px solid var(--accent2-color);

}

.spotifyButton {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;

    background: #1db954;
    width: 80%;
    margin: 0 auto;
    height: 50px;

    border: 2px solid var(--light-color);
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.12s ease-in;


}


.spotifyButton:hover {
    transform: scale(1.05);
    filter: brightness(1.1) contrast(1.1);
}

.spotifyButton:active {
    transform: scale(0.95);
}

.spotifyButton img {
    height: 25px;
    /* Adjust size here */
    width: auto;
}

.spotifyButtonText {
    color: #ffffff;
    /* Changed to white for better contrast, or use #212121 */
    font-weight: bold;
    font-size: 16px;
}

.hidden-box {
    position: absolute;
    display: none;
}

.feeling-check {
    display: inline-block;
    position: absolute;
    cursor: pointer;
    background: white;
    user-select: none;
    transition: all 0.2s;
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
    border-radius: 24px;
}


.hidden-box:checked+.feeling-check {

    color: white;
    border: 3px solid var(--accent2-color);
    border-radius: 15px;


}

.feeling-selection {
    flex: 1.5;
    height: auto;
    position: relative;
    display: flex;
}

.next {
    width: 45%;
    height: 40px;
    border-radius: 15px;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    position: absolute;
    background: #0235db;
    border: none;
    box-shadow: inset 1px 1px rgba(255, 255, 255, 0.3);
    z-index: 10;
}

.next:hover {
    transform: translateX(-50%) scale(1.02);
    filter: brightness(1.1) contrast(1.1);
    transition: ease-out 0.15s;
}


.next:active {
    transform: translateX(-50%) scale(1.05);
    box-shadow: inset 15px 15px 50px rgba(255, 255, 255, 0.3);
    filter: brightness(1.3) contrast(1.1);
    transition: ease-out 0.08s;

}

#feeling-selection {
    overflow: hidden;

}

#feeling-selection::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    /* Light pastel colors for the explosion */
    background: radial-gradient(circle, var(--light-color), var(--accent1-color), transparent);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    z-index: -1;
}


/* The animation class */
.feeling-selection.burst::after {
    animation: gentle-burst 1s ease-out forwards;
}

@keyframes gentle-burst {
    0% {
        width: 0;
        height: 0;
        opacity: 1;
    }

    100% {
        width: 700px;
        /* Expands past the button edges */
        height: 700px;
        opacity: 0;
    }
}

.text {

    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    letter-spacing: -0.02em;
    color: var(--accent1-color);
    font-weight: 600;
    font-size: 1rem;
    white-space: nowrap;
    padding: -2px;
    text-shadow:
        -0.5px -0.5px 0 #000,
        0.5px -0.5px 0 #000,
        -0.5px 0.5px 0 #000,
        0.5px 0.5px 0 #000;


}

.feeling-selection .text {
    color: var(--light-color);
    text-shadow: none;
}

.circle {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    position: relative;

    justify-content: center;
    align-items: center;
    text-align: center;

    background: linear-gradient(135deg, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.1));
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow:
        0 8px 32px 0 rgba(31, 38, 135, 0.37),
        inset 0 0 10px rgba(255, 255, 255, 0.6),
        inset 2px 2px 5px rgba(255, 255, 255, 0.9),
        inset -2px -2px 5px rgba(0, 0, 0, 0.1);
}


.weatherData {
    position: relative;
    justify-content: center;
    align-items: center;
    border-radius: 15px;
    flex: 1;
    height: auto;
    overflow: hidden;
    flex-wrap: wrap;
    display: flex;
}

.weatherDataBox {
    position: relative;
    width: 110px;
    height: 55px;
    border-radius: 8px;
    margin: 0% 2.5% 0% 2.5%;
}

.weather-inner {
    padding: 5px 3px;
    width: fit-content;
    text-shadow: none;
}

.weather-title {
    font-size: 0.8rem;
    color: white;
    margin: 0 0 8px 0;
}

.weather-data-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.weather-value {
    font-size: 1rem;
    font-weight: bold;
    color: white;
}


.FeelingText {
    font-size: 1.2rem;
    font-weight: bold;
    font-family: "Al Tarikh", "Arial", sans-serif;
    transition: transform ease-out 1s;

}


.description {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.5);
    font-weight: normal;
}

.feeling-text-container {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-top: 30px;
    margin-left: 30px;


}



.EnergyWrapper {
    position: relative;
    width: 230px;
    height: 60px;
    overflow: visible;
}



.overlay-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    outline: none;
    cursor: pointer;
}

.overlay-slider::-webkit-slider-runnable-track {
    background: transparent;
    border: none;
}

.overlay-slider::-moz-range-track {
    background: transparent;
    border: none;
}

.overlay-slider::-webkit-slider-thumb {
    background: transparent;
    border: none;
    -webkit-appearance: none;
    appearance: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

/* steezy spotify badge when authed... hopefully */
.spotify-profile-badge {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    z-index: 50;
}

.spotify-profile-badge:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-50%) translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
    border-color: var(--accent1-color);
}

.spotify-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent1-color);
}

.spotify-username {
    color: white;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.spotify-login-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: none;
    color: white;
    font-weight: bold;
    font-size: 0.9rem;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s ease;
}

.spotify-login-btn:hover {
    filter: brightness(1.1);
}

.spotify-icon-small {
    width: 20px;
    height: auto;
}

/* css for playlist generation... */
.vibe-wrapper {
    position: relative;
    width: 30%;
    height: 35px;
    margin: 2px;
    display: flex;
    flex-wrap: wrap;
}

.loader-spinner {
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top: 4px solid var(--accent1-color);
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: var(--secondary-color);
    border-radius: 10px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: var(--accent1-color);
}

.playlist-song {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 6px 10px;
    gap: 10px;
}

.playlist-song-img {
    width: 35px;
    height: 35px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 4px;
    object-fit: cover;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 10px;
}

.playlist-song-info {
    display: flex;
    flex-direction: column;
}

.playlist-song-title {
    color: white;
    font-size: 0.85rem;
    font-weight: bold;
    margin: 0 0 2px 0;
}

.playlist-song-artist {
    color: #dedede;
    font-size: 0.75rem;
    margin: 0;
}