/* ============================================
   淘享 - 淘宝APP下载品牌网站
   品牌色：主色 #FF6A00 | 辅色 #FF4400 | 浅色 #FFF5F0
   ============================================ */

/* 基础重置 */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #FF6A00;
    --primary-dark: #FF4400;
    --primary-light: #FFF5F0;
    --primary-gradient: linear-gradient(135deg, #FF6A00, #FF4400);
    --text-dark: #333333;
    --text-medium: #666666;
    --text-light: #999999;
    --border-color: #E5E5E5;
    --bg-white: #FFFFFF;
    --bg-light: #FFF8F5;
    --shadow-sm: 0 2px 8px rgba(255, 106, 0, 0.1);
    --shadow-md: 0 4px 16px rgba(255, 106, 0, 0.15);
    --shadow-lg: 0 8px 32px rgba(255, 106, 0, 0.2);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-sans);
    background: #F5F5F5;
    color: var(--text-dark);
    line-height: 1.5;
    overflow-x: hidden;
}

/* App容器 - 模拟手机屏幕 */
.app-container {
    max-width: 450px;
    margin: 0 auto;
    min-height: 100vh;
    background: var(--bg-white);
    position: relative;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.05);
}

/* 顶部状态栏 */
.app-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
    padding: 12px 16px;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-icon {
    width: 32px;
    height: 32px;
}

.logo-text {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: -0.5px;
}

.header-actions {
    display: flex;
    gap: 12px;
}

.share-btn, .search-btn {
    background: none;
    border: none;
    padding: 8px;
    border-radius: 50%;
    cursor: pointer;
    color: var(--text-medium);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
}

.share-btn:active, .search-btn:active {
    background: var(--primary-light);
    color: var(--primary);
}

/* 主要内容区域 */
.app-main {
    padding-bottom: 80px;
}

/* Hero区 */
.hero-section {
    position: relative;
    background: var(--primary-gradient);
    padding: 40px 20px 60px;
    text-align: center;
    overflow: hidden;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
}

.hero-particles {
    position: absolute;
    width: 100%;
    height: 100%;
}

.hero-particles span {
    position: absolute;
    width: 6px;
    height: 6px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    animation: float 6s infinite;
}

.hero-particles span:nth-child(1) { top: 20%; left: 10%; animation-delay: 0s; }
.hero-particles span:nth-child(2) { top: 40%; left: 80%; animation-delay: 1s; }
.hero-particles span:nth-child(3) { top: 60%; left: 30%; animation-delay: 2s; }
.hero-particles span:nth-child(4) { top: 80%; left: 70%; animation-delay: 3s; }
.hero-particles span:nth-child(5) { top: 30%; left: 50%; animation-delay: 4s; }
.hero-particles span:nth-child(6) { top: 70%; left: 20%; animation-delay: 5s; }

@keyframes float {
    0%, 100% { transform: translateY(0) scale(1); opacity: 0.3; }
    50% { transform: translateY(-20px) scale(1.5); opacity: 0.6; }
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-logo {
    width: 180px;
    height: auto;
    margin-bottom: 16px;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.2));
}

.hero-slogan {
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.hero-subtitle {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 24px;
}

.download-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 16px;
}

.download-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-lg);
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    min-height: 48px;
}

.download-btn small {
    display: block;
    font-size: 10px;
    font-weight: 400;
    opacity: 0.8;
}

.ios-btn {
    background: #fff;
    color: var(--primary);
}

.ios-btn:active {
    transform: scale(0.95);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.android-btn {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.android-btn:active {
    transform: scale(0.95);
    background: rgba(255, 255, 255, 0.3);
}

.version-info {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}

/* 特色功能 */
.features-section {
    padding: 40px 16px;
    background: var(--bg-white);
}

.section-title {
    text-align: center;
    font-size: 22px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 24px;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 40px;
    height: 3px;
    background: var(--primary-gradient);
    margin: 8px auto 0;
    border-radius: 2px;
}

.features-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.feature-card {
    background: var(--bg-light);
    border-radius: var(--radius-md);
    padding: 20px 16px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.feature-card:active {
    transform: scale(0.98);
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.feature-icon {
    width: 56px;
    height: 56px;
    background: var(--bg-white);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    box-shadow: var(--shadow-sm);
}

.feature-card h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 6px;
}

.feature-card p {
    font-size: 12px;
    color: var(--text-light);
    line-height: 1.4;
}

/* 热门推荐 */
.trending-section {
    padding: 40px 16px;
    background: var(--bg-light);
}

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

.trending-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-white);
    border-radius: var(--radius-md);
    padding: 12px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    cursor: pointer;
}

.trending-item:active {
    transform: scale(0.98);
    box-shadow: var(--shadow-md);
}

.trending-item .item-rank {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--primary-gradient);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.trending-item .item-rank.top-1 { background: linear-gradient(135deg, #FFD700, #FF6A00); }
.trending-item .item-rank.top-2 { background: linear-gradient(135deg, #C0C0C0, #999); }
.trending-item .item-rank.top-3 { background: linear-gradient(135deg, #CD7F32, #A0522D); }

.trending-item .item-info {
    flex: 1;
}

.trending-item .item-info h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 2px;
}

.trending-item .item-info p {
    font-size: 12px;
    color: var(--text-light);
}

.trending-item .item-price {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
}

/* 用户评价 */
.reviews-section {
    padding: 40px 16px;
    background: var(--bg-white);
}

.reviews-slider {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.reviews-slider::-webkit-scrollbar {
    display: none;
}

.review-card {
    flex: 0 0 280px;
    background: var(--bg-light);
    border-radius: var(--radius-md);
    padding: 20px;
    scroll-snap-align: start;
}

.review-stars {
    color: #FFD700;
    font-size: 18px;
    margin-bottom: 8px;
    letter-spacing: 2px;
}

.review-text {
    font-size: 14px;
    color: var(--text-medium);
    line-height: 1.6;
    margin-bottom: 12px;
}

.review-author {
    font-size: 12px;
    color: var(--text-light);
    text-align: right;
}

/* 下载区 */
.download-cta {
    padding: 40px 16px;
    background: var(--primary-gradient);
    text-align: center;
    color: #fff;
}

.download-cta h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 8px;
}

.download-cta p {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 24px;
}

.qr-code {
    display: inline-block;
    padding: 16px;
    background: #fff;
    border-radius: var(--radius-md);
}

.qr-code svg {
    display: block;
    margin: 0 auto;
}

.qr-code p {
    font-size: 12px;
    color: var(--text-medium);
    margin-top: 8px;
    margin-bottom: 0;
}

/* 底部导航栏 */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-width: 450px;
    margin: 0 auto;
    background: var(--bg-white);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-around;
    padding: 6px 0;
    padding-bottom: env(safe-area-inset-bottom, 6px);
    z-index: 200;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    text-decoration: none;
    color: var(--text-light);
    font-size: 10px;
    padding: 4px 12px;
    transition: all 0.3s ease;
    min-width: 56px;
    min-height: 44px;
    justify-content: center;
}

.nav-item svg {
    width: 24px;
    height: 24px;
}

.nav-item.active {
    color: var(--primary);
}

.nav-item.active svg {
    fill: var(--primary);
}

.nav-item:active {
    opacity: 0.7;
}

/* 发现页样式 */
.discover-section {
    padding: 16px;
}

.category-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
}

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

.tab {
    flex-shrink: 0;
    padding: 8px 20px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-xl);
    background: var(--bg-white);
    color: var(--text-medium);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 44px;
}

.tab.active {
    background: var(--primary-gradient);
    border-color: var(--primary);
    color: #fff;
}

.tab:active {
    transform: scale(0.95);
}

.discover-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.discover-card {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    cursor: pointer;
}

.discover-card:active {
    transform: scale(0.97);
}

.discover-card .card-image {
    width: 100%;
    height: 160px;
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
}

.discover-card .card-body {
    padding: 12px;
}

.discover-card .card-body h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-dark);
}

.discover-card .card-body p {
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 8px;
}

.discover-card .card-body .card-price {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
}

/* 消息页样式 */
.message-section {
    padding: 16px;
}

.message-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

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

.message-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: var(--bg-light);
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
    cursor: pointer;
}

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

.message-item .msg-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #fff;
}

.message-item .msg-content {
    flex: 1;
}

.message-item .msg-content h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
}

.message-item .msg-content p {
    font-size: 12px;
    color: var(--text-light);
}

.message-item .msg-time {
    font-size: 11px;
    color: var(--text-light);
    white-space: nowrap;
}

/* 个人中心 */
.profile-section {
    padding: 0;
}

.profile-header {
    background: var(--primary-gradient);
    padding: 40px 20px;
    text-align: center;
    color: #fff;
}

.profile-header .avatar {
    position: relative;
    width: 64px;
    height: 64px;
    margin: 0 auto 12px;
}

.profile-header .avatar svg:first-child {
    position: absolute;
    top: 0;
    left: 0;
}

.profile-header .avatar .avatar-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.profile-header h2 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 4px;
}

.profile-header p {
    font-size: 14px;
    opacity: 0.8;
    margin-bottom: 16px;
}

.login-btn {
    padding: 10px 32px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: var(--radius-xl);
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 44px;
}

.login-btn:active {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(0.95);
}

.profile-menu {
    padding: 16px;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 12px;
    border-bottom: 1px solid var(--border-color);
    text-decoration: none;
    color: var(--text-dark);
    transition: all 0.3s ease;
    min-height: 44px;
}

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

.menu-item:active {
    background: var(--bg-light);
}

.menu-item span {
    flex: 1;
    font-size: 15px;
}

.menu-item svg:last-child {
    margin-left: auto;
}

/* 加载动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.feature-card, .trending-item, .discover-card, .message-item {
    animation: fadeInUp 0.5s ease forwards;
}

.feature-card:nth-child(2) { animation-delay: 0.1s; }
.feature-card:nth-child(3) { animation-delay: 0.2s; }
.feature-card:nth-child(4) { animation-delay: 0.3s; }

/* 响应式 */
@media (min-width: 451px) {
    body {
        background: #eee;
        padding: 20px 0;
    }
}

@media (max-width: 450px) {
    .app-container {
        max-width: 100%;
        box-shadow: none;
    }
    
    .hero-section {
        padding: 30px 16px 50px;
    }
    
    .hero-slogan {
        font-size: 24px;
    }
    
    .download-buttons {
        flex-direction: column;
        gap: 10px;
        padding: 0 20px;
    }
    
    .download-btn {
        justify-content: center;
    }
    
    .features-grid {
        gap: 10px;
    }
    
    .feature-card {
        padding: 16px 12px;
    }
    
    .discover-grid {
        gap: 10px;
    }
}

/* 暗色模式支持 */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-white: #1A1A1A;
        --bg-light: #2A2A2A;
        --text-dark: #F5F5F5;
        --text-medium: #BBBBBB;
        --text-light: #888888;
        --border-color: #333333;
    }
    
    .app-container {
        background: #1A1A1A;
    }
    
    .app-header {
        background: #1A1A1A;
    }
    
    .feature-card {
        background: #2A2A2A;
    }
    
    .feature-icon {
        background: #333;
    }
    
    .trending-section {
        background: #222;
    }
    
    .trending-item {
        background: #2A2A2A;
    }
    
    .review-card {
        background: #2A2A2A;
    }
    
    .discover-card {
        background: #2A2A2A;
    }
    
    .message-item {
        background: #2A2A2A;
    }
    
    .tab {
        background: #2A2A2A;
        border-color: #444;
        color: var(--text-medium);
    }
    
    .tab.active {
        background: var(--primary-gradient);
        border-color: var(--primary);
        color: #fff;
    }
}