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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    width: 100%;
    max-width: 400px; /* 与home页面相同的固定宽度 */
    margin: 0 auto;
    background-color: #fff;
    min-height: 100vh;
    padding-bottom: 60px; /* 为底部导航留出空间 */
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

/* Header 样式 */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background-color: #000;
    color: #fff;
    font-size: 12px;
}

.header-left {
    display: flex;
    align-items: center;
}

.header-right {
    display: flex;
    gap: 15px;
}

/* App Bar 样式 */
.app-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.app-bar-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.home-link {
    text-decoration: none;
    color: white;
    display: flex;
    align-items: center;
}

.app-logo {
    font-size: 24px;
    background: rgba(255, 255, 255, 0.2);
    padding: 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.home-link:hover .app-logo {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.app-title {
    font-size: 18px;
    font-weight: bold;
}

.app-subtitle {
    font-size: 12px;
    opacity: 0.8;
}

.vip-button {
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    border: none;
    padding: 8px 15px;
    border-radius: 20px;
    color: #333;
    font-weight: bold;
    font-size: 12px;
    cursor: pointer;
}

/* 广告轮播样式 */
.ad-carousel {
    position: relative;
    height: 200px;
    overflow: hidden;
    margin: 0 15px;
    border-radius: 12px;
    margin-top: 15px;
}

.ad-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.ad-slide.active {
    opacity: 1;
}

.ad-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

.ad-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    padding: 15px;
    border-radius: 0 0 12px 12px;
}

.ad-indicators {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
}

.indicator.active {
    background: white;
}

/* 搜索框样式 */
.search-bar {
    display: flex;
    align-items: center;
    background: white;
    border-radius: 25px;
    padding: 12px 15px;
    margin: 20px 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e0e0;
}

.search-bar i {
    color: #999;
    margin-right: 10px;
}

.search-bar input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 16px;
    background: transparent;
}

.search-bar input::placeholder {
    color: #999;
}

.search-button {
    background: #667eea;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 15px;
    font-size: 14px;
    cursor: pointer;
    margin-left: 10px;
}

/* 分类区域样式 */
.category-section {
    padding: 0 15px;
}

.section-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
    color: #333;
}

.category-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 分组标题样式 */
.category-group-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 0;
    border-bottom: 2px solid #667eea;
    margin-bottom: 10px;
}

.group-title {
    font-size: 20px;
    font-weight: bold;
    color: #333;
}

.group-icon {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
}

.group-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 子分类容器样式 */
.subcategory-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.category-item {
    background: white;
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #f0f0f0;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

.category-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.category-icon {
    width: 50px;
    height: 50px;
    margin: 0 auto 10px;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
}

.category-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-name {
    font-size: 12px;
    color: #333;
    font-weight: 500;
    line-height: 1.3;
}

/* 底部导航样式 */
.bottom-nav {
    display: flex;
    justify-content: space-around;
    padding: 10px 0;
    border-top: 1px solid #e0e0e0;
    background-color: #fff;
    position: sticky;
    bottom: 0;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    z-index: 1000;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #999;
    font-size: 10px;
    padding: 5px;
    transition: color 0.2s;
}

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

.nav-item i {
    font-size: 20px;
    margin-bottom: 2px;
}

/* 移除响应式设计，使用固定布局 */