body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, sans-serif;
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 24px;
    background-color: #f8f9fa;
    color: #1c1c1e;
    line-height: 1.5;
}

.container {
    display: flex;
    gap: 24px;
    margin-bottom: 24px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.main-content-wrapper {
    display: flex;
    flex-direction: column;
    flex: 2;
}

.main-content {
    flex: 2;
}

.sidebar {
    flex: 1;
}

@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }
}

h1 {
    color: #2c3e50;
    text-align: center;
    margin: 10px 0;
    font-weight: 650;
    letter-spacing: -0.8px;
    font-size: 42px;
    font-family: 'Segoe UI', 'Helvetica Neue', sans-serif;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
    padding-bottom: 15px;
}

h1::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, #3498db, #2c3e50);
    border-radius: 3px;
}

#chatLog {
    height: 600px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    background-color: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.user,
.ai,
.system {
    margin: 12px 0;
    word-wrap: break-word;
    line-height: 1.4;
    display: flex;
    flex-direction: column;
}

.user {
    align-items: flex-end;
    transform: translateY(4px);
    opacity: 0;
    animation: messageAppear 0.4s ease forwards;
}

.ai {
    align-items: flex-start;
    transform: translateY(4px);
    opacity: 0;
    animation: messageAppear 0.4s ease forwards 0.1s;
}

.system {
    color: #757575;
    font-style: italic;
    text-align: center;
    margin: 15px auto;
    font-size: 0.85em;
    align-items: center;
}

/* 消息容器样式 */
.message-container {
    max-width: 75%;
    padding: 12px 16px;
    border-radius: 18px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    position: relative;
}

/* 用户(Advisor)消息气泡 */
.user .message-container {
    background: linear-gradient(135deg, #007AFF 0%, #0051D5 100%);
    color: white;
    border-radius: 18px 18px 4px 18px;
}

/* AI(Client)消息气泡 */
.ai .message-container {
    background: #FFFFFF;
    color: #1C1C1E;
    border: 1px solid #E5E5EA;
    border-radius: 18px 18px 18px 4px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

/* 消息头部样式 */
.message-header {
    display: flex;
    align-items: center;
    margin-bottom: 6px;
    font-size: 0.8em;
    opacity: 0.8;
	gap: 4px;
}

.speaker-name {
    font-weight: 600;
    font-size: 0.85em;
}

.message-time {
    font-size: 0.75em;
    opacity: 0.7;
}

/* 消息内容样式 */
.message-content {
    font-size: 0.95em;
    line-height: 1.5;
    word-wrap: break-word;
    white-space: pre-wrap;
}

/* 用户消息的头部和时间颜色 */
.user .message-header {
    color: rgba(255, 255, 255, 0.9);
}

.user .speaker-name {
    color: rgba(255, 255, 255, 0.95);
}

.user .message-time {
    color: rgba(255, 255, 255, 0.95);
}

/* AI消息的头部和时间颜色 */
.ai .message-header {
    color: #8E8E93;
}

.ai .speaker-name {
    color: #1C1C1E;
}

.ai .message-time {
    color: #1C1C1E;
}

.timer-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
    padding: 12px;
    background-color: #f5f5f7;
    border-radius: 8px;
}

#chatTimer {
    font-family: 'Courier New', monospace;
    font-size: 1.1em;
    color: #2c3e50;
    font-weight: 500;
}

.controls {
    display: flex;
    gap: 15px;
    margin-top: 15px;
    margin-bottom: 15px;
    justify-content: center;
}

.settings-panel {
    background-color: #ffffff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.settings-row {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    gap: 10px;
}

.settings-label {
    width: 120px;
    font-weight: 500;
}

.settings-input {
    flex-grow: 0;
    width: 50px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

button {
    min-width: 70px;
    width: auto;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    background-color: #0a84ff;
    color: white;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    font-weight: 500;
    box-shadow: 0 2px 6px rgba(10, 132, 255, 0.16);
}

button:hover {
    background-color: #3a5a9f;
}

button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

#endBtn:not(:disabled) {
    background-color: #ff3b30;
}

#endBtn:not(:disabled):hover {
    background-color: #d70015;
}

.input-area {
    display: flex;
    gap: 10px;
}

#userInput {
    flex-grow: 1;
    padding: 12px 16px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    font-size: 1em;
    transition: border-color 0.2s ease;
    background: #ffffff;
}

#userInput:focus {
    outline: none;
    border-color: #0a84ff;
    box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.12);
}

#typingIndicator {
    animation: pulse 1.5s infinite;
}

@keyframes messageAppear {
    from {
        transform: translateY(8px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes pulse {
    0% {
        opacity: 0.6;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.6;
    }
}