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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f2f2f2;
    max-width: 768px;
    margin: 0 auto;
    padding: 0;
    padding-bottom: 20px;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* 头部样式 */
.header {
    background-color: #fff;
    box-shadow: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    margin-bottom: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: none;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 40px;
    margin-right: 10px;
}

.logo span {
    font-size: 14px;
    color: #666;
}

/* 顶部滚动公告样式 */
.header-notice {
    margin: 0 0 0 0 !important;
    border-radius: 4px !important;
    box-shadow: none !important;
    padding: 8px 12px !important;
    background-color: #f0f8f0 !important;
}

/* 导航样式调整 */
.nav {
    width: 100%;
    background-color: #fff;
    padding: 8px 0;
}

.nav ul {
    display: flex;
    padding: 0;
    margin: 0;
    justify-content: space-between;
}

.nav li {
    margin: 0;
    flex: 1;
    text-align: center;
}

.nav li a {
    display: block;
    padding: 6px 2px;
    color: #333;
    border-radius: 0;
    font-weight: normal;
    transition: all 0.3s;
    font-size: 12px;
}

.nav li.active a, .nav li a:hover {
    background-color: #99e066;
    color: #333;
    border-radius: 30px;
}

/* 横幅样式 */
.banner {
    width: 100%;
    margin-bottom: 20px;
    overflow: hidden;
}

.banner img {
    width: 100%;
    max-height: 300px;
    object-fit: cover;
}

/* 分类标题样式 */
.category-banner {
    background-color: #4CAF50;
    color: white;
    text-align: center;
    padding: 30px 0;
    margin-bottom: 20px;
}

.category-banner h1 {
    font-size: 2em;
}

/* 内容区域 */
.section-title {
    display: flex;
    align-items: center;
    margin-bottom: 0;
    padding: 15px;
    border-bottom: none;
    color: white;
}

.section-title img {
    width: 24px;
    height: 24px;
    margin-right: 10px;
}

.section-title h2 {
    font-size: 18px;
    font-weight: bold;
    color: white;
}

.section-title span {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    margin-left: 10px;
    text-transform: uppercase;
}

/* 应用网格 */
.app-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
    padding: 12px;
    margin-bottom: 0;
    background-color: #ffffff;
}

.app-grid-large {
    grid-template-columns: repeat(5, 1fr);
}

.app-item {
    background-color: #fff;
    border-radius: 0;
    box-shadow: none;
    padding: 10px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.2s ease;
    text-align: center;
    position: relative;
    overflow: hidden;
    margin-bottom: 0;
}

.app-item:hover {
    transform: none;
    box-shadow: none;
    background-color: #f7f7f7;
}

.app-icon {
    text-align: center;
    margin-bottom: 6px;
    position: relative;
    width: 100%;
    padding: 0 5%;
}

.app-icon img {
    width: 90%;
    height: auto;
    aspect-ratio: 1 / 1;
    border-radius: 8px;
    box-shadow: none;
    object-fit: cover;
}

.app-info {
    /*margin-bottom: 5px;*/
    flex-grow: 1;
    /*width: 100%;*/
}

.app-info h3 {
    font-size: 13px;
    margin-bottom: 0;
    padding: 0 5px;
    color: #333;
    font-weight: normal;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
}

.app-button {
    background-color: #f5f5f5;
    color: #666;
    text-align: center;
    padding: 8px 0;
    border-radius: 30px;
    font-weight: normal;
    font-size: 14px;
    margin-top: 5px;
    box-shadow: none;
    transition: all 0.2s ease;
    width: 80%;
}

.app-button:hover {
    background-color: #e0e0e0;
    box-shadow: none;
}

/* 添加角标样式 */
.app-tag {
    position: absolute;
    top: 0;
    right: 5%;
    background-color: #ff5722;
    color: white;
    font-size: 10px;
    padding: 2px 5px;
    border-radius: 0 0 0 6px;
    z-index: 2;
}

.more-item {
    display: flex;
    align-items: center;
    justify-content: center;
}

.more-button {
    background-color: #ececec;
    color: #333;
    padding: 6px 20px;
    border-radius: 20px;
    border: none;
    transition: all 0.2s;
    font-size: 12px;
}

.more-button:hover {
    background-color: #e0e0e0;
}

/* 无数据 */
.no-data {
    grid-column: 1 / -1;
    text-align: center;
    padding: 30px;
    color: #888;
    font-size: 14px;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

/* 底部样式 */
.footer {
    background-color: #333;
    color: #fff;
    text-align: center;
    padding: 20px;
    margin-top: 30px;
}

.footer p {
    font-size: 14px;
}

/* 分类和容器 */
.recommend-section, 
.category-section {
    margin-bottom: 15px;
    background-color: #ffffff;
    border-radius: 8px;
    margin: 15px 5px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.app-container, 
.social-container,
.personal-container, 
.shop-container {
    padding: 0;
    background-color: #f2f2f2;
    margin-bottom: 20px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
    }
    
    .nav {
        margin-top: 0;
        width: 100%;
    }
    
    .nav li a {
        font-size: 12px;
        padding: 6px 2px;
    }
    
    .app-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 8px;
        padding: 8px;
    }
    
    .app-icon img {
        width: 40px;
        height: 40px;
    }
    
    .app-info h3 {
        font-size: 12px;
    }
    
    .app-button {
        font-size: 12px;
        padding: 4px 0;
    }
}

@media (max-width: 480px) {
    .app-grid {
        padding: 0 10px;
    }
    
    .app-item {
        padding: 8px;
    }
}

/* 调整图片占位符样式 */
img[src*="default-icon.png"],
img[src*="logo.png"],
img[src*="banner.jpg"],
img[src*="play-icon.png"] {
    background-color: #e9e9e9;
    object-fit: cover;
}

/* 添加新的滚动公告样式 */
.scrolling-notice {
    background-color: #f0fdf0;
    padding: 10px 10px;
    border-radius: 50px;
    margin: 10px;
    display: flex;
    align-items: center;
    box-shadow: none;
    position: relative;
}

.notice-icon {
    margin-right: 10px;
    color: #4CAF50;
    display: flex;
    align-items: center;
}

.notice-icon img, .notice-icon svg {
    width: 20px;
    height: 20px;
}

.notice-content {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 14px;
    color: #666;
}

.marquee {
    overflow: hidden;
    width: 100%;
}

.marquee p {
    display: inline-block;
    animation: marquee 15s linear infinite;
    padding-left: 100%;
    margin: 0;
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

/* Logo 占位符 */
.logo img[src*="logo.png"] {
    width: 100px;
    height: 40px;
    background-color: #ddd;
}

/* 横幅占位符 */
.banner img[src*="banner.jpg"] {
    width: 100%;
    height: 150px;
    background-color: #ddd;
}

/* 图标占位符 */
.app-icon img[src*="default-icon.png"],
.social-icon img[src*="default-icon.png"],
.personal-icon img[src*="default-icon.png"],
.shop-icon img[src*="default-icon.png"] {
    background-color: #ddd;
}

/* 应用信息描述 */
.app-desc {
    color: #777;
    font-size: 12px;
    line-height: 1.4;
    margin: 5px 0 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 34px;
}

/* 添加推荐部分背景图 */
.recommend-section .section-title {
    background-color: #673ab7;
    background-image: linear-gradient(90deg, #673ab7, #9c27b0);
    position: relative;
    padding-left: 70px;
}

.recommend-section .section-title::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M0 0h24v24H0z' fill='none'/%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 14.5v-9l6 4.5-6 4.5z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

.recommend-section .section-title img,
.category-section .section-title img {
    display: none;
}

/* 分类标题样式 */
.category-section .section-title {
    background-color: #fff;
    color: #333;
    padding: 12px 15px;
}

/* 新增推荐横幅样式 */
.recommend-banner {
    display: block;
    width: 100%;
    height: auto;
    overflow: hidden;
}

.recommend-banner img {
    width: 100%;
    height: auto;
    display: block;
} 



 /* 轮播图样式 */
.swiper-container {
    /*width: 100%;*/
    /*height: 250px;*/
    /*padding: 0 ;*/
    height: 200px;
    margin: 0 20px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.swiper-slide {
    position: relative;
    background: #fff;
}

.swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slide-caption {
    position: absolute;
    bottom: 20px;
    left: 20px;
    color: white;
    font-size: 20px;
    font-weight: bold;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
    padding: 8px 15px;
    background: rgba(0,0,0,0.4);
    border-radius: 4px;
}

.swiper-pagination-bullet {
    background: #fff !important;
    opacity: 0.6;
}

.swiper-pagination-bullet-active {
    background: #ff5722 !important;
    opacity: 1;
}

.swiper-button-prev,
.swiper-button-next {
    color: #fff !important;
    background: rgba(0,0,0,0.3);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: all 0.3s;
}

.swiper-button-prev:hover,
.swiper-button-next:hover {
    background: rgba(0,0,0,0.6);
}