:root {
    --primary-color: #5C6BC0;
    --primary-dark: #3F51B5;
    --secondary-color: #FF6B6B;
    --background: #F5F7FA;
    --surface: #FFFFFF;
    --text-primary: #2C3E50;
    --text-secondary: #7F8C8D;
    --border: #E0E6ED;
    --success: #4CAF50;
    --error: #F44336;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    background: var(--surface);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 600px;
    padding: 30px;
}

header {
    text-align: center;
    margin-bottom: 30px;
}

h1 {
    color: var(--text-primary);
    font-size: 28px;
    margin-bottom: 8px;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 14px;
}

.persona-selector {
    margin-bottom: 20px;
}

.persona-selector label {
    display: block;
    color: var(--text-primary);
    font-weight: 500;
    margin-bottom: 8px;
}

.persona-selector select {
    width: 100%;
    padding: 10px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    transition: border-color 0.3s;
}

.persona-selector select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.custom-persona {
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.custom-persona.hidden {
    display: none;
}

.custom-persona textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    resize: vertical;
    font-family: inherit;
}

.custom-persona textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.chat-container {
    background: var(--background);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
    height: 300px;
    overflow-y: auto;
}

.chat-history {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.message {
    padding: 12px 16px;
    border-radius: 12px;
    animation: fadeIn 0.3s ease;
}

.message.user {
    background: var(--primary-color);
    color: white;
    align-self: flex-end;
    max-width: 80%;
    margin-left: auto;
}

.message.assistant {
    background: white;
    color: var(--text-primary);
    align-self: flex-start;
    max-width: 80%;
    border: 1px solid var(--border);
}

.speaker {
    font-weight: 600;
    display: block;
    margin-bottom: 4px;
    font-size: 12px;
    opacity: 0.8;
}

.controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.record-button {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(92, 107, 192, 0.3);
}

.record-button:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 30px rgba(92, 107, 192, 0.4);
}

.record-button.recording {
    background: linear-gradient(135deg, var(--secondary-color), #ff5252);
    animation: pulse 1.5s infinite;
}

.record-button:active {
    transform: scale(0.95);
}

.mic-icon {
    width: 40px;
    height: 40px;
}

.button-text {
    font-size: 12px;
    font-weight: 500;
}

.status {
    padding: 8px 16px;
    border-radius: 20px;
    background: var(--background);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
}

.status.recording {
    background: var(--secondary-color);
    color: white;
}

.status.processing {
    background: var(--primary-color);
    color: white;
}

.settings {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.secondary-button {
    padding: 10px 20px;
    border: 2px solid var(--border);
    background: white;
    color: var(--text-primary);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.secondary-button:hover {
    background: var(--background);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

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

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 107, 107, 0.7);
    }
    70% {
        box-shadow: 0 0 0 20px rgba(255, 107, 107, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 107, 107, 0);
    }
}

/* Responsive Design */
@media (max-width: 600px) {
    .container {
        padding: 20px;
    }
    
    h1 {
        font-size: 24px;
    }
    
    .chat-container {
        height: 250px;
    }
    
    .record-button {
        width: 100px;
        height: 100px;
    }
}
