/* ========== 1.全局布局/适配 ========== */
html, body {
    width: 100%;
    min-height: 100%;
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.page-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
}

.container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 10px;
    border-radius: 12px;
    background-color: rgba(255,255,255,0.95);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    text-align: center;
}

h1 {
    color: #2c3e50;
    margin-bottom: 30px;
    font-size: 2.5em;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

/* ========== 2.自适应:移动端专用 ========== */
@media (max-width: 600px) {
    .container {
        padding: 10px 2px;
        border-radius: 0;
        box-shadow: none;
    }
    h1 {
        font-size: 1.3em;
    }
    .analysis-result-view {
        padding: 8px 2px 8px 6px;
    }
    .button-container {
        flex-direction: column;
        gap: 10px;
    }
    #transcript {
        padding: 10px;
        min-height: 85px;
    }
}

/* ========== 3.主功能区排版 ========== */
.status {
    margin-bottom: 20px;
    font-size: 18px;
    display: flex;
    justify-content: center;
    align-items: center;
}
#statusIndicator {
    font-size: 24px;
    margin-left: 10px;
}
.button-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

/* ========== 4. SOAP/analysis 美化 ========== */
.analysis-section {
    display: flex;
    gap: 30px;
    margin-top: 30px;
    justify-content: space-between;
}
.analysis-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}
.analysis-column button {
    margin-bottom: 15px;
    font-size: 16px;
}
.analysis-result-view {
    background: #f4f9fb;
    border: 1px solid #c7e0ed;
    border-radius: 7px;
    padding: 16px 16px 8px 16px;
    margin-bottom: 12px;
    text-align: left;
    min-height: 70px;
    font-size: 14px;
}

/* soap和entities美化 */
.soap-section-list {
    margin: 0 0 20px 0;
    padding: 0;
    list-style: none;
}
.soap-section-list > li {
    margin-bottom: 20px;
    background: #f9fbfd;
    border-radius: 7px;
    box-shadow: 0 1px 4px rgba(184,222,251,0.08);
    padding: 10px 14px;
}
.soap-label {
    color: #1565c0;
    font-weight: bold;
    font-size: 1.12em;
    margin-bottom: 4px;
    display: block;
}
.soap-body {
    margin-bottom:8px;
    color: #222;
}
.soap-entity-list {
    margin: 4px 0 0 0;
    padding-left: 18px;
}
.soap-entity-type {
    color: #07a;
    font-weight: bold;
    margin-right: 6px;
}
.soap-entity-traits {
    color: #7c8a99;
    font-size: 0.93em;
    margin-left: 4px;
}

/* summary高亮 */
.analysis-summary-box {
    background: #eefff2;
    border-left: 4px solid #2ecc71;
    font-weight: 600;
    border-radius: 7px;
    padding: 10px 18px;
    margin-bottom: 16px;
}

/* 全局entities */
.global-entity-list {
    margin: 8px 0 0 18px;
    padding: 0;
    list-style-type: disc;
    font-size: 1em;
}

/* analysis entity 列表 */
.analysis-entity-list {
    margin: 0 0 0 12px;
    padding: 0;
    list-style: disc;
}
.analysis-entity-list-item {
    margin-bottom: 0.3em;
    line-height: 1.45;
}
.analysis-entity-type {
    color: #0a7596;
    font-weight: bold;
    margin-right: 8px;
}
.analysis-entity-text {
    color: #222;
}
.analysis-entity-traits {
    color: #888;
    font-size: 0.96em;
    margin-left: 8px;
}

/* ========== 5. transcript显示区 ========== */
#transcript {
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-y: auto;
    max-height: 300px;
    background-color: #ffffff;
    padding: 20px;
    border-radius: 8px;
    min-height: 150px;
    font-size: 16px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
    text-align: left;
    border: 1px solid #e0e0e0;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.06);
}
#transcript p.partial {
    color: #666;
    font-style: italic;
}
#transcript p.error {
    color: #e74c3c;
}

/* ========== 6. 按钮彩色 & hover必须优先 ========== */
button {
    padding: 12px 25px;
    font-size: 16px;
    cursor: pointer;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 25px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(50, 50, 93, 0.11), 0 1px 3px rgba(0, 0, 0, 0.08);
}
button:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
}
#startButton {
    background-color: #2ecc71;
}
#startButton:hover {
    background-color: #27ae60;
}
#stopButton {
    background-color: #e74c3c;
}
#stopButton:hover {
    background-color: #c0392b;
}
#clearButton {
    background-color: #f39c12;
}
#clearButton:hover {
    background-color: #d35400;
}

/* ========== 7. 其余信息区和页脚 ========== */
.info-section {
    margin-top: 30px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    text-align: left;
}
.info-section h2 {
    color: #2c3e50;
    margin-bottom: 15px;
}
.info-section ul {
    padding-left: 20px;
}
.footer {
    margin-top: 30px;
    font-size: 14px;
    color: #7f8c8d;
}
.copy-toast {
    position: fixed;
    top: 32px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    background: #00a676;
    color: #fff;
    padding: 10px 28px;
    border-radius: 7px;
    font-weight: 500;
    font-size: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.13);
    letter-spacing: 0.5px;
    transition: opacity 0.2s;
    opacity: 0.96; /* 微微透明，舒适 */
}