/* 通用页面组件样式 */

/* 面包屑导航 */
.breadcrumb-section {
    background: white;
    border-bottom: 1px solid #e5e7eb;
    padding: 15px 0;
}

.breadcrumb {
    font-size: 14px;
    color: #6b7280;
}

.breadcrumb a {
    color: #4f46e5;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* 通用按钮扩展 */
.btn-block {
    width: 100%;
    display: block;
    text-align: center;
}

.btn-outline {
    background: white;
    color: #6b7280;
    border: 1px solid #e5e7eb;
}

.btn-outline:hover {
    background: #f9fafb;
    color: #4f46e5;
    border-color: #4f46e5;
}

/* 通用模态框 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow: hidden;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e5e7eb;
}

.modal-header h3 {
    margin: 0;
    color: #1f2937;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #6b7280;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: #1f2937;
}

.modal-body {
    padding: 20px;
}

/* 侧边栏小部件 */
.sidebar-widget {
    background: white;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    margin-bottom: 30px;
    overflow: hidden;
}

.widget-title {
    background: #f9fafb;
    padding: 15px 20px;
    border-bottom: 1px solid #e5e7eb;
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 评分星星 */
.rating {
    display: flex;
    align-items: center;
    gap: 2px;
}

.rating i {
    color: #fbbf24;
    font-size: 14px;
}

.rating .far {
    color: #d1d5db;
}

.rating-score {
    margin-left: 5px;
    color: #6b7280;
    font-weight: 500;
}

/* 头像占位符 */
.avatar-placeholder {
    background: #f3f4f6;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

/* 无内容状态 */
.no-content, .no-results {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.no-content-icon, .no-results-icon {
    font-size: 64px;
    color: #d1d5db;
    margin-bottom: 25px;
}

.no-content h3, .no-results h3 {
    color: #1f2937;
    margin-bottom: 15px;
    font-size: 20px;
}

.no-content p, .no-results p {
    color: #6b7280;
    margin-bottom: 30px;
}

/* 加载和消息提示 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f4f6;
    border-top: 4px solid #4f46e5;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    margin-top: 15px;
    color: #6b7280;
    font-size: 14px;
}

.message-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 15px 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    max-width: 300px;
}

.message-success {
    border-left: 4px solid #10b981;
    background: #f0fdf4;
}

.message-error {
    border-left: 4px solid #ef4444;
    background: #fef2f2;
}

.message-warning {
    border-left: 4px solid #f59e0b;
    background: #fffbeb;
}

.message-info {
    border-left: 4px solid #3b82f6;
    background: #eff6ff;
}

/* 表单样式 */
.field-error {
    color: #ef4444;
    font-size: 12px;
    margin-top: 5px;
}

.error {
    border-color: #ef4444 !important;
}

/* 响应式优化 */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .sidebar-widget {
        margin-bottom: 20px;
    }
    
    .message-toast {
        right: 10px;
        left: 10px;
        max-width: none;
    }
}