:root {
    --primary: #ff4d4d;
    --primary-glow: rgba(255, 77, 77, 0.5);
    --secondary: #7000ff;
    --bg-dark: #0a0a0c;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-main: #ffffff;
    --text-dim: #a0a0a0;
    --font-main: 'Outfit', sans-serif;
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-main);
    overflow-x: hidden;
    min-height: 100vh;
}

/* Background Blobs */
.background-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    filter: blur(80px);
    opacity: 0.6;
}

.blob {
    position: absolute;
    border-radius: 50%;
}

.blob-1 {
    width: 400px;
    height: 400px;
    background: var(--primary);
    top: -100px;
    right: -100px;
    animation: move 20s infinite alternate;
}

.blob-2 {
    width: 500px;
    height: 500px;
    background: var(--secondary);
    bottom: -150px;
    left: -150px;
    animation: move 25s infinite alternate-reverse;
}

.blob-3 {
    width: 300px;
    height: 300px;
    background: #00d4ff;
    top: 50%;
    left: 40%;
    animation: move 15s infinite ease-in-out;
}

@keyframes move {
    from {
        transform: translate(0, 0) scale(1);
    }

    to {
        transform: translate(100px, 50px) scale(1.1);
    }
}

/* Layout */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 4rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

header {
    text-align: center;
    margin-bottom: 2rem;
}

.glow-text {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    letter-spacing: -1px;
}

.glow-text span {
    background: linear-gradient(90deg, var(--primary), #ffb800);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    color: var(--text-dim);
    font-size: 1.2rem;
}

/* Glass Card */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

.main-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 2.5rem;
}

@media (max-width: 768px) {
    .main-grid {
        grid-template-columns: 1fr;
    }
}

/* Inputs & Controls */
label {
    display: block;
    margin-bottom: 0.8rem;
    font-weight: 600;
    color: var(--text-dim);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

textarea {
    width: 100%;
    height: 300px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.5rem;
    color: white;
    font-family: inherit;
    font-size: 1rem;
    resize: none;
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
}

textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 15px var(--primary-glow);
}

.control-group {
    margin-bottom: 2rem;
}

.segmented-control {
    display: flex;
    background: rgba(0, 0, 0, 0.3);
    padding: 4px;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
}

.segmented-control button {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-dim);
    padding: 0.6rem;
    cursor: pointer;
    font-family: inherit;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.3s;
}

.segmented-control button.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(255, 77, 77, 0.3);
}

select {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 0.8rem;
    color: white;
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    cursor: pointer;
}

/* Humor Slider */
.label-with-value {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#humorLabel {
    color: var(--primary);
    font-weight: 800;
}

input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    margin-top: 1rem;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: var(--primary);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 10px var(--primary-glow);
}

.simon-humor-indicator {
    height: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-top: 1rem;
}

.pepper-visual {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 50px;
    position: relative;
    animation: shake 0.5s infinite linear;
}

.pepper-visual::after {
    content: '';
    position: absolute;
    bottom: 10px;
    width: 40px;
    height: 40px;
    background: radial-gradient(circle, #ffae00 0%, #ff4d4d 70%, transparent 100%);
    filter: blur(8px);
    z-index: -1;
    animation: flicker 0.2s infinite alternate;
}

.simon-text {
    font-size: 1rem;
    font-weight: 900;
    background: linear-gradient(90deg, #ff0000, #ffae00, #ff0000);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shine 1s linear infinite;
    text-transform: uppercase;
    margin-top: 0.5rem;
}

@keyframes shine {
    to {
        background-position: 200% center;
    }
}

@keyframes shake {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }

    25% {
        transform: translate(3px, -3px) rotate(8deg);
    }

    50% {
        transform: translate(-3px, 3px) rotate(-8deg);
    }

    75% {
        transform: translate(3px, 3px) rotate(8deg);
    }

    100% {
        transform: translate(0, 0) rotate(0deg);
    }
}

@keyframes flicker {
    from {
        opacity: 0.8;
        transform: scale(1);
    }

    to {
        opacity: 1;
        transform: scale(1.1);
    }
}

.hidden {
    display: none !important;
}

/* Buttons */
.primary-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--primary), #ff1f1f);
    color: white;
    border: none;
    padding: 1.2rem;
    border-radius: 16px;
    font-family: inherit;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 10px 20px rgba(255, 77, 77, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
}

.primary-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(255, 77, 77, 0.6);
}

.primary-btn:active {
    transform: translateY(0);
}

/* Result Section */
.result-card {
    margin-top: 2rem;
    border-color: var(--primary);
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.result-text {
    font-size: 1.1rem;
    line-height: 1.6;
    white-space: pre-wrap;
    background: rgba(0, 0, 0, 0.2);
    padding: 1.5rem;
    border-radius: 12px;
}

.icon-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    padding: 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s;
}

.icon-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Loader */
.loader {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s infinite linear;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    backdrop-filter: blur(5px);
}

.modal-content {
    max-width: 400px;
    text-align: center;
}

.modal-content h2 {
    margin-bottom: 1rem;
}

.modal-content input {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1rem;
    color: white;
    margin: 1.5rem 0;
}

.small-text {
    font-size: 0.8rem;
    color: var(--text-dim);
    margin-top: 1rem;
}