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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #1a1a2e;
    color: #eee;
    min-height: 100vh;
}

/* Video Background */
.video-bg {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: -1;
    overflow: hidden;
}

.video-bg video {
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    object-fit: cover;
}

.video-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(10, 10, 20, 0.7);
}

/* Start Screen */
.start-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.start-box {
    background: rgba(30, 30, 50, 0.95);
    border-radius: 16px;
    padding: 32px;
    max-width: 600px;
    width: 100%;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

.start-box h1 {
    font-size: 24px;
    margin-bottom: 6px;
    text-align: center;
}

.start-box > p {
    color: #888;
    text-align: center;
    margin-bottom: 20px;
    font-size: 14px;
}

.start-box textarea,
.start-box input[type="text"] {
    width: 100%;
    padding: 14px;
    font-size: 15px;
    border: 2px solid #333;
    border-radius: 10px;
    background: #252540;
    color: #eee;
    resize: vertical;
    font-family: inherit;
}

.start-box textarea:focus,
.start-box input[type="text"]:focus {
    outline: none;
    border-color: #667eea;
}

.start-box textarea::placeholder,
.start-box input[type="text"]::placeholder {
    color: #666;
}

/* Examples */
.examples {
    margin: 16px 0;
}

.examples-label {
    display: block;
    font-size: 12px;
    color: #888;
    margin-bottom: 8px;
}

.example-btn {
    display: block;
    width: 100%;
    text-align: left;
    padding: 10px 12px;
    margin-bottom: 6px;
    background: #252540;
    border: 1px solid #333;
    border-radius: 8px;
    color: #aaa;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s;
}

.example-btn:hover {
    background: #303050;
    border-color: #667eea;
    color: #ddd;
}

/* Settings row */
.settings-row {
    display: flex;
    gap: 16px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.setting {
    flex: 1;
    min-width: 120px;
}

.setting label {
    display: block;
    font-size: 12px;
    color: #888;
    margin-bottom: 6px;
}

.setting select,
.setting input[type="range"] {
    width: 100%;
}

.setting select {
    padding: 8px 10px;
    background: #252540;
    border: 1px solid #333;
    border-radius: 6px;
    color: #eee;
    font-size: 13px;
}

.setting input[type="range"] {
    -webkit-appearance: none;
    height: 6px;
    background: #333;
    border-radius: 3px;
    margin-top: 8px;
}

.setting input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: #667eea;
    border-radius: 50%;
    cursor: pointer;
}

#tempValue {
    display: inline-block;
    margin-left: 8px;
    font-size: 13px;
    color: #888;
}

/* Start button */
.start-btn {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    font-weight: 600;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border: none;
    border-radius: 10px;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 10px;
}

.start-btn:hover {
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
    transform: translateY(-1px);
}

/* Conversation Panel */
.conv-panel {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.conv-panel.hidden {
    display: none;
}

.start-screen.hidden {
    display: none;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: rgba(30, 30, 50, 0.95);
    border-bottom: 1px solid #333;
    flex-wrap: wrap;
    gap: 8px;
}

.status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #666;
}

.dot.on { background: #2ecc71; }
.dot.paused { background: #f39c12; }

.controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.ctrl-btn {
    padding: 6px 12px;
    background: #333;
    border: none;
    border-radius: 6px;
    color: #ccc;
    font-size: 13px;
    cursor: pointer;
}

.ctrl-btn:hover {
    background: #444;
}

.ctrl-btn.active {
    background: #667eea;
    color: #fff;
}

#speedSelect {
    padding: 6px 8px;
    background: #333;
    border: none;
    border-radius: 6px;
    color: #ccc;
    font-size: 12px;
}

.vol-slider {
    width: 60px;
    height: 4px;
    -webkit-appearance: none;
    background: #444;
    border-radius: 2px;
    display: none;
}

.vol-slider.show {
    display: inline-block;
}

.vol-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    background: #667eea;
    border-radius: 50%;
    cursor: pointer;
}

/* Messages */
.messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.msg {
    margin-bottom: 12px;
    line-height: 1.5;
}

.msg-name {
    font-weight: 600;
    margin-right: 8px;
}

/* Color coding for speakers */
.msg-name[data-color="0"] { color: #4ecdc4; }
.msg-name[data-color="1"] { color: #ff6b6b; }
.msg-name[data-color="2"] { color: #ffe66d; }
.msg-name[data-color="3"] { color: #a29bfe; }
.msg-name[data-color="4"] { color: #fd79a8; }
.msg-name[data-color="5"] { color: #81ecec; }
.msg-name[data-color="user"] { color: #2ecc71; }

.msg-text {
    color: #ddd;
}

/* Input area */
.input-area {
    display: flex;
    gap: 10px;
    padding: 12px 16px;
    background: rgba(30, 30, 50, 0.95);
    border-top: 1px solid #333;
}

.input-area input {
    flex: 1;
    padding: 10px 14px;
    background: #252540;
    border: 1px solid #333;
    border-radius: 8px;
    color: #eee;
    font-size: 14px;
}

.input-area input:focus {
    outline: none;
    border-color: #667eea;
}

.input-area input:disabled {
    opacity: 0.5;
}

.input-area button {
    padding: 10px 20px;
    background: #667eea;
    border: none;
    border-radius: 8px;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
}

.input-area button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
