:root {
    --primary-color: #6366f1;
    --secondary-color: #a78bfa;
    --bg-color: #0f0f23;
    --surface-color: #1a1a2e;
    --text-color: #e0e0e0;
    --joy-color: #fbbf24;
    --sadness-color: #60a5fa;
    --anger-color: #ef4444;
    --fear-color: #a855f7;
    --calm-color: #34d399;
}

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

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

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

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

header h1 {
    font-size: 2.5rem;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
}

header p {
    color: #a0a0a0;
    font-size: 1.1rem;
}

.controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}

.btn {
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 50px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(99, 102, 241, 0.5);
}

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

.btn.active {
    background: linear-gradient(45deg, #ef4444, #f97316);
}

.language-selector select {
    background-color: var(--surface-color);
    color: var(--text-color);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 8px 15px;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.language-selector select:hover {
    border-color: var(--primary-color);
}

.visualization-container {
    background-color: var(--surface-color);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

#canvas {
    width: 100%;
    height: 400px;
    border-radius: 10px;
    background: radial-gradient(circle at center, rgba(99, 102, 241, 0.1), transparent);
}

.emotion-display {
    margin-top: 30px;
    text-align: center;
}

#emotionText {
    font-size: 1.8rem;
    margin-bottom: 20px;
    animation: pulse 2s infinite;
}

.emotion-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.emotion-meter {
    text-align: left;
}

.emotion-meter label {
    display: block;
    margin-bottom: 5px;
    font-size: 0.9rem;
    opacity: 0.8;
}

.meter-bar {
    background-color: rgba(255, 255, 255, 0.1);
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.meter-fill {
    height: 100%;
    width: 0%;
    transition: width 0.5s ease;
    border-radius: 4px;
}

.meter-fill[data-emotion="joy"] {
    background: linear-gradient(90deg, var(--joy-color), #fde047);
}

.meter-fill[data-emotion="sadness"] {
    background: linear-gradient(90deg, var(--sadness-color), #3b82f6);
}

.meter-fill[data-emotion="anger"] {
    background: linear-gradient(90deg, var(--anger-color), #dc2626);
}

.meter-fill[data-emotion="fear"] {
    background: linear-gradient(90deg, var(--fear-color), #9333ea);
}

.meter-fill[data-emotion="calm"] {
    background: linear-gradient(90deg, var(--calm-color), #10b981);
}

.info-section {
    background-color: var(--surface-color);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
}

.info-section h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

.info-section ol {
    padding-left: 20px;
}

.info-section li {
    margin-bottom: 10px;
    opacity: 0.9;
}

footer {
    text-align: center;
    padding: 20px 0;
    opacity: 0.6;
}

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

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }
    
    .emotion-details {
        grid-template-columns: 1fr;
    }
    
    #canvas {
        height: 300px;
    }
    
    .controls {
        flex-direction: column;
    }
}