/* 基础样式 */
body {
font-family: 'Arial', sans-serif;
color: #333;
line-height: 1.6;
margin: 0;
padding: 0;
}

.themex-header-top {
width: 100vw;
height: 51px;
}

.top-address {
margin-top: 0;
}

.logo {
padding-top: 0; /* 移除默认的上内边距 */
margin-top: 20px; /* 负值可以向上移动 */
margin-bottom: -15px; /* 负值可以向上移动 */
}

/* 调整主logo大小 */
.logo img {
max-height: 70px; /* 设置最大高度 */
width: auto; /* 宽度自动调整保持比例 */
}

/* 调整粘性header的logo大小 */
.main_sticky_l img {
max-height: 75px; /* 粘性header的logo可以小一些 */
}

.container {
max-width: 1200px;
margin: 0 auto;
padding: 0;
}

h1, h2, h3 {
color: #d8bc78;
font-weight: 600;
}

h1 {
font-size: 3.8rem;
text-align: center;
margin-bottom: 40px;
letter-spacing: 2rem;
}

h2 {
font-size: 2rem;
margin-top: 40px;
margin-bottom: 20px;
}

p {
color: #666;
margin-bottom: 20px;
}

/* 文字识别区域 */
.text-container {
background-color: #fff;
border-radius: 12px;
padding: 30px;
margin-bottom: 30px;
box-shadow: 0 4px 15px rgba(0,0,0,0.1);
display: none;
}

.text-container.active {
display: block;
}

.input-section {
margin-bottom: 20px;
}

textarea {
width: 100%;
height: 100px;
padding: 10px;
margin: 0;
border: 1px solid #ddd;
border-radius: 5px;
font-size: 16px;
font-family: Arial, sans-serif;
line-height: 1.5;
resize: none;
outline: none;
box-sizing: border-box;
}

textarea::placeholder {
color: #999;
}

button {
padding: 10px 20px;
background-color: #d8bc78;
color: #fff;
border: none;
border-radius: 5px;
font-size: 16px;
cursor: pointer;
transition: background-color 0.3s ease;
margin-bottom: 30px;
}

button:hover {
background-color: #7a622e;
}

.result-text {
background-color: #f9f9f9;
padding: 15px;
border-radius: 5px;
border: 1px solid #ddd;
color: #333;
text-align: left;
min-height: 50px;
}

/* 结果文本框颜色样式 */
.result-text.depression {
background-color: #ffebee;
border-left: 4px solid #f44336;
}

.result-text.normal {
background-color: #e8f5e9;
border-left: 4px solid #4caf50;
}

/* 检测方式选择 */
.detection-method {
display: flex;
justify-content: center;
gap: 20px;
margin-bottom: 30px;
}

.method-tab {
padding: 15px 30px;
background-color: #e9ecef;
border-radius: 8px;
cursor: pointer;
transition: all 0.3s ease;
font-size: 1.1rem;
font-weight: 500;
}

.method-tab.active {
background-color: #d8bc78;
color: white;
}

/* 语音识别区域 */
.voice-container {
background-color: #fff;
border-radius: 12px;
padding: 30px;
margin-bottom: 30px;
box-shadow: 0 4px 15px rgba(0,0,0,0.1);
display: none;
}

.voice-container.active {
display: block;
}

#start-btn {
display: flex;
align-items: center;
justify-content: center;
gap: 10px;
padding: 15px 30px;
font-size: 1.2rem;
color: #fff;
background: #d8bc78;
border: none;
border-radius: 50px;
cursor: pointer;
transition: all 0.3s ease;
margin: 0 auto;
}

#start-btn:hover {
background: #7a622e;
transform: translateY(-2px);
box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.result {
background: rgba(255, 255, 255, 0.1);
padding: 20px;
border-radius: 12px;
width: 100%;
min-height: 100px;
display: flex;
align-items: center;
justify-content: center;
font-size: 1.1rem;
color: #333;
border: 2px solid rgba(255, 255, 255, 0.3);
margin-top: 20px;
background-color: #f8f9fa;
}

/* 面部识别区域 */
.face-container {
background-color: #fff;
border-radius: 12px;
padding: 30px;
margin-bottom: 30px;
box-shadow: 0 4px 15px rgba(0,0,0,0.1);
display: none;
}

.face-container.active {
display: block;
}

.input-method-selector {
margin: 20px auto;
display: flex;
justify-content: center;
gap: 20px;
}

.method-btn {
background-color: #d8bc78;
color: white;
border: none;
padding: 12px 25px;
font-size: 1rem;
border-radius: 8px;
cursor: pointer;
transition: all 0.3s ease;
display: flex;
align-items: center;
gap: 10px;
}

.method-btn:hover {
background-color: #7a622e;
}

.method-btn.active {
background-color: #7a622e;
box-shadow: 0 0 0 3px rgba(139, 195, 74, 0.5);
}

.video-container {
background-color: #e9ecef;
border-radius: 15px;
padding: 20px;
margin-bottom: 20px;
position: relative;
overflow: hidden;
}

.video-placeholder {
width: 100%;
height: 400px;
display: flex;
justify-content: center;
align-items: center;
background-color: #d1d5db;
border-radius: 10px;
color: #666;
font-size: 20px;
position: relative;
}

.upload-area {
display: none;
margin: 20px auto;
text-align: center;
}

.upload-container {
border: 2px dashed #d8bc78;
border-radius: 10px;
padding: 30px;
cursor: pointer;
transition: all 0.3s ease;
margin-bottom: 20px;
}

.upload-container:hover {
background-color: #f0f7f0;
}

.upload-icon {
font-size: 50px;
color: #d8bc78;
margin-bottom: 15px;
}

.upload-text {
font-size: 18px;
color: #666;
}

#previewImage {
max-width: 100%;
max-height: 400px;
display: none;
margin: 0 auto;
border-radius: 10px;
}

.face-box {
position: absolute;
border: 4px dashed #d8bc78;
border-radius: 15px;
display: none;
}

.capture-btn {
background-color: #d8bc78;
color: #fff;
border: none;
padding: 12px 25px;
font-size: 1rem;
border-radius: 8px;
cursor: pointer;
transition: all 0.3s ease;
margin: 20px auto;
display: block;
}

.capture-btn:hover {
background-color: #7a622e;
}

.capture-btn:disabled {
background-color: #cccccc;
cursor: not-allowed;
}

/* 结果区域 */
.result-container {
margin-top: 30px;
padding: 20px;
background-color: #f8f9fa;
border-radius: 10px;
border: 1px solid #ddd;
margin-bottom: 30px;
}

.result-text {
font-size: 1.1rem;
color: #666;
}

.emotion-results {
display: flex;
flex-wrap: wrap;
justify-content: center;
gap: 20px;
margin-top: 20px;
}

.emotion-item {
background-color: #fff;
border-radius: 10px;
padding: 15px;
box-shadow: 0 4px 8px rgba(0,0,0,0.1);
width: 200px;
text-align: center;
}

.emotion-name {
font-weight: bold;
font-size: 1rem;
margin-bottom: 10px;
}

.emotion-bar {
height: 20px;
background-color: #e0e0e0;
border-radius: 10px;
overflow: hidden;
margin-bottom: 10px;
}

.emotion-progress {
height: 100%;
background-color: #d8bc78;
border-radius: 10px;
transition: width 0.5s ease;
}

.emotion-percentage {
font-size: 0.9rem;
color: #555;
}

/* 舒缓内容区域 */
.soothing-content {
margin-top: 30px;
padding: 20px;
background-color: #f0f7f0;
border-radius: 10px;
border: 1px solid #c8e0c8;
display: none;
}

.soothing-video {
width: 100%;
max-width: 600px;
height: 350px;
margin: 20px auto;
border-radius: 10px;
}

/* 倾诉模块 */
.chat-container {
margin-top: 30px;
padding: 20px;
background-color: #f8f9fa;
border-radius: 10px;
border: 1px solid #ddd;
display: none;
}

.chat-messages {
height: 300px;
overflow-y: auto;
margin-bottom: 15px;
padding: 15px;
background-color: #fff;
border-radius: 8px;
border: 1px solid #ddd;
}

.message {
margin-bottom: 10px;
padding: 10px;
border-radius: 5px;
max-width: 80%;
}

.user-message {
background-color: #e3f2fd;
margin-left: auto;
}

.bot-message {
background-color: #f1f1f1;
margin-right: auto;
}

.chat-input {
display: flex;
gap: 10px;
}

.chat-input input {
flex-grow: 1;
padding: 10px;
border-radius: 5px;
border: 1px solid #ddd;
}

.chat-input button {
padding: 10px 20px;
background-color: #d8bc78;
color: white;
border: none;
border-radius: 5px;
cursor: pointer;
}

/* 设备连接状态 */
.device-status {
margin-top: 20px;
padding: 10px;
border-radius: 5px;
font-weight: bold;
text-align: center;
}

.connected {
background-color: #e8f5e9;
color: #2e7d32;
}

.disconnected {
background-color: #ffebee;
color: #c62828;
}

/* 综合结果区域 */
.combined-result {
background-color: #fff;
border-radius: 12px;
padding: 30px;
margin-top: 40px;
box-shadow: 0 4px 15px rgba(0,0,0,0.1);
display: none;
}

.combined-result.active {
display: block;
}

.result-summary {
font-size: 1.2rem;
margin-bottom: 20px;
text-align: center;
}

.result-details {
display: flex;
flex-wrap: wrap;
gap: 20px;
justify-content: center;
}

.result-card {
background-color: #f8f9fa;
border-radius: 10px;
padding: 20px;
min-width: 250px;
flex: 1;
box-shadow: 0 2px 8px rgba(0,0,0,0.1);
max-width: 100%;
}

.result-card h3 {
color: #d8bc78;
margin-top: 0;
border-bottom: 1px solid #ddd;
padding-bottom: 10px;
}

/* 页脚 */
.site-footer {
background: #d8bc78;
color: white;
text-align: center;
padding: 15px;
margin-top: 40px;
}

.site-footer p {
margin: 0;
font-size: 0.9rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
.detection-method {
flex-direction: column;
align-items: center;
}

.input-method-selector {
flex-direction: column;
align-items: center;
}

.method-btn, .method-tab {
width: 100%;
text-align: center;
}

.video-placeholder, #video {
height: 300px;
}

.soothing-video {
height: 250px;
}
}




/* 视频容器 */
.video-placeholder {
position: relative;
width: 100%;
height: 400px;
background-color: lightgray;
border: 2px solid #7a622e;
border-radius: 10px;
overflow: hidden;
display: flex;
justify-content: center;
align-items: center;
margin-bottom: 20px;
}

/* 视频元素 */
#video {
width: 100%;
height: 100%;
object-fit: contain;
}

/* 处理后的图片 */
#processedImage {
max-width: 100%;
max-height: 100%;
object-fit: contain;
display: none;
}

/* 占位文字 */
#placeholderText {
position: absolute;
color: white;
font-size: 1rem;
}

/* 按钮基础样式 */
.upload-btn {
padding: 10px;
background-color: #d8bc78;
color: #fff;
border: none;
border-radius: 5px;
font-size: 1rem;
cursor: pointer;
text-align: center;
box-sizing: border-box;
width: 200px;
display: inline-block;
line-height: normal;
vertical-align: middle;
margin: 5px;
}

/* 按钮悬停效果 */
.upload-btn:hover {
background-color: #7a622e;
}

/* 上传按钮组容器 */
.upload-container {
display: flex;
justify-content: center;
margin-bottom: 20px;
}

/* 结果容器 */
.f-result-container {
background-color: #fff;
border-radius: 10px;
padding: 20px;
margin-bottom: 5px;
}

.f-result-text {
color: #333;
font-size: 1.3rem;
}