:root {
    --primary-color: #4361ee;
    --secondary-color: #3f37c9;
    --accent-color: #4895ef;
    --background-color: #f8f9fa;
    --card-bg: #ffffff;
    --text-color: #212529;
    --border-radius: 10px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --bottom-bar-height: 180px;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #000;
    color: var(--text-color);
    min-height: 100vh;
    margin: 0;
    padding: 0;
    position: relative;
    overflow: hidden;
}

.app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 10px 20px;
}

.header-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.connection-status {
    display: flex;
    align-items: center;
    color: white;
}

.settings-button {
    background: none;
    border: none;
    color: white;
    padding: 5px;
    cursor: pointer;
}

.video-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #000;
}

video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    max-width: 100%;
    max-height: 100%;
}

.bottom-controls {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    border-radius: 20px 20px 0 0;
    z-index: 1000;
    transition: transform 0.3s ease;
}

.bottom-controls.collapsed {
    transform: translateY(calc(var(--bottom-bar-height) - 60px));
}

.bottom-controls-handle {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    cursor: pointer;
}

.input-area {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.chat-input {
    flex-grow: 1;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 20px;
    padding: 10px 15px;
}

.chat-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.voice-record-btn {
    width: 50px;
    height: 50px;
    border-radius: 25px;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    flex-shrink: 0;
}

.stop-conversation-btn {
    height: 50px;
    padding: 10px 20px;
    border-radius: 25px;
    background-color: #dc3545;
    color: white;
    border: none;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    flex-shrink: 0;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.stop-conversation-btn:hover {
    background-color: #c82333;
}

.stop-conversation-btn i {
    font-size: 16px;
}

.settings-panel {
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100vh;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    padding: 20px;
    transition: right 0.3s ease;
    z-index: 1001;
}

.settings-panel.active {
    right: 0;
}

.settings-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    color: white;
}

.settings-panel-content {
    color: white;
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 5px;
}

.status-connected {
    background-color: #28a745;
}

.status-disconnected {
    background-color: #dc3545;
}

.status-connecting {
    background-color: #ffc107;
}

.recording-indicator {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: rgba(220, 53, 69, 0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    display: none;
}

.recording-indicator.active {
    display: flex;
    align-items: center;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(220, 53, 69, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0);
    }
}

.recording-pulse {
    animation: pulse 1.5s infinite;
}

/* 对话消息样式 */
.chat-messages {
    position: fixed;
    bottom: 100px;
    left: 20px;
    width: calc(100% - 40px);
    max-width: 600px;
    height: 120px;
    overflow-y: auto;
    padding: 10px 15px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 10px;
    backdrop-filter: blur(5px);
    display: none;
    z-index: 900;
}

.chat-messages.show {
    display: block;
}

.chat-message {
    margin-bottom: 8px;
    word-wrap: break-word;
    color: white;
}

.chat-message.user {
    text-align: left;
}

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

.chat-toggle-btn {
    position: absolute;
    top: -40px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 20px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
}