/* 门店评级系统样式 - 优化版 */

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

:root {
    --primary-color: #667eea;
    --primary-dark: #5568d3;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --bg-color: #f5f7fa;
    --card-bg: #ffffff;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.app-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
    min-height: 100vh;
}

/* ==================== 顶部标题栏 ==================== */
.app-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 100;
}

.app-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.header-export-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.header-export-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

/* ==================== 反馈提示 ==================== */
.feedback-notice {
    background: linear-gradient(135deg, #ffeaa7 0%, #fdcb6e 100%);
    color: #2d3436;
    padding: 10px 20px;
    border-radius: 8px;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    margin: 1rem;
    box-shadow: 0 2px 8px rgba(253, 203, 110, 0.3);
    border-left: 4px solid #f39c12;
}

/* ==================== 评价标准横幅 ==================== */
.criteria-banner {
    background: white;
    padding: 1.5rem;
    margin: 1rem;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

.criteria-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    text-align: center;
}

.criteria-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.criteria-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: 10px;
    border: 2px solid;
    transition: all 0.3s;
}

.criteria-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.criteria-a {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border-color: var(--success-color);
}

.criteria-b {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-color: var(--warning-color);
}

.criteria-c {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border-color: var(--danger-color);
}

.criteria-badge {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
}

.criteria-a .criteria-badge {
    background: var(--success-color);
}

.criteria-b .criteria-badge {
    background: var(--warning-color);
}

.criteria-c .criteria-badge {
    background: var(--danger-color);
}

.criteria-text {
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--text-primary);
}

/* ==================== 筛选区域 ==================== */
.filter-section {
    background: white;
    padding: 1.5rem;
    margin: 1rem;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

.filter-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.filter-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    color: var(--text-primary);
    background: white;
    cursor: pointer;
    transition: all 0.3s;
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.filter-actions {
    display: flex;
    gap: 0.75rem;
}

.btn-primary,
.btn-secondary {
    flex: 1;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: white;
    color: var(--text-secondary);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-color);
}

/* ==================== 门店卡片 ==================== */
.results-container {
    padding: 0 1rem 1rem;
}

.store-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s;
}

.store-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.store-header {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--bg-color);
}

.store-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.store-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.meta-label {
    font-weight: 600;
}

.store-body {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.revenue-display {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 2px solid #0ea5e9;
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
}

.revenue-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.revenue-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #0284c7;
}

.rating-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.rating-btn {
    padding: 1rem;
    border: 3px solid var(--border-color);
    border-radius: 12px;
    background: white;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.rating-btn:hover {
    transform: scale(1.05);
}

.rating-btn.selected {
    border-width: 3px;
    transform: scale(1.08);
}

.rating-btn.rating-a.selected {
    background: linear-gradient(135deg, var(--success-color) 0%, #059669 100%);
    border-color: var(--success-color);
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.rating-btn.rating-b.selected {
    background: linear-gradient(135deg, var(--warning-color) 0%, #d97706 100%);
    border-color: var(--warning-color);
    color: white;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

.rating-btn.rating-c.selected {
    background: linear-gradient(135deg, var(--danger-color) 0%, #dc2626 100%);
    border-color: var(--danger-color);
    color: white;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

/* ==================== 分页 ==================== */
.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 1rem;
    gap: 1rem;
}

.page-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s;
}

.page-btn:hover:not(:disabled) {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.page-arrow {
    font-size: 1.25rem;
}

.page-info {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    padding: 0.75rem 1.5rem;
    background: white;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
}

/* ==================== 欢迎消息 ==================== */
.welcome-message {
    text-align: center;
    padding: 4rem 2rem;
}

.welcome-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.welcome-message h2 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.welcome-message p {
    font-size: 1rem;
    color: var(--text-secondary);
}

/* ==================== 统计卡片 ==================== */
.stats-title {
    text-align: center;
    padding: 2rem 1rem 1rem;
}

.stats-title h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.stats-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    padding: 0 1rem 1rem;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s;
}

.stat-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.stat-zone {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-rate {
    font-size: 1.5rem;
    font-weight: 700;
}

.stat-progress {
    height: 8px;
    background: var(--bg-color);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.stat-progress-bar {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
}

.stat-details {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* ==================== Toast ==================== */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--text-primary);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    font-size: 1rem;
    font-weight: 600;
    opacity: 0;
    transition: all 0.3s;
    z-index: 1000;
    max-width: 90%;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast.success {
    background: var(--success-color);
}

.toast.error {
    background: var(--danger-color);
}

.toast.info {
    background: var(--primary-color);
}

/* ==================== 模态框 ==================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 1rem;
}

.modal-content {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    max-width: 400px;
    width: 100%;
    box-shadow: var(--shadow-lg);
    text-align: center;
}

.modal-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.modal-text {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.modal-actions {
    display: flex;
    gap: 0.75rem;
}

/* ==================== 加载动画 ==================== */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading p {
    margin-top: 1rem;
    font-size: 1rem;
    color: var(--text-secondary);
}

/* ==================== 空结果 ==================== */
.empty-results {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-results-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.empty-results h3 {
    font-size: 1.25rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.empty-results p {
    font-size: 1rem;
    color: var(--text-secondary);
}

/* ==================== 移动端适配 ==================== */
@media (max-width: 768px) {
    .app-title {
        font-size: 1.25rem;
    }
    
    .header-export-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }
    
    /* 反馈提示移动端优化 */
    .feedback-notice {
        margin: 0.75rem;
        padding: 8px 15px;
        font-size: 13px;
        border-radius: 6px;
    }
    
    .criteria-banner {
        padding: 1rem;
        margin: 0.75rem;
    }
    
    .criteria-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .criteria-card {
        padding: 0.75rem;
    }
    
    .criteria-badge {
        width: 36px;
        height: 36px;
        font-size: 1.125rem;
    }
    
    .criteria-text {
        font-size: 0.8125rem;
    }
    
    .filter-section {
        padding: 1rem;
        margin: 0.75rem;
    }
    
    .filter-group {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .filter-actions {
        flex-direction: column;
    }
    
    .results-container {
        padding: 0 0.75rem 0.75rem;
    }
    
    .store-card {
        padding: 1rem;
    }
    
    .store-name {
        font-size: 1.125rem;
    }
    
    .store-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .revenue-value {
        font-size: 1.5rem;
    }
    
    .rating-buttons {
        gap: 0.5rem;
    }
    
    .rating-btn {
        padding: 0.875rem;
        font-size: 1.25rem;
    }
    
    .pagination {
        flex-direction: column;
        padding: 1rem 0.75rem;
    }
    
    .page-btn {
        width: 100%;
        justify-content: center;
    }
    
    .page-text {
        display: none;
    }
    
    .page-info {
        width: 100%;
        text-align: center;
    }
    
    .welcome-message {
        padding: 3rem 1rem;
    }
    
    .welcome-icon {
        font-size: 3rem;
    }
    
    .stats-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .app-header {
        padding: 0.875rem 1rem;
    }
    
    .app-title {
        font-size: 1.125rem;
    }
    
    .criteria-title {
        font-size: 0.9375rem;
    }
    
    .modal-content {
        padding: 1.5rem;
    }
}
