:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #1a1a1a;
    --text-primary: #ffffff;
    --text-secondary: #cccccc;
    --accent: #4ecdc4;
    --shadow: rgba(0, 0, 0, 0.3);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 30px;
    animation: fadeIn 1s ease-out;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4, #45aaf2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.mood-display {
    position: relative;
    width: 100%;
    max-width: 800px;
    height: 400px;
    margin: 0 auto 40px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px var(--shadow);
}

#moodCanvas {
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.mood-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    pointer-events: none;
    transition: opacity 0.3s;
}

#moodText {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.8);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.controls {
    background: var(--bg-secondary);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
}

.mood-selector h2 {
    margin-bottom: 20px;
    text-align: center;
}

.mood-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.mood-btn {
    background: var(--bg-primary);
    border: 2px solid transparent;
    border-radius: 15px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.mood-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px var(--shadow);
}

.mood-btn.active {
    border-color: var(--accent);
    background: rgba(78, 205, 196, 0.1);
}

.mood-btn .emoji {
    font-size: 2rem;
}

.mood-btn .label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.audio-controls,
.interaction-mode {
    margin-bottom: 25px;
}

.audio-controls h3,
.interaction-mode h3 {
    margin-bottom: 15px;
}

label {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

input[type="range"] {
    flex: 1;
    height: 6px;
    background: var(--bg-primary);
    border-radius: 3px;
    outline: none;
    cursor: pointer;
}

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

.mode-buttons {
    display: flex;
    gap: 10px;
}

.mode-btn {
    flex: 1;
    padding: 12px 20px;
    background: var(--bg-primary);
    border: 2px solid transparent;
    border-radius: 10px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s;
}

.mode-btn:hover {
    border-color: var(--accent);
}

.mode-btn.active {
    background: var(--accent);
    color: var(--bg-primary);
    font-weight: bold;
}

.save-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.3s;
}

.save-btn:hover {
    transform: scale(1.05);
}

footer {
    text-align: center;
    padding: 20px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }
    
    .mood-display {
        height: 300px;
    }
    
    .mood-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .controls {
        padding: 20px;
    }
}