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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header h1 {
    font-size: 32px;
    margin-bottom: 8px;
    font-weight: 600;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.header p {
    opacity: 0.9;
    font-size: 16px;
}

.content {
    padding: 30px;
    flex: 1;
    overflow-y: auto;
}

/* ==================== 事件时间线样式 ==================== */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.timeline-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: rgba(102, 126, 234, 0.3);
    transform: translateX(-50%);
}

.timeline-events {
    position: relative;
    z-index: 1;
}

.timeline-event {
    display: flex;
    margin-bottom: 30px;
    position: relative;
    animation: fadeInUp 0.4s ease-out;
}

.timeline-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(102, 126, 234, 0.8);
    border: 2px solid white;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.event-content {
    flex: 1;
    max-width: 45%;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(102, 126, 234, 0.2);
    border-radius: 12px;
    padding: 12px 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.event-time {
    font-size: 11px;
    color: #999;
    margin-bottom: 6px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.event-title {
    font-size: 14px;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 4px;
}

.event-description {
    font-size: 12px;
    color: #666;
    line-height: 1.5;
}

.section {
    background: white;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 25px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

.section h2 {
    color: #667eea;
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 24px;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
}

.control-box {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.control-box label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #333;
}

.info-box {
    background: #f0f4ff;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #667eea;
}

.btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

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

.btn:active {
    transform: translateY(0);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: #6c757d;
    box-shadow: 0 2px 8px rgba(108, 117, 125, 0.3);
}

.btn-secondary:hover {
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.4);
}

.btn-danger {
    background: #ff6b6b;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
}

.btn-danger:hover {
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4);
}

.btn-success {
    background: #51cf66;
    box-shadow: 0 2px 8px rgba(81, 207, 102, 0.3);
}

.btn-success:hover {
    box-shadow: 0 4px 12px rgba(81, 207, 102, 0.4);
}

/* Agent标签样式 */
.agent-tag {
    background: #667eea;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 4px;
}

.agent-tag button {
    background: rgba(255, 255, 255, 0.3);
    border: none;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    cursor: pointer;
    font-size: 12px;
    line-height: 1;
    padding: 0;
}

.agent-tag button:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Agent卡片样式 */
.agent-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.agent-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.agent-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.agent-card-name {
    font-weight: 600;
    font-size: 18px;
    color: #333;
}

.agent-card-status {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.agent-card-status.active {
    background: #d4edda;
    color: #155724;
}

.agent-card-status.inactive {
    background: #f8d7da;
    color: #721c24;
}

.agent-card-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    margin-top: 10px;
    font-size: 14px;
    color: #666;
}

.agent-card-info-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.agent-card-info-item strong {
    color: #333;
}

/* 状态消息样式 */
.status-message {
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
}

.status-message.success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.status-message.error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.status-message.warning {
    background: #fff3cd;
    border: 1px solid #ffc107;
    color: #856404;
}

.status-message.info {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

/* 滚动条样式 */
.content::-webkit-scrollbar {
    width: 8px;
}

.content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.content::-webkit-scrollbar-thumb {
    background: rgba(102, 126, 234, 0.3);
    border-radius: 4px;
}

.content::-webkit-scrollbar-thumb:hover {
    background: rgba(102, 126, 234, 0.5);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        border-radius: 0;
        margin: 0;
        min-height: 100vh;
    }

    .header {
        padding: 20px;
    }

    .header h1 {
        font-size: 24px;
    }

    .content {
        padding: 20px;
    }

    .section {
        padding: 20px;
    }

    .control-box {
        padding: 15px;
    }
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: #fefefe;
    margin: 10% auto;
    padding: 30px;
    border: 1px solid #888;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    position: relative;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    right: 15px;
    top: 15px;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: #000;
    text-decoration: none;
}

/* 标签页样式 */
.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.tab-btn {
    background: transparent;
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    color: #667eea;
}

.tab-btn.active {
    color: #667eea;
    border-bottom-color: #667eea;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* 统计卡片样式 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 2px 12px rgba(102, 126, 234, 0.3);
}

.stat-label {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
}

/* 表格样式 */
.invitation-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.invitation-table th,
.invitation-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.invitation-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
}

.invitation-table tr:hover {
    background: #f8f9fa;
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.status-used {
    background: #d4edda;
    color: #155724;
}

.status-unused {
    background: #fff3cd;
    color: #856404;
}

.status-inactive {
    background: #f8d7da;
    color: #721c24;
}

/* ==================== 聊天记录样式 ==================== */
.chat-messages-container {
    max-height: 600px;
    overflow-y: auto;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
}

.chat-date {
    text-align: center;
    font-size: 11px;
    color: #999;
    margin: 8px 0;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.chat-message {
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.chat-message.friend {
    align-items: flex-start;
}

.chat-message.me {
    align-items: flex-end;
}

.chat-bubble {
    max-width: 78%;
    padding: 12px 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.1);
    font-size: 13px;
    line-height: 1.5;
    color: #333;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
}

.chat-message.me .chat-bubble {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.85), rgba(118, 75, 162, 0.85));
    color: white;
    border-color: rgba(102, 126, 234, 0.5);
}

.chat-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 11px;
    color: #999;
}

/* 思考内容样式 */
.chat-thinking {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 8px;
    padding: 10px 14px;
    background: rgba(102, 126, 234, 0.12);
    border: 1px solid rgba(102, 126, 234, 0.25);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.chat-thinking:hover {
    background: rgba(102, 126, 234, 0.18);
    border-color: rgba(102, 126, 234, 0.35);
}

.thinking-icon {
    font-size: 16px;
    opacity: 0.8;
    flex-shrink: 0;
    margin-top: 2px;
}

.thinking-content {
    flex: 1;
    font-size: 12px;
    line-height: 1.6;
    color: rgba(0, 0, 0, 0.75);
    font-style: italic;
    letter-spacing: 0.2px;
}

/* 思考开关按钮样式 */
.toggle-thinking-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid #ddd;
    background: white;
    color: #333;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.toggle-thinking-btn:hover {
    background: #f8f9fa;
    border-color: #667eea;
}

.toggle-thinking-btn.active {
    background: rgba(102, 126, 234, 0.3);
    border-color: rgba(102, 126, 234, 0.5);
    color: #667eea;
}

.toggle-thinking-btn.active .toggle-icon {
    opacity: 1;
}

.toggle-thinking-btn:not(.active) .toggle-icon {
    opacity: 0.5;
}

.toggle-icon {
    font-size: 16px;
    transition: opacity 0.2s ease;
}

.toggle-text {
    font-weight: 500;
}

