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

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #1A0B2E 0%, #2D1B45 100%);
    color: white;
    overflow: hidden;
    height: 100vh;
}

.floating-header {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    text-align: center;
}

.glow-text {
    font-size: 2.5rem;
    font-weight: 300;
    letter-spacing: 3px;
    background: linear-gradient(45deg, #4A1A5C, #E91E63, #03DAC6);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease-in-out infinite;
    filter: drop-shadow(0 0 20px rgba(233, 30, 99, 0.5));
}

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

.main-container {
    position: relative;
    width: 100vw;
    height: 100vh;
}

#canvas {
    display: block;
    background: radial-gradient(ellipse at center, #2D1B45 0%, #1A0B2E 100%);
    cursor: crosshair;
}

.control-panel {
    position: fixed;
    top: 100px;
    right: 20px;
    width: 280px;
    max-height: calc(100vh - 200px);
    background: rgba(74, 26, 92, 0.15);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(233, 30, 99, 0.3);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    z-index: 900;
    overflow-y: auto;
}

.toggle-btn {
    position: absolute;
    top: -10px;
    left: -40px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(45deg, #4A1A5C, #E91E63);
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(233, 30, 99, 0.4);
    transition: transform 0.3s ease;
}

.toggle-btn:hover {
    transform: scale(1.1);
}

.controls-content {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.controls-content.hidden {
    opacity: 0;
    transform: scale(0.9);
    pointer-events: none;
}

.input-section {
    margin-bottom: 20px;
}

.input-section h3 {
    color: #03DAC6;
    margin-bottom: 10px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.input-section textarea {
    width: 100%;
    height: 60px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(3, 218, 198, 0.5);
    border-radius: 8px;
    padding: 10px;
    color: white;
    font-size: 0.9rem;
    resize: none;
    margin-bottom: 10px;
}

.input-section input {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(3, 218, 198, 0.5);
    border-radius: 8px;
    padding: 8px 12px;
    color: white;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.input-section textarea::placeholder,
.input-section input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.emotion-sliders {
    margin-bottom: 20px;
}

.emotion-sliders h3 {
    color: #03DAC6;
    margin-bottom: 15px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.slider-group {
    margin-bottom: 12px;
}

.slider-group label {
    display: block;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 5px;
    text-transform: capitalize;
}

.slider-group input[type="range"] {
    width: 100%;
    height: 6px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
}

.slider-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: linear-gradient(45deg, #E91E63, #03DAC6);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(233, 30, 99, 0.5);
}

.preset-emotions h3 {
    color: #03DAC6;
    margin-bottom: 15px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.preset-btn {
    width: 100%;
    background: linear-gradient(45deg, rgba(74, 26, 92, 0.8), rgba(233, 30, 99, 0.3));
    border: 1px solid rgba(233, 30, 99, 0.5);
    border-radius: 8px;
    padding: 10px;
    color: white;
    font-size: 0.9rem;
    cursor: pointer;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.preset-btn:hover {
    background: linear-gradient(45deg, rgba(233, 30, 99, 0.8), rgba(3, 218, 198, 0.3));
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(233, 30, 99, 0.4);
}

.bottom-toolbar {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 15px;
    z-index: 1000;
}

.bottom-toolbar button {
    background: rgba(74, 26, 92, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(233, 30, 99, 0.5);
    border-radius: 25px;
    padding: 12px 20px;
    color: white;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.bottom-toolbar button:hover {
    background: rgba(233, 30, 99, 0.8);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(233, 30, 99, 0.4);
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .control-panel {
        width: calc(100vw - 40px);
        right: 20px;
        max-height: 300px;
    }

    .glow-text {
        font-size: 1.8rem;
    }

    .bottom-toolbar {
        flex-wrap: wrap;
        gap: 10px;
    }

    .bottom-toolbar button {
        font-size: 0.8rem;
        padding: 10px 15px;
    }
}

/* Scrollbar styling */
.control-panel::-webkit-scrollbar {
    width: 6px;
}

.control-panel::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.control-panel::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, #E91E63, #03DAC6);
    border-radius: 3px;
}

.control-panel::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, #03DAC6, #E91E63);
}