html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: 'Inter', sans-serif;
    color: white;
}

body {
    --bg-color: #000;
    --swirl-color-1: #9f00ff; /* Purple */
    --swirl-color-2: #00ff9f; /* Neon Green */
    --swirl-color-3: #ff00c8; /* Magenta */
    background: var(--bg-color);
    overflow: hidden;
    position: relative;
}

.font-permanent-marker {
    font-family: 'Permanent Marker', cursive;
}

/* Swirling Vortex Background */
body::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    z-index: 0;
    background: conic-gradient(
        from 0deg at 50% 50%,
        var(--swirl-color-1), 
        var(--swirl-color-2), 
        var(--swirl-color-3),
        var(--swirl-color-1)
    );
    animation: swirl 15s linear infinite;
}

@keyframes swirl {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Unstable Form Container */
@keyframes unstable {
    0% { transform: rotate(-1deg) scale(1.01); }
    50% { transform: rotate(1deg) scale(1); }
    100% { transform: rotate(-1deg) scale(1.01); }
}

.form-container, .success-container {
    position: relative;
    z-index: 10;
    max-width: 420px;
    width: 100%;
    background: rgba(10, 10, 20, 0.75);
    border-radius: 20px;
    padding: 2.5rem;
    border: 2px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    box-shadow: 0 0 40px rgba(159, 0, 255, 0.5);
    animation: unstable 8s ease-in-out infinite;
}

/* Form Submission Animation */
.form-container.transmitting {
    animation: suck-in 0.75s ease-in forwards;
}

@keyframes suck-in {
    0% {
        opacity: 1;
        transform: rotate(0deg) scale(1);
    }
    100% {
        opacity: 0;
        transform: rotate(180deg) scale(0);
    }
}

/* Form Inputs */
.form-input {
    width: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--swirl-color-2);
    color: #fff;
    border-radius: 8px;
    padding: 12px;
    transition: all 0.3s ease;
}

.form-input::placeholder {
    color: #8c8ca1;
}

.form-input:focus {
    outline: none;
    border-color: var(--swirl-color-3);
    box-shadow: 0 0 0 3px rgba(255, 0, 200, 0.5);
}

/* Buttons */
.btn-primary {
    background: var(--swirl-color-2);
    color: #000;
    font-weight: bold;
    box-shadow: 0 4px 14px 0 rgba(0, 255, 159, 0.3);
}
.btn-primary:hover {
    background: white;
}

.btn-disabled {
    background: rgba(55, 65, 81, 0.5);
    cursor: not-allowed;
}

/* Void Creature Button */
@keyframes float {
    0% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(5deg); }
    100% { transform: translateY(0px) rotate(0deg); }
}

@keyframes emote {
    0%, 100% { background-position: 0 0; }
    25% { background-position: -60px 0; } /* Frame 2 */
    50% { background-position: -120px 0; } /* Frame 3 */
    75% { background-position: -180px 0; } /* Frame 4 */
}

.void-creature {
    position: fixed;
    z-index: 1000;
    width: 60px;
    height: 60px;
    background-color: transparent;
    border: none;
    cursor: pointer;
    background-size: contain; /* Changed from specific size */
    background-repeat: no-repeat;
    background-position: center; /* Center the image */
    animation: float 4s ease-in-out infinite;
    transition: transform 0.2s ease-in-out;
    /* background-image is now set by JS */
}

.void-creature:hover {
    transform: scale(1.2);
}

/* Raining Complaints */
@keyframes rain {
    0% { transform: translateY(-10vh); opacity: 1; }
    95% { opacity: 1; }
    100% { transform: translateY(110vh); opacity: 0; }
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1001; /* Above the rain, below the active complaint */
}

.complaint-raindrop {
    position: fixed;
    top: 0;
    transform: translateY(-10vh); /* Add this line to start them off-screen */
    width: 200px;
    height: auto; /* Let image aspect ratio decide */
    padding: 20px;
    color: white;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    animation-name: rain;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
    cursor: pointer;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: transform 0.3s ease, opacity 0.3s ease; /* For smooth zooming */
}
.complaint-raindrop.active {
    left: 50% !important; /* Override inline style */
    top: 50% !important;
    transform: translate(-50%, -50%) scale(1.5) !important;
    animation-play-state: paused;
    z-index: 1002;
}
.complaint-raindrop .publisher {
    font-weight: bold;
    font-size: 0.9rem;
    color: var(--swirl-color-3);
    margin-bottom: 5px;
}
.complaint-raindrop .complain {
    font-size: 0.8rem;
    font-family: 'Inter', sans-serif;
}

/* Close Button */
.close-button {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    color: white;
    font-size: 2.5rem;
    line-height: 1;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.2s ease;
    z-index: 1003; /* Make sure it's on top */
}
.close-button:hover {
    opacity: 1;
}

/* Mute Button */
.mute-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.2s ease;
}
.mute-button:hover {
    background: rgba(255, 255, 255, 0.2);
}
.mute-button svg {
    width: 20px;
    height: 20px;
    fill: white;
}