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

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

.container {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    max-width: 600px;
    width: 100%;
    text-align: center;
}

h1 {
    color: #333;
    margin-bottom: 20px;
    font-size: 2.5em;
    font-weight: 300;
}

.mobile-indicator {
    background: linear-gradient(45deg, #00d2ff, #3a7bd5);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 500;
    margin-bottom: 20px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 210, 255, 0.3);
    animation: mobileGlow 2s ease-in-out infinite alternate;
}

@keyframes mobileGlow {
    0% { box-shadow: 0 2px 8px rgba(0, 210, 255, 0.3); }
    100% { box-shadow: 0 4px 16px rgba(0, 210, 255, 0.6); }
}

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

.record-btn, .stop-btn {
    padding: 15px 30px;
    border: none;
    border-radius: 50px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.record-btn {
    background: linear-gradient(45deg, #ff6b6b, #ee5a52);
    color: white;
}

.record-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(238, 90, 82, 0.4);
}

.record-btn.recording {
    background: linear-gradient(45deg, #ff4757, #ff3838);
    animation: pulse 1.5s infinite;
}

.record-btn.listening {
    background: linear-gradient(45deg, #3742fa, #2f3542);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.stop-btn {
    background: linear-gradient(45deg, #747d8c, #57606f);
    color: white;
}

.stop-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(87, 96, 111, 0.4);
}

.stop-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.status {
    margin-bottom: 30px;
}

#status {
    font-size: 1.1em;
    color: #666;
    font-weight: 500;
}

.audio-visualizer {
    margin-bottom: 30px;
    display: flex;
    justify-content: center;
}

#visualizer {
    border: 2px solid #e9ecef;
    border-radius: 10px;
    background: #f8f9fa;
}

.transcription-container, .chat-container {
    text-align: left;
    margin-bottom: 30px;
}

.transcription-container h3, .chat-container h3 {
    color: #333;
    margin-bottom: 15px;
    text-align: center;
}

.transcription-text, .chat-response-text {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 20px;
    min-height: 120px;
    font-size: 1.1em;
    line-height: 1.6;
    color: #333;
    white-space: pre-wrap;
    overflow-y: auto;
    max-height: 300px;
}

.chat-response-text {
    background: linear-gradient(145deg, #f0f8ff, #e6f3ff);
    border: 2px solid #b8daff;
}

.settings {
    text-align: left;
}

.settings details {
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 15px;
    background: #f8f9fa;
}

.settings summary {
    font-weight: 600;
    color: #495057;
    cursor: pointer;
    margin-bottom: 10px;
}

.settings-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
}

.settings-content label {
    font-weight: 500;
    color: #495057;
}

.settings-content input {
    padding: 10px;
    border: 1px solid #ced4da;
    border-radius: 5px;
    font-size: 1em;
}

.settings-content button {
    padding: 10px 20px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.settings-content button:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.status-warning {
    color: #f39c12 !important;
    font-weight: 600;
}

@media (max-width: 768px) {
    .container {
        padding: 20px;
        margin: 10px;
    }
    
    h1 {
        font-size: 2em;
    }
    
    .controls {
        flex-direction: column;
        align-items: center;
    }
    
    .record-btn, .stop-btn {
        width: 200px;
    }
}