/* 公共样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f5f5f5;
    padding-bottom: 60px;
}

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

.header h1 {
    font-size: 22px;
    font-weight: 600;
}

.header p {
    font-size: 14px;
    opacity: 0.9;
    margin-top: 5px;
}

/* 分类导航栏 */
.category-nav {
    background: white;
    padding: 12px 0;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.category-list {
    display: inline-flex;
    padding: 0 15px;
    gap: 10px;
}

.category-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 16px;
    background: #f5f5f5;
    border-radius: 20px;
    font-size: 14px;
    color: #666;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
    flex-shrink: 0;
    border: 2px solid transparent;
}

.category-item:active {
    transform: scale(0.95);
}

.category-item.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 600;
    box-shadow: 0 3px 8px rgba(102, 126, 234, 0.3);
}

.category-icon {
    font-size: 16px;
}

/* 底部导航 */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 8px 0;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.08);
    z-index: 1000;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 5px 12px;
    text-decoration: none;
    color: #999;
    transition: all 0.3s;
    border-radius: 8px;
}

.nav-item.active {
    color: #667eea;
}

.nav-icon {
    font-size: 20px;
    transition: all 0.3s;
}

.nav-item.active .nav-icon {
    transform: scale(1.2);
}

.nav-text {
    font-size: 11px;
    font-weight: 500;
}

/* 加载动画 */
.loading {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto 10px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.empty {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-icon {
    font-size: 60px;
    margin-bottom: 10px;
    opacity: 0.5;
}

.error {
    text-align: center;
    padding: 40px 20px;
    color: #ff4d4f;
}

.error-icon {
    font-size: 50px;
    margin-bottom: 10px;
}

.retry-btn {
    margin-top: 20px;
    padding: 10px 30px;
    background: #1890ff;
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
}

/* Toast提示框 */
.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 12px 24px;
    border-radius: 20px;
    font-size: 14px;
    z-index: 9999;
    opacity: 0;
    transition: all 0.3s;
}

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

.toast-success {
    background: linear-gradient(135deg, #52c41a 0%, #73d13d 100%);
}

.toast-error {
    background: linear-gradient(135deg, #ff4d4f 0%, #ff7875 100%);
}
