* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 统一的主背景样式 */
.primary-bg {
    background: linear-gradient(135deg, #8B4513 0%, #A0522D 100%);
    color: #fff;
}

body {
    font-family: "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
    background: #f5f5f5;
    min-height: 100vh;
    color: #333;
    padding-bottom: 60px;
}

@media (min-width: 480px) {
    body {
        max-width: 480px;
        margin: 0 auto;
        box-shadow: 0 0 20px rgba(0,0,0,0.1);
    }
}

@media (min-width: 768px) {
    body {
        max-width: 480px;
        margin: 0 auto;
        box-shadow: 0 0 30px rgba(0,0,0,0.15);
    }
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    position: relative;
}

.top-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.icon-link {
    font-size: 18px;
}

.site-url {
    font-size: 12px;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.site-url small {
    color: #FFD700;
    font-weight: bold;
}

.top-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    flex: 1;
}

.top-center h1 {
    font-size: 20px;
    font-weight: bold;
    color: #fff;
    margin: 0;
    white-space: nowrap;
}

.top-right {
    display: flex;
    gap: 15px;
    flex: 1;
    justify-content: flex-end;
}

.top-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 16px;
    cursor: pointer;
}

.top-icon small {
    font-size: 10px;
    margin-top: 2px;
}

.tab-bar {
    display: flex;
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
}

.tab-item {
    flex: 1;
    text-align: center;
    padding: 12px;
    font-size: 14px;
    color: #666;
    text-decoration: none;
    position: relative;
}

.tab-item.active {
    color: #FF6B35;
}

.tab-item.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 20%;
    right: 20%;
    height: 2px;
    background: #FF6B35;
}

.banner {
    background: linear-gradient(135deg, #8B4513 0%, #A0522D 50%, #CD853F 100%);
    padding: 15px;
    margin: 10px;
    border-radius: 10px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.banner-image {
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.1);
}

.banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="15" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="80" r="20" fill="rgba(255,255,255,0.1)"/></svg>');
    opacity: 0.3;
}

.banner-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}

.banner-logo {
    width: 50px;
    height: 50px;
    background: #8B0000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    color: #FFD700;
    border: 3px solid #FFD700;
}

.banner-text {
    color: #fff;
    font-size: 14px;
}

.banner-domain {
    font-size: 28px;
    font-weight: bold;
    color: #FF0000;
    text-shadow: 1px 1px 2px rgba(255,255,255,0.5);
}

.banner-links {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.banner-links a {
    background: rgba(255,255,255,0.9);
    color: #8B4513;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 12px;
    text-decoration: none;
    font-weight: bold;
}

.container {
    padding: 10px;
}

.result-box {
    background: #fff;
    border-radius: 10px;
    border: 2px solid #FFD700;
    overflow: hidden;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: linear-gradient(90deg, #FFD700 0%, #FFA500 100%);
    color: #8B4513;
    font-weight: bold;
}

.result-icon {
    width: auto;
    height: 24px;
    background: #fff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    padding: 0 10px;
}

.history-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    text-decoration: none;
    color: #8B4513;
    font-size: 12px;
    font-weight: bold;
}

.result-body {
    padding: 15px;
}

.balls-row {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.ball-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.ball-num {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: bold;
    color: #fff;
    margin-bottom: 5px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.ball-1 { background: linear-gradient(145deg, #FF6B6B, #EE5A5A); }
.ball-2 { background: linear-gradient(145deg, #4ECDC4, #3DB9B1); }
.ball-3 { background: linear-gradient(145deg, #45B7D1, #3A9BC4); }
.ball-4 { background: linear-gradient(145deg, #96CEB4, #7BB896); }
.ball-5 { background: linear-gradient(145deg, #FFEAA7, #FDCB6E); color: #333 !important; }
.ball-6 { background: linear-gradient(145deg, #DDA0DD, #DA70D6); }
.ball-7 { background: linear-gradient(145deg, #98D8C8, #7BC8A4); }

.ball-info {
    font-size: 11px;
    color: #666;
    text-align: center;
}

.next-time {
    text-align: center;
    padding: 10px;
    background: #FFF8DC;
    border-radius: 8px;
    font-size: 13px;
    color: #8B4513;
}

.time-icon {
    margin-right: 5px;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    padding: 15px;
    background: #fff;
    margin-top: 10px;
    border-radius: 10px;
}

.feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: transform 0.2s;
}

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

.feature-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 8px;
}

.icon-orange { background: linear-gradient(145deg, #FF9F43, #FF8C42); }
.icon-purple { background: linear-gradient(145deg, #A55EEA, #8B4FDB); }
.icon-red { background: linear-gradient(145deg, #FF6B6B, #EE5A5A); }
.icon-pink { background: linear-gradient(145deg, #FD79A8, #E84393); }
.icon-blue { background: linear-gradient(145deg, #74B9FF, #0984E3); }
.icon-orange2 { background: linear-gradient(145deg, #FDCB6E, #E17055); }
.icon-pink2 { background: linear-gradient(145deg, #FAB1A0, #E17055); }
.icon-yellow { background: linear-gradient(145deg, #FFEAA7, #FDCB6E); }
.icon-purple2 { background: linear-gradient(145deg, #DDA0DD, #DA70D6); }
.icon-pink3 { background: linear-gradient(145deg, #FF7675, #D63031); }

.feature-item span {
    font-size: 12px;
    color: #666;
    text-align: center;
}

.bottom-nav {
    display: flex;
    justify-content: space-around;
    align-items: center;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    background: #fff;
    padding: 8px 0;
    border-top: 1px solid #e0e0e0;
    z-index: 100;
}

@media (min-width: 480px) {
    .bottom-nav {
        left: 50% !important;
        right: auto !important;
        width: 480px !important;
        max-width: 480px !important;
        transform: translateX(-50%) !important;
    }
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    padding: 5px 10px;
    text-decoration: none;
}

.nav-icon {
    font-size: 22px;
    margin-bottom: 3px;
}

.nav-item span {
    font-size: 11px;
    color: #999;
}

.nav-item.active .nav-icon,
.nav-item.active span {
    color: #FF6B35;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ball-item {
    animation: fadeInUp 0.5s ease forwards;
}

.ball-item:nth-child(1) { animation-delay: 0.1s; }
.ball-item:nth-child(2) { animation-delay: 0.2s; }
.ball-item:nth-child(3) { animation-delay: 0.3s; }
.ball-item:nth-child(4) { animation-delay: 0.4s; }
.ball-item:nth-child(5) { animation-delay: 0.5s; }
.ball-item:nth-child(6) { animation-delay: 0.6s; }
.ball-item:nth-child(7) { animation-delay: 0.7s; }

.page-header {
    text-align: center;
    padding: 20px 15px;
    border-radius: 10px;
    margin-bottom: 15px;
}

.page-header h2 {
    font-size: 22px;
    margin-bottom: 5px;
}

.page-desc {
    font-size: 13px;
    color: #FFD700;
}

.market-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.market-card {
    background: #fff;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.market-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.market-tag {
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
    color: #fff;
}

.tag-hot { background: #FF6B6B; }
.tag-recommend { background: #4ECDC4; }
.tag-new { background: #45B7D1; }
.tag-精选 { background: #A55EEA; }

.market-title {
    font-size: 15px;
    font-weight: bold;
    color: #333;
}

.market-card-body {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.market-info {
    display: flex;
    gap: 15px;
    font-size: 12px;
    color: #999;
}

.market-stats {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: #666;
}

.market-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
    border-top: 1px solid #eee;
}

.market-price {
    color: #FF6B35;
    font-weight: bold;
    font-size: 14px;
}

.market-btn {
    background: linear-gradient(135deg, #FF6B35, #FF8C42);
    color: #fff;
    padding: 6px 15px;
    border-radius: 15px;
    font-size: 12px;
    text-decoration: none;
}

.message-tabs {
    display: flex;
    background: #fff;
    border-radius: 10px;
    margin-bottom: 15px;
    overflow: hidden;
}

.msg-tab {
    flex: 1;
    text-align: center;
    padding: 12px;
    font-size: 14px;
    color: #666;
    cursor: pointer;
    border-bottom: 2px solid transparent;
}

.msg-tab.active {
    color: #FF6B35;
    border-bottom-color: #FF6B35;
}

.message-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.message-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    padding: 15px;
    border-radius: 10px;
    position: relative;
}

.message-item.read {
    opacity: 0.7;
}

.msg-icon {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.icon-system { background: #FF6B6B; }
.icon-activity { background: #4ECDC4; }
.icon-reward { background: #FFD700; }
.icon-notice { background: #74B9FF; }

.msg-content {
    flex: 1;
}

.msg-title {
    font-size: 14px;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.msg-desc {
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
}

.msg-time {
    font-size: 11px;
    color: #999;
}

.msg-badge {
    position: absolute;
    top: 10px;
    right: 15px;
    background: #FF6B6B;
    color: #fff;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

.treasure-banner {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.treasure-prize {
    display: flex;
    align-items: center;
    gap: 12px;
}

.prize-icon {
    font-size: 40px;
}

.prize-info {
    display: flex;
    flex-direction: column;
}

.prize-title {
    font-size: 12px;
    color: #8B4513;
}

.prize-value {
    font-size: 20px;
    font-weight: bold;
    color: #8B0000;
}

.treasure-countdown {
    text-align: right;
    font-size: 12px;
    color: #8B4513;
}

.countdown-time {
    display: block;
    font-size: 18px;
    font-weight: bold;
    color: #8B0000;
}

.treasure-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.treasure-card {
    background: #fff;
    border-radius: 10px;
    padding: 15px;
    text-align: center;
}

.treasure-icon {
    font-size: 36px;
    margin-bottom: 8px;
}

.treasure-name {
    font-size: 14px;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.treasure-desc {
    font-size: 11px;
    color: #999;
    margin-bottom: 10px;
}

.treasure-progress {
    margin-bottom: 10px;
}

.progress-bar {
    height: 6px;
    background: #eee;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 5px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #FF6B35, #FFD700);
    border-radius: 3px;
}

.progress-text {
    font-size: 11px;
    color: #666;
}

.treasure-btn {
    background: linear-gradient(135deg, #FF6B35, #FF8C42);
    color: #fff;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 12px;
    display: inline-block;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 15px;
}

.profile-avatar {
    width: 60px;
    height: 60px;
    background: #FFD700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    color: #8B4513;
}

.profile-info {
    flex: 1;
}

.profile-name {
    font-size: 18px;
    font-weight: bold;
    color: #fff;
    margin-bottom: 5px;
}

.profile-level {
    font-size: 12px;
    color: #FFD700;
}

.profile-vip {
    display: flex;
    align-items: center;
    gap: 5px;
    background: rgba(255,255,255,0.2);
    padding: 5px 10px;
    border-radius: 15px;
}

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

.vip-text {
    font-size: 12px;
    color: #FFD700;
    font-weight: bold;
}

.profile-stats {
    display: flex;
    background: #fff;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
}

.stat-item {
    flex: 1;
    text-align: center;
    border-right: 1px solid #eee;
}

.stat-item:last-child {
    border-right: none;
}

.stat-value {
    display: block;
    font-size: 18px;
    font-weight: bold;
    color: #FF6B35;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 12px;
    color: #999;
}

.profile-menu {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
}

.menu-item:last-child {
    border-bottom: none;
}

.menu-icon {
    font-size: 20px;
    margin-right: 12px;
}

.menu-name {
    flex: 1;
    font-size: 14px;
    color: #333;
}

.menu-arrow {
    font-size: 18px;
    color: #ccc;
}

/* 图片展示模块样式 */
.gallery-section {
    margin-top: 10px;
    background: #fff;
    border-radius: 10px;
    padding: 10px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.gallery-item {
    cursor: pointer;
    transition: transform 0.2s;
}

.gallery-item:active {
    transform: scale(0.98);
}

.gallery-image {
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    background: #f0f0f0;
    position: relative;
}

.gallery-image img {
    width: 100%;
    height: auto;
    display: block;
}

.gallery-image img.loading {
    min-height: 200px;
}

.gallery-image img::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #f0f0f0;
    display: block;
}

.gallery-title {
    text-align: center;
    padding: 8px 5px;
    font-size: 13px;
    color: #333;
    font-weight: 500;
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 360px) {
    .feature-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .ball-num {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .banner-domain {
        font-size: 22px;
    }
    
    .treasure-grid {
        grid-template-columns: 1fr;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .gallery-title {
        font-size: 12px;
    }
}
