/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f5f5f5;
    line-height: 1.4;
    color: #333;
    overflow-x: hidden;
}

#app {
    max-width: 100%;
    margin: 0 auto;
}

/* 头部样式 */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    padding: 20px 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header h1 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
}

.subtitle {
    font-size: 14px;
    margin-bottom: 5px;
    opacity: 0.9;
}

.tips {
    font-size: 12px;
    opacity: 0.8;
    line-height: 1.3;
}

/* 筛选栏样式 */
.filter-bar {
    background: white;
    padding: 15px;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    align-items: end;
}

.filter-select, .filter-input, .search-input, .update-btn {
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    outline: none;
    transition: all 0.3s ease;
}

.filter-select:focus, .filter-input:focus, .search-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

.filter-input {
    grid-column: 1 / -1;
    width: 100%;
    font-family: inherit;
    color: #333;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%23667eea" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"></circle><path d="m21 21-4.35-4.35"></path></svg>');
    background-repeat: no-repeat;
    background-position: 12px center;
    padding-left: 40px;
    box-sizing: border-box;
}

@media (max-width: 480px) {
    .filter-bar {
        grid-template-columns: 1fr;
    }
    
    .filter-select, .filter-input, .update-btn {
        width: 100%;
    }
}

.filter-input::placeholder {
    color: #999;
    opacity: 1;
}

.filter-input:focus::placeholder {
    color: #667eea;
    opacity: 0.7;
}

.update-btn {
    background: #28a745;
    color: white;
    border-color: #28a745;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.update-btn:hover {
    background: #218838;
    border-color: #218838;
    transform: translateY(-1px);
}

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

/* 数据信息显示 */
.data-info {
    background: white;
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
    font-size: 13px;
    color: #666;
}

.data-info .update-btn {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 4px;
}

/* 分类标签样式 */
.category-tabs {
    background: white;
    padding: 10px 15px;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    border-bottom: 1px solid #eee;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.category-tabs::-webkit-scrollbar {
    display: none;
}

.tab-btn {
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 20px;
    background: white;
    color: #666;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s ease;
}

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

.tab-btn:hover:not(.active) {
    background: #f0f0f0;
}

/* 订单列表样式 */
.order-list {
    padding: 15px;
}

.order-card {
    background: white;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border-left: 4px solid #667eea;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 8px;
}

.order-id {
    font-weight: 600;
    color: #667eea;
    font-size: 14px;
}

.copy-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.copy-btn:hover {
    background: #5a6fd8;
}

.copy-btn:active {
    transform: scale(0.95);
}

.order-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    font-size: 14px;
    line-height: 1.5;
}

.order-item {
    display: flex;
    align-items: flex-start;
}

.order-label {
    font-weight: 500;
    color: #666;
    min-width: 75px;
    margin-right: 8px;
}

.order-value {
    color: #333;
    flex: 1;
}

.order-address {
    grid-column: 1 / -1;
    background: #f8f9fa;
    padding: 8px;
    border-radius: 4px;
    margin: 8px 0;
    position: relative;
}

.order-address .copy-address {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: 1px solid #ddd;
    color: #666;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 11px;
    cursor: pointer;
}

.order-salary {
    color: #e74c3c;
    font-weight: 600;
    font-size: 15px;
}

.order-requirements {
    grid-column: 1 / -1;
    background: #fff3cd;
    padding: 8px;
    border-radius: 4px;
    border-left: 3px solid #ffc107;
    margin-top: 8px;
    font-size: 13px;
}

/* 加载状态 */
.loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

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

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.empty-state::before {
    content: '📋';
    display: block;
    font-size: 48px;
    margin-bottom: 16px;
}

/* 响应式设计 */
@media (max-width: 480px) {
    .header {
        padding: 15px 10px;
    }
    
    .header h1 {
        font-size: 20px;
    }
    
    .filter-bar {
        padding: 10px;
        gap: 8px;
    }
    
    .order-content {
        grid-template-columns: 1fr;
        gap: 6px;
    }
    
    .order-card {
        padding: 12px;
    }
    
    .category-tabs {
        padding: 8px 10px;
    }
    
    .tab-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
}

/* 复制成功提示 */
.copy-success {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 12px 20px;
    border-radius: 6px;
    font-size: 14px;
    z-index: 1000;
    animation: fadeInOut 2s ease;
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0; }
    20%, 80% { opacity: 1; }
}

/* 特殊标记 */
.order-tag {
    display: inline-block;
    background: #28a745;
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
    margin-left: 8px;
}

.order-tag.urgent {
    background: #dc3545;
}

.order-tag.high-price {
    background: #fd7e14;
}

.order-tag.summer {
    background: #fd7e14;
}

.order-tag.weekend {
    background: #6f42c1;
}

.order-tag.evening {
    background: #495057;
}

.order-tag.daily {
    background: #20c997;
}

.order-tag.online {
    background: #17a2b8;
}