/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #e8eef5 100%);
    color: #333333;
    min-height: 100vh;
    overflow-x: hidden;
}

.app-container {
    max-width: 750px;
    margin: 0 auto;
    min-height: 100vh;
    padding-bottom: 70px;
    position: relative;
}

/* 页面切换 */
.page {
    display: none;
    padding: 15px;
    animation: fadeIn 0.3s ease;
}

.page.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Banner轮播 */
.banner-container {
    position: relative;
    width: 100%;
    height: 180px;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.banner-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

.banner-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
    cursor: pointer;
}

.banner-slide.active {
    opacity: 1;
    z-index: 1;
}

.banner-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.banner-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 2;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
}

.dot.active {
    background: #00d9ff;
    box-shadow: 0 0 10px #00d9ff;
    width: 20px;
    border-radius: 4px;
}

/* 公告栏 */
.notice-bar {
    display: flex;
    align-items: center;
    background: #EEF0FA;
    border-radius: 25px;
    padding: 10px 15px;
    margin-bottom: 20px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.notice-icon {
    font-size: 18px;
    margin-right: 10px;
    flex-shrink: 0;
}

.notice-content {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.notice-wrapper {
    display: flex;
    animation: scroll 15s linear infinite;
    white-space: nowrap;
}

.notice-text {
    padding-right: 100px;
    color: #6478b1;
    font-size: 16px;
}

@keyframes scroll {
    0% {
        transform: translateX(100%);
    }
    100% {
        transform: translateX(-100%);
    }
}

/* 区块标题 */
.section-title {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: bold;
}

.title-icon {
    margin-right: 8px;
    font-size: 20px;
}

/* 游戏列表 */
.games-section {
    margin-bottom: 20px;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.game-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 12px;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.06);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.game-card:active {
    transform: scale(0.95);
}

/* 官方标签 */
.official-badge {
    position: absolute;
    top: 8px;
    right: -20px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ff8e53 100%);
    color: white;
    font-size: 10px;
    padding: 2px 25px;
    transform: rotate(45deg);
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.4);
}

.game-icon {
    width: 60px;
    height: 60px;
    margin: 15px auto 10px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.game-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.game-title {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.game-desc {
    font-size: 12px;
    color: #0a68f5;
    margin-bottom: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.game-btn {
    width: 100%;
    padding: 6px 0;
    background: linear-gradient(135deg, #00d9ff 0%, #00a8ff 100%);
    border: none;
    border-radius: 15px;
    color: white;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 217, 255, 0.3);
}

.game-btn:active {
    transform: scale(0.95);
    box-shadow: 0 1px 4px rgba(0, 217, 255, 0.3);
}

/* 客服页 */
#page-service {
    padding-top: 30px;
}

.service-header {
    text-align: center;
    margin-bottom: 30px;
}

.service-icon {
    font-size: 60px;
    margin-bottom: 15px;
}

.service-header h2 {
    font-size: 24px;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #00d9ff 0%, #00a8ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.service-header p {
    color: #888;
    font-size: 14px;
}

.contact-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-item {
    display: flex;
    align-items: center;
    background: #ffffff;
    border-radius: 12px;
    padding: 15px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.contact-item:active {
    transform: scale(0.98);
    background: #f8f9fa;
}

.contact-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    margin-right: 15px;
    flex-shrink: 0;
}

.qq-icon {
    background: linear-gradient(135deg, #12b7f5 0%, #0099ff 100%);
}

.wechat-icon {
    background: linear-gradient(135deg, #2dc100 0%, #1aad19 100%);
}

.phone-icon {
    background: linear-gradient(135deg, #ff6b6b 0%, #ff4757 100%);
}

.contact-info {
    flex: 1;
}

.contact-label {
    font-size: 12px;
    color: #888;
    margin-bottom: 5px;
}

.contact-value {
    font-size: 16px;
    font-weight: bold;
}

.contact-action {
    padding: 8px 16px;
    background: linear-gradient(135deg, #00d9ff 0%, #00a8ff 100%);
    border-radius: 20px;
    font-size: 13px;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(0, 217, 255, 0.3);
}

.empty-tip {
    text-align: center;
    color: #888;
    font-size: 14px;
    padding: 40px 20px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 12px;
    border: 1px dashed rgba(0, 0, 0, 0.15);
}

/* 工具页 */
.tools-section {
    margin-bottom: 20px;
}

.tools-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.tool-card {
    display: flex;
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.06);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.tool-card:active {
    transform: scale(0.98);
}

.tool-image {
    width: 100px;
    height: 100px;
    flex-shrink: 0;
    overflow: hidden;
}

.tool-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tool-info {
    flex: 1;
    padding: 12px 15px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.tool-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 8px;
}

.tool-desc {
    font-size: 13px;
    color: #888;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 底部导航 */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-width: 750px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-around;
    padding: 10px 0;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.nav-item {
    flex: 1;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 5px 0;
}

.nav-item.active .nav-icon {
    transform: scale(1.2);
}

.nav-item.active span {
    color: #00d9ff;
}

.nav-icon {
    font-size: 22px;
    margin-bottom: 3px;
    transition: all 0.3s ease;
}

.nav-item span {
    font-size: 12px;
    color: #888;
    display: block;
    transition: color 0.3s ease;
}

/* 提示框 */
.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(51, 51, 51, 0.9);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 2000;
    animation: toastFade 2s ease forwards;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

@keyframes toastFade {
    0%, 80% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        display: none;
    }
}

/* 响应式 */
@media (max-width: 375px) {
    .games-grid {
        gap: 8px;
    }
    
    .game-icon {
        width: 50px;
        height: 50px;
    }
    
    .game-title {
        font-size: 12px;
    }
    
    .game-desc {
        font-size: 10px;
    }
    
    .game-btn {
        font-size: 11px;
        padding: 5px 0;
    }
}
