/* 全局样式重置和基础设置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 头部样式 */
.header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* 主要内容区域 */
.main-content {
    flex: 1;
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

/* 输入区域样式 */
.input-section {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 30px;
    border-left: 4px solid #667eea;
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #495057;
    font-size: 1rem;
}

.input-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    background: white;
    cursor: pointer;
}

.input-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.input-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    resize: vertical;
}

.input-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.think-input-group {
    transition: all 0.3s ease;
}

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

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



.action-buttons {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.action-buttons button {
    flex: 1;
}

.list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.list-actions {
    display: flex;
    gap: 12px;
}

/* 对话列表区域 */
.dialogue-list h2 {
    color: #495057;
    margin-bottom: 20px;
    font-size: 1.5rem;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 10px;
}

.dialogue-container {
    display: grid;
    gap: 20px;
}

/* 对话项样式 */
.dialogue-item {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    border-left: 4px solid #28a745;
    transition: all 0.3s ease;
    position: relative;
}

.dialogue-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.dialogue-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.dialogue-role {
    display: flex;
    align-items: center;
}

.role-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    color: white;
}

.role-questioner {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

.role-responder {
    background: linear-gradient(135deg, #007bff 0%, #6610f2 100%);
}

.dialogue-time {
    font-size: 0.9rem;
    color: #6c757d;
}

.dialogue-content {
    margin-bottom: 15px;
}

.dialogue-text {
    background: white;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    border-left: 3px solid #007bff;
}

.think-text {
    background: #fff3cd;
    padding: 15px;
    border-radius: 8px;
    border-left: 3px solid #ffc107;
    font-style: italic;
}

.dialogue-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.btn-secondary {
    background: #6c757d;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #545b62;
}

.btn-danger {
    background: #dc3545;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-danger:hover {
    background: #c82333;
}

/* 空状态样式 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

.empty-state h3 {
    margin-bottom: 10px;
    font-size: 1.3rem;
}

/* 底部样式 */
.footer {
    text-align: center;
    margin-top: 40px;
    color: white;
    opacity: 0.8;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .main-content {
        padding: 20px;
    }
    
    .input-section {
        padding: 20px;
    }
    
    .dialogue-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .dialogue-actions {
        justify-content: flex-start;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dialogue-item {
    animation: fadeIn 0.5s ease-out;
    display: flex;
    margin-bottom: 30px;
    gap: 15px;
}

.dialogue-left {
    flex-direction: row;
}

.dialogue-right {
    flex-direction: row-reverse;
}

.dialogue-avatar {
    flex-shrink: 0;
}

.avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.avatar:hover {
    transform: scale(1.05);
}

.avatar-questioner {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
}

.avatar-responder {
    background: linear-gradient(135deg, #007bff 0%, #6610f2 100%);
    color: white;
}

.dialogue-content-wrapper {
    flex: 1;
    max-width: 70%;
}

.dialogue-left .dialogue-content-wrapper {
    text-align: left;
}

.dialogue-right .dialogue-content-wrapper {
    text-align: right;
}

.dialogue-left .dialogue-header {
    justify-content: flex-start;
}

.dialogue-right .dialogue-header {
    justify-content: flex-end;
}

.dialogue-left .dialogue-actions {
    justify-content: flex-start;
}

.dialogue-right .dialogue-actions {
    justify-content: flex-end;
}

.dialogue-left .dialogue-text {
    border-left: 3px solid #007bff;
    border-right: none;
}

.dialogue-right .dialogue-text {
    border-right: 3px solid #28a745;
    border-left: none;
}

.dialogue-left .think-text {
    border-left: 3px solid #ffc107;
    border-right: none;
}

.dialogue-right .think-text {
    border-right: 3px solid #ffc107;
    border-left: none;
}

/* 悬浮按钮样式 */
.floating-actions {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 1000;
}

.floating-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.floating-btn-secondary {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
}

.floating-btn-danger {
    background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
    color: white;
}

.floating-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.floating-btn:active {
    transform: translateY(-1px) scale(0.98);
}

.btn-icon {
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

.btn-text {
    position: absolute;
    top: 50%;
    left: 100%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    margin-left: 8px;
}

.floating-btn:hover .btn-text {
    opacity: 1;
    left: 100%;
}

.floating-btn:hover .btn-icon {
    transform: scale(1.1);
}

/* 悬浮按钮主样式 */
.floating-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

/* 响应式设计 - 悬浮按钮 */
@media (max-width: 768px) {
    .floating-actions {
        top: 10px;
        right: 10px;
        gap: 8px;
    }
    
    .floating-btn {
        width: 50px;
        height: 50px;
    }
    
    .btn-icon {
        font-size: 1.2rem;
    }
    
    .btn-text {
        font-size: 0.7rem;
        padding: 4px 8px;
    }
}

/* 模态窗口样式 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    animation: fadeIn 0.3s ease-out;
}

.modal-content {
    background: white;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease-out;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #e9ecef;
    background: #f8f9fa;
    border-radius: 15px 15px 0 0;
}

.modal-header h3 {
    margin: 0;
    color: #495057;
    font-size: 1.3rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6c757d;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: #e9ecef;
    color: #495057;
}

.modal-body {
    padding: 25px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px 25px;
    border-top: 1px solid #e9ecef;
    background: #f8f9fa;
    border-radius: 0 0 15px 15px;
}

/* 模态窗口动画 */
@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* 角色按钮样式 */
.role-buttons {
    display: flex;
    gap: 10px;
    margin-top: 8px;
}

.role-btn {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    background: white;
    color: #495057;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.role-btn:hover {
    border-color: #667eea;
    transform: translateY(-1px);
}

.role-btn-active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

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

/* 模态窗口响应式设计 */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 15px 20px;
    }
    
    .modal-footer {
        flex-direction: column;
    }
    
    .modal-footer button {
        width: 100%;
    }
    
    .role-buttons {
        flex-direction: column;
    }
}