/* 全局样式 */
html, body {
    height: 100%;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    /* 预留底部高度，避免内容被挡住 */
    padding-bottom: 40px;
}

.container-fluid {
    padding: 20px;
}

/* 照片区域样式 */
.photo-section .card {
    border: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.upload-area {
    border: 2px dashed #007bff;
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #f8f9ff;
}

.upload-area:hover {
    border-color: #0056b3;
    background-color: #e9ecef;
}

.upload-area.dragover {
    border-color: #28a745;
    background-color: #d4edda;
}

.upload-placeholder i {
    color: #007bff;
}

.photo-preview {
    text-align: center;
}

.photo-preview img {
    max-height: 400px;
    border: 1px solid #dee2e6;
}

/* 交互区域样式 */
.interaction-section .card {
    border: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.control-panel {
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.status-panel {
    padding: 15px;
    background-color: #fff;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.status-item {
    margin-bottom: 10px;
}

.status-item:last-child {
    margin-bottom: 0;
}

/* 对话历史样式 */
.dialog-history {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    background-color: #fff;
}

.history-header {
    padding: 15px 15px 0;
    display: flex;
    justify-content: between;
    align-items: center;
    border-bottom: 1px solid #dee2e6;
    margin-bottom: 0 !important;
    padding-bottom: 15px;
}

.history-content {
    padding: 15px;
    max-height: 300px;
    overflow-y: auto;
    min-height: 200px;
}

.dialog-entry {
    margin-bottom: 15px;
    padding: 10px;
    border-radius: 8px;
    border-left: 4px solid;
}

.dialog-entry.user {
    background-color: #e3f2fd;
    border-left-color: #2196f3;
}

.dialog-entry.system {
    background-color: #f3e5f5;
    border-left-color: #9c27b0;
}

.dialog-entry.model {
    background-color: #e8f5e8;
    border-left-color: #4caf50;
}

.dialog-entry .timestamp {
    font-size: 0.8em;
    color: #666;
    margin-bottom: 5px;
}

.dialog-entry .content {
    font-size: 0.9em;
    line-height: 1.4;
}

/* 实时状态指示器 */
.realtime-status {
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.status-indicators {
    display: flex;
    justify-content: space-around;
}

.indicator {
    text-align: center;
    padding: 10px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.indicator i {
    display: block;
    font-size: 1.2em;
    margin-bottom: 5px;
    color: #6c757d;
}

.indicator span {
    font-size: 0.8em;
    color: #6c757d;
}

.indicator.active i,
.indicator.active span {
    color: #28a745;
}

.indicator.error i,
.indicator.error span {
    color: #dc3545;
}

/* 连接状态徽章 */
#connectionStatus.badge {
    font-size: 0.8em;
}

.badge.connected {
    background-color: #28a745 !important;
}

.badge.connecting {
    background-color: #ffc107 !important;
}

.badge.disconnected {
    background-color: #dc3545 !important;
}

/* 按钮状态 */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 会话状态徽章 */
#sessionStatus.bg-success {
    background-color: #28a745 !important;
}

#sessionStatus.bg-warning {
    background-color: #ffc107 !important;
}

#sessionStatus.bg-danger {
    background-color: #dc3545 !important;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container-fluid {
        padding: 10px;
    }
    
    .row {
        flex-direction: column;
    }
    
    .photo-section,
    .interaction-section {
        margin-bottom: 20px;
    }
    
    .upload-area {
        padding: 20px;
    }
    
    .control-panel {
        text-align: center;
    }
    
    .control-panel .btn {
        margin-bottom: 10px;
        width: 100%;
    }
    
    .status-indicators {
        flex-direction: column;
    }
    
    .indicator {
        margin-bottom: 10px;
    }
}

/* 滚动条样式 */
.history-content::-webkit-scrollbar {
    width: 6px;
}

.history-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.history-content::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.history-content::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 动画效果 */
.dialog-entry {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 加载状态 */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* 错误提示 */
.alert-dismissible {
    position: relative;
    padding-right: 4rem;
}

.alert-dismissible .btn-close {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 2;
    padding: 0.75rem;
}

/* 照片信息样式 */
.photo-info {
    background-color: #f8f9fa;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #dee2e6;
}

/* 工具提示 */
.tooltip-inner {
    max-width: 200px;
    padding: 0.5rem 0.75rem;
    color: #fff;
    text-align: center;
    background-color: #000;
    border-radius: 0.375rem;
}

 /* icp样式 */
.icp-footer {
    position: fixed;
    bottom: 0;
    width: 100%;
    background: #f8f9fa;
    border-top: 1px solid #dee2e6;
    text-align: center;
    padding: 6px 0;
    font-size: 0.85rem;
    color: #6c757d;
    z-index: 999;
}