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

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

.container {
    width: 100%;
    max-width: 500px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 25px;
    text-align: center;
}

header h1 {
    font-size: 24px;
    margin-bottom: 8px;
}

.subtitle {
    opacity: 0.9;
    font-size: 14px;
}

main {
    padding: 20px;
}

.chat-container {
    height: 350px;
    overflow-y: auto;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 20px;
    background: #fafafa;
}

.welcome-message {
    text-align: center;
    color: #888;
    padding: 40px 20px;
}

.welcome-message p {
    margin: 8px 0;
}

.message {
    margin-bottom: 15px;
    animation: fadeIn 0.3s ease;
}

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

.message.user {
    text-align: right;
}

.message.assistant {
    text-align: left;
}

.message-content {
    display: inline-block;
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 15px;
    line-height: 1.5;
}

.message.user .message-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-bottom-right-radius: 4px;
}

.message.assistant .message-content {
    background: #e8e8e8;
    color: #333;
    border-bottom-left-radius: 4px;
}

.controls {
    text-align: center;
    padding: 10px 0;
}

.status {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
    min-height: 20px;
}

.status.recording {
    color: #e74c3c;
    font-weight: 500;
}

.status.processing {
    color: #3498db;
}

.status.error {
    color: #e74c3c;
}

.ptt-button {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    transition: all 0.2s ease;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
}

.ptt-button:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.5);
}

.ptt-button:active,
.ptt-button.recording {
    transform: scale(0.95);
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.5);
}

.ptt-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.ptt-button .icon {
    font-size: 36px;
    margin-bottom: 5px;
}

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

.hint {
    margin-top: 15px;
    font-size: 12px;
    color: #999;
}

.loading-dots::after {
    content: '';
    animation: dots 1.5s infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}
