﻿:root {
    --bg-dark: #020617;
    /* The 5 Mood Colors */
    --c-pink: #ec4899; /* 0: Passion/Love */
    --c-orange: #f59e0b; /* 1: Energy/Joy */
    --c-blue: #3b82f6; /* 2: Calm/Peace */
    --c-purple: #8b5cf6; /* 3: Dreamy/Creative */
    --c-gray: #64748b; /* 4: Gloomy/Tired */
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-dark);
    color: white;
    height: 100vh;
    overflow: hidden;
    position: relative;
}

/* Ambient Animated Background Blobs */
.ambient-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
    pointer-events: none;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0;
    transition: opacity 2s ease-in-out;
    animation: floatBlob 20s infinite alternate ease-in-out;
}

#blob0 {
    background: var(--c-pink);
    width: 60vw;
    height: 60vw;
    top: -10%;
    left: -10%;
}

#blob1 {
    background: var(--c-orange);
    width: 50vw;
    height: 50vw;
    top: 40%;
    right: -10%;
    animation-delay: -5s;
}

#blob2 {
    background: var(--c-blue);
    width: 70vw;
    height: 70vw;
    bottom: -20%;
    left: 10%;
    animation-delay: -10s;
}

#blob3 {
    background: var(--c-purple);
    width: 60vw;
    height: 60vw;
    top: 20%;
    left: 30%;
    animation-delay: -15s;
}

#blob4 {
    background: var(--c-gray);
    width: 80vw;
    height: 80vw;
    top: 10%;
    left: 10%;
    animation-delay: -2s;
}

@keyframes floatBlob {
    0% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(10vw, 5vh) scale(1.1);
    }

    100% {
        transform: translate(-5vw, 15vh) scale(0.9);
    }
}

/* Main UI Layer */
.ui-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    display: flex;
    flex-direction: column;
}

/* Top Bar */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
}

.user-count {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.2);
    padding: 0.5rem 1rem;
    border-radius: 99px;
    font-size: 0.85rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    box-shadow: 0 0 10px #22c55e;
    animation: pulse 2s infinite;
}

.share-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0.5rem;
}

@keyframes pulse {
    0% {
        opacity: 0.6;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.6;
    }
}

/* Floating Thoughts Container */
.thoughts-container {
    flex-grow: 1;
    position: relative;
    width: 100%;
    overflow: hidden;
    pointer-events: none;
}

.thought-bubble {
    position: absolute;
    bottom: -50px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.15);
    padding: 0.75rem 1.25rem;
    border-radius: 20px;
    font-size: 1rem;
    color: rgba(255,255,255,0.9);
    max-width: 80%;
    word-wrap: break-word;
    animation: driftUp 12s linear forwards;
}

@keyframes driftUp {
    0% {
        transform: translateY(0) rotate(-2deg);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        transform: translateY(-80vh) rotate(2deg);
        opacity: 0;
    }
}

/* Controls Area (Glassmorphism) */
.controls-area {
    padding: 1.5rem;
    padding-bottom: max(1.5rem, env(safe-area-inset-bottom));
    background: linear-gradient(to top, rgba(2,6,23,0.9) 0%, rgba(2,6,23,0) 100%);
}

/* Mode Toggle */
.toggle-row {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
}

.toggle-btn {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
    cursor: pointer;
    backdrop-filter: blur(10px);
}

    .toggle-btn.left {
        border-radius: 20px 0 0 20px;
    }

    .toggle-btn.right {
        border-radius: 0 20px 20px 0;
        margin-left: -1px;
    }

    .toggle-btn.active {
        background: rgba(255,255,255,0.3);
        font-weight: 600;
    }

/* Mood Selector */
.mood-grid {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.mood-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid transparent;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    font-size: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s;
}

    .mood-btn.selected {
        border-color: white;
        transform: scale(1.1);
        background: rgba(255,255,255,0.2);
        box-shadow: 0 0 15px rgba(255,255,255,0.2);
    }

/* Thought Input */
.vent-box {
    display: flex;
    gap: 0.5rem;
}

#thoughtInput {
    flex-grow: 1;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    padding: 1rem 1.25rem;
    border-radius: 24px;
    font-size: 1rem;
    backdrop-filter: blur(10px);
    outline: none;
    appearance: none;
}

    #thoughtInput::placeholder {
        color: rgba(255,255,255,0.5);
    }

    #thoughtInput:focus {
        border-color: rgba(255,255,255,0.5);
    }

#sendBtn {
    background: white;
    color: black;
    border: none;
    border-radius: 50%;
    width: 52px;
    height: 52px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: 0.2s;
}

    #sendBtn:active {
        transform: scale(0.9);
    }
