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

:root {
    --primary-color: #00C285;
    --primary-light: #E8FFF5;
    --primary-dark: #00A870;
    --primary-gradient: linear-gradient(135deg, #00D995 0%, #00A870 100%);
    
    --red: #FF4D4F;
    --red-light: #FFF0F0;
    --orange: #FF6B35;
    --orange-light: #FFF3ED;
    --yellow: #FFB800;
    
    --text: #1A1A1A;
    --text-secondary: #666666;
    --text-light: #999999;
    --text-lighter: #CCCCCC;
    --border: #EEEEEE;
    --border-light: #F5F5F5;
    --bg: #F5F7FA;
    --white: #FFFFFF;
    
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    --shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --shadow-hover: 0 8px 24px rgba(0, 194, 133, 0.18);
    
    --radius: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;
    
    --left-w: 200px;
    --right-w: 280px;
    --gap: 16px;
    --header-h: 64px;
}

[data-theme="orange"] {
    --primary-color: #FF6B35;
    --primary-light: #FFF3ED;
    --primary-dark: #E55A2B;
    --primary-gradient: linear-gradient(135deg, #FF8C5A 0%, #E55A2B 100%);
    --shadow-hover: 0 8px 24px rgba(255, 107, 53, 0.18);
}
[data-theme="blue"] {
    --primary-color: #1890FF;
    --primary-light: #E6F4FF;
    --primary-dark: #0D76D6;
    --primary-gradient: linear-gradient(135deg, #40A9FF 0%, #096DD9 100%);
    --shadow-hover: 0 8px 24px rgba(24, 144, 255, 0.18);
}
[data-theme="purple"] {
    --primary-color: #722ED1;
    --primary-light: #F9F0FF;
    --primary-dark: #531DAB;
    --primary-gradient: linear-gradient(135deg, #9254DE 0%, #531DAB 100%);
    --shadow-hover: 0 8px 24px rgba(114, 46, 209, 0.18);
}
[data-theme="pink"] {
    --primary-color: #EB2F96;
    --primary-light: #FFF0F6;
    --primary-dark: #C41D7F;
    --primary-gradient: linear-gradient(135deg, #F759AB 0%, #C41D7F 100%);
    --shadow-hover: 0 8px 24px rgba(235, 47, 150, 0.18);
}
[data-theme="dark"] {
    --primary-color: #1F1F1F;
    --primary-light: #F0F0F0;
    --primary-dark: #000000;
    --primary-gradient: linear-gradient(135deg, #404040 0%, #000000 100%);
    --shadow-hover: 0 8px 24px rgba(31, 31, 31, 0.25);
}

html { scroll-behavior: smooth; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    padding-top: var(--header-h);
}
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; outline: none; background: transparent; font-size: inherit; }
input { font-family: inherit; outline: none; border: none; }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--text-lighter); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary-color); }

/* Header */
.header {
    position: fixed; top: 0; left: 0; right: 0; height: var(--header-h);
    background: rgba(255, 255, 255, 0.98); backdrop-filter: blur(12px);
    z-index: 1000; box-shadow: 0 1px 8px rgba(0,0,0,0.04);
}
.header-container {
    height: 100%; max-width: 1440px; margin: 0 auto; padding: 0 20px;
    display: flex; align-items: center; gap: 20px;
}
@media (min-width: 1600px) { .header-container { max-width: 1600px; } }

.header-left { display: flex; align-items: center; gap: 24px; flex-shrink: 0; }
.logo { display: flex; align-items: center; gap: 8px; cursor: pointer; transition: transform 0.2s; }
.logo:hover { transform: scale(1.02); }
.logo-svg { width: 36px; height: 36px; flex-shrink: 0; filter: drop-shadow(0 2px 8px rgba(0,217,149,0.3)); }
.logo-icon { font-size: 28px; }
.logo-text {
    font-size: 22px; font-weight: 800; letter-spacing: -0.5px;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.logo-badge {
    font-size: 9px; font-weight: 700; padding: 2px 6px; border-radius: 6px;
    background: linear-gradient(135deg, #fef3c7, #fde68a); color: #b45309;
    letter-spacing: 0.5px; margin-left: 2px;
}
.main-nav { display: flex; gap: 4px; }
.nav-item {
    padding: 6px 14px; font-size: 15px; color: var(--text-secondary);
    border-radius: var(--radius); cursor: pointer; transition: all 0.2s;
    font-weight: 500; position: relative;
}
.nav-item:hover { color: var(--primary-color); background: var(--primary-light); }
.nav-item.active { color: var(--primary-color); font-weight: 600; }
.nav-item.active::after {
    content: ''; position: absolute; bottom: -4px; left: 50%; transform: translateX(-50%);
    width: 24px; height: 3px; background: var(--primary-gradient); border-radius: 2px;
}

.header-center { flex: 1; max-width: 520px; }
.search-box {
    display: flex; align-items: center; height: 40px; background: var(--bg);
    border-radius: var(--radius-full); padding: 0 4px 0 16px; border: 2px solid transparent;
    transition: all 0.2s;
}
.search-box:focus-within { border-color: var(--primary-color); background: var(--white); }
.search-input { flex: 1; height: 100%; font-size: 14px; background: transparent; }
.search-input::placeholder { color: var(--text-light); }
.search-btn {
    height: 32px; padding: 0 18px; background: var(--primary-gradient); color: white;
    border-radius: var(--radius-full); font-size: 13px; font-weight: 600;
    display: flex; align-items: center; gap: 4px; transition: all 0.2s;
}
.search-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,0.12); }

.header-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.btn-ai {
    display: flex; align-items: center; gap: 6px; padding: 7px 14px;
    background: linear-gradient(135deg, #667EEA, #764BA2); color: white;
    border-radius: var(--radius-full); font-size: 13px; font-weight: 600;
    transition: all 0.2s;
}
.btn-ai:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(102,126,234,0.35); }

.theme-wrap { position: relative; }
.theme-btn {
    padding: 7px 14px; background: var(--bg); border-radius: var(--radius-full);
    font-size: 13px; font-weight: 500; color: var(--text-secondary);
    display: flex; align-items: center; gap: 4px; transition: all 0.2s;
}
.theme-btn:hover { background: var(--primary-light); color: var(--primary-color); }
.theme-panel {
    position: absolute; top: calc(100% + 8px); right: 0; width: 240px;
    background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
    padding: 14px; z-index: 200;
    animation: fadeDown 0.18s ease;
}
@keyframes fadeDown { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }
.theme-panel-title { font-size: 13px; font-weight: 600; margin-bottom: 12px; color: var(--text); }
.theme-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.theme-color-item {
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    cursor: pointer; padding: 8px 4px; border-radius: var(--radius); transition: all 0.2s;
}
.theme-color-item:hover { background: var(--bg); }
.theme-color-item.active { background: var(--bg); }
.theme-dot {
    width: 32px; height: 32px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}
.theme-dot .check { color: white; font-size: 14px; font-weight: 700; }
.theme-name { font-size: 11px; color: var(--text-secondary); }

.user-area {
    display: flex; align-items: center; gap: 8px; padding: 6px 12px;
    background: var(--bg); border-radius: var(--radius-full); cursor: pointer;
    transition: all 0.2s;
}
.user-area:hover { background: var(--primary-light); color: var(--primary-color); }
.avatar-circle {
    width: 28px; height: 28px; border-radius: 50%; background: var(--primary-gradient);
    color: white; display: flex; align-items: center; justify-content: center;
}
.user-text { font-size: 13px; font-weight: 500; color: var(--text-secondary); }
.user-area:hover .user-text { color: var(--primary-color); }

/* Main Layout */
.main-wrapper {
    max-width: 1440px; margin: 0 auto; padding: 20px;
    display: flex; gap: var(--gap); align-items: flex-start;
}
@media (min-width: 1600px) { .main-wrapper { max-width: 1600px; } }

.left-sidebar {
    width: var(--left-w); flex-shrink: 0;
    position: sticky; top: calc(var(--header-h) + 16px);
    max-height: calc(100vh - var(--header-h) - 32px); overflow-y: auto;
}
.sidebar-card {
    background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow);
    margin-bottom: 12px; overflow: hidden;
}
.sidebar-title {
    display: flex; align-items: center; gap: 6px; padding: 14px 16px 10px;
    font-size: 14px; font-weight: 700; border-bottom: 1px solid var(--border-light);
}
.nav-list, .category-list { padding: 6px 0; }
.nav-list-item, .cat-item {
    display: flex; align-items: center; gap: 10px; padding: 9px 16px;
    font-size: 13px; color: var(--text-secondary); cursor: pointer;
    transition: all 0.2s; border-left: 3px solid transparent;
}
.nav-list-item:hover, .cat-item:hover { background: var(--primary-light); color: var(--primary-color); }
.nav-list-item.active, .cat-item.active {
    background: var(--primary-light); color: var(--primary-color);
    font-weight: 600; border-left-color: var(--primary-color);
}
.cat-item.active .cat-arrow { color: var(--primary-color); font-weight: 700; }
.cat-arrow { color: var(--text-lighter); font-size: 16px; margin-left: auto; transition: transform 0.2s; }
.cat-item:hover .cat-arrow { transform: translateX(2px); }
.nav-icon, .cat-icon { font-size: 18px; width: 22px; text-align: center; }

.sidebar-promo {
    background: linear-gradient(135deg, #667EEA, #764BA2);
    border-radius: var(--radius-lg); padding: 20px 16px; text-align: center; color: white;
    position: relative; overflow: hidden;
}
.promo-glow { position: absolute; inset: 0; background: radial-gradient(circle at 50% 0%, rgba(255,255,255,0.2), transparent 60%); pointer-events: none; }
.promo-icon { font-size: 36px; margin-bottom: 8px; }
.promo-title { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.promo-desc { font-size: 12px; opacity: 0.85; margin-bottom: 12px; }
.promo-btn {
    width: 100%; padding: 8px; background: rgba(255,255,255,0.25); color: white;
    border-radius: var(--radius); font-size: 13px; font-weight: 600; transition: all 0.2s;
}
.promo-btn:hover { background: rgba(255,255,255,0.35); }

.main-content { flex: 1; min-width: 0; }

.right-sidebar {
    width: var(--right-w); flex-shrink: 0;
    position: sticky; top: calc(var(--header-h) + 16px);
    max-height: calc(100vh - var(--header-h) - 32px); overflow-y: auto;
    transition: width 0.3s ease;
}
.right-sidebar.collapsed { width: 36px; }
.collapse-btn {
    position: absolute; left: -8px; top: 20px; width: 20px; height: 48px;
    background: var(--white); border-radius: 4px 0 0 4px; box-shadow: -2px 0 8px rgba(0,0,0,0.06);
    font-size: 10px; color: var(--text-light); z-index: 10;
    display: flex; align-items: center; justify-content: center;
}
.collapse-btn:hover { color: var(--primary-color); }

.ai-entry-card {
    display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px;
    background: linear-gradient(135deg, var(--primary-light), #f0f7ff);
    border-radius: var(--radius); margin-top: 8px; transition: all 0.2s;
}
.ai-entry-card:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.ai-entry-icon { font-size: 28px; }
.ai-entry-title { font-size: 14px; font-weight: 600; color: var(--text); }
.ai-entry-desc { font-size: 12px; color: var(--text-light); margin-top: 2px; }

.mini-rank { padding: 8px 0; }
.mini-rank-item {
    display: flex; align-items: center; gap: 8px; padding: 7px 12px;
    font-size: 12px; cursor: pointer; transition: background 0.2s;
}
.mini-rank-item:hover { background: var(--bg); }
.mini-rank-num {
    width: 18px; height: 18px; border-radius: 4px; background: var(--text-lighter);
    color: white; font-size: 11px; font-weight: 700;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.mini-rank-num.top { background: var(--primary-color); }
.mini-rank-title { flex: 1; color: var(--text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-rank-price { color: var(--red); font-weight: 600; }

.notice-list { padding: 8px 12px; }
.notice-item {
    display: flex; align-items: flex-start; gap: 6px; padding: 6px 0;
    font-size: 12px; color: var(--text-secondary);
}
.notice-text { flex: 1; line-height: 1.5; }

.contact-btn {
    width: calc(100% - 24px); margin: 12px; padding: 10px;
    background: var(--primary-light); color: var(--primary-color);
    border-radius: var(--radius); font-size: 13px; font-weight: 600;
    transition: all 0.2s;
}
.contact-btn:hover { background: var(--primary-color); color: white; }

/* Common */
.section { margin-bottom: 20px; }
.section-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 12px;
}
.section-title { font-size: 18px; font-weight: 700; color: var(--text); }
.section-more { font-size: 13px; color: var(--primary-color); cursor: pointer; }
.section-more:hover { text-decoration: underline; }

.page-header {
    display: flex; justify-content: space-between; align-items: center;
    background: var(--white); border-radius: var(--radius-lg); padding: 16px 20px;
    box-shadow: var(--shadow); margin-bottom: 16px;
}
.page-title { font-size: 20px; font-weight: 700; }
.page-header-actions { display: flex; gap: 10px; align-items: center; }

.refresh-btn {
    display: flex; align-items: center; gap: 4px; padding: 6px 14px;
    background: var(--bg); border-radius: var(--radius-full); font-size: 13px;
    color: var(--text-secondary); transition: all 0.2s;
}
.refresh-btn:hover { background: var(--primary-light); color: var(--primary-color); }
.refresh-btn.spinning .refresh-icon,
.refresh-btn.spinning span:first-child {
    display: inline-block; animation: spin 0.8s linear infinite;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* Buttons */
.btn-primary {
    padding: 8px 20px; background: var(--primary-gradient); color: white;
    border-radius: var(--radius); font-weight: 600; font-size: 14px;
    transition: all 0.2s;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: var(--shadow-hover); }
.btn-primary.btn-lg { padding: 12px 32px; font-size: 16px; border-radius: var(--radius-full); }
.btn-outline {
    padding: 8px 20px; background: var(--white); color: var(--primary-color);
    border: 1px solid var(--primary-color); border-radius: var(--radius);
    font-weight: 500; font-size: 14px; transition: all 0.2s;
}
.btn-outline:hover { background: var(--primary-light); }

.buy-btn {
    width: 100%; padding: 8px; background: var(--primary-gradient); color: white;
    border-radius: var(--radius); font-size: 13px; font-weight: 600;
    transition: all 0.2s; margin-top: 8px;
}
.buy-btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-hover); }
.buy-btn-sm {
    padding: 6px 14px; background: var(--primary-gradient); color: white;
    border-radius: var(--radius-full); font-size: 12px; font-weight: 600;
    transition: all 0.2s; margin-left: auto;
}
.buy-btn-sm:hover { transform: translateY(-1px); }

/* Banner */
.banner {
    background: var(--primary-gradient); border-radius: var(--radius-xl);
    padding: 32px; margin-bottom: 16px; color: white; position: relative; overflow: hidden;
}
.banner::before {
    content: ''; position: absolute; right: -40px; top: -40px;
    width: 200px; height: 200px; border-radius: 50%;
    background: rgba(255,255,255,0.1);
}
.banner::after {
    content: ''; position: absolute; right: 60px; bottom: -60px;
    width: 150px; height: 150px; border-radius: 50%;
    background: rgba(255,255,255,0.08);
}
.banner-content { position: relative; z-index: 1; }
.banner-badge {
    display: inline-block; padding: 4px 14px; background: rgba(255,255,255,0.2);
    border-radius: var(--radius-full); font-size: 12px; font-weight: 500; margin-bottom: 12px;
}
.banner-title { font-size: 32px; font-weight: 800; margin-bottom: 8px; }
.banner-desc { font-size: 15px; opacity: 0.9; margin-bottom: 20px; }
.banner-stats { display: flex; align-items: center; gap: 20px; position: relative; z-index: 1; }
.banner-stat { text-align: center; }
.bs-num { font-size: 28px; font-weight: 800; line-height: 1; }
.bs-label { font-size: 12px; opacity: 0.85; margin-top: 4px; }
.bs-divider { width: 1px; height: 32px; background: rgba(255,255,255,0.3); }
.banner-badge .badge-dot { display: inline-block; width: 6px; height: 6px; background: #fff; border-radius: 50%; margin-right: 6px; animation: pulse 1.5s ease infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

/* KingKong */
.kingkong {
    background: var(--white); border-radius: var(--radius-lg); padding: 16px;
    box-shadow: var(--shadow); margin-bottom: 16px;
}
.kk-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.kk-item {
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    padding: 12px 8px; border-radius: var(--radius); cursor: pointer; transition: all 0.2s;
}
.kk-item:hover { background: var(--primary-light); transform: translateY(-2px); }
.kk-icon { width: 48px; height: 48px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 24px; margin: 0 auto 8px; }
.kk-name { font-size: 12px; color: var(--text-secondary); font-weight: 500; }

/* Data Bar */
.data-bar {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px;
}
.data-item {
    background: var(--white); border-radius: var(--radius-lg); padding: 16px;
    text-align: center; box-shadow: var(--shadow);
}
.data-val { font-size: 24px; font-weight: 800; color: var(--primary-color); }
.data-label { font-size: 12px; color: var(--text-light); margin-top: 4px; }

/* Scroll Row */
.scroll-row {
    display: flex; gap: 12px; overflow-x: auto; padding-bottom: 8px;
}
.scroll-row::-webkit-scrollbar { height: 4px; }

.seckill-card {
    flex-shrink: 0; width: 130px; background: var(--white);
    border-radius: var(--radius); padding: 10px; box-shadow: var(--shadow);
    cursor: pointer; transition: all 0.2s;
}
.seckill-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.seckill-img { width: 100%; aspect-ratio: 1; border-radius: var(--radius); object-fit: cover; margin-bottom: 8px; }
.seckill-title {
    font-size: 12px; color: var(--text); line-height: 1.3; height: 32px;
    overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    margin-bottom: 6px;
}
.seckill-price { font-size: 15px; font-weight: 700; color: var(--red); }
.seckill-price-row { display: flex; align-items: baseline; gap: 4px; margin-bottom: 6px; }
.seckill-price-now { font-size: 16px; font-weight: 800; color: var(--red); }
.seckill-price-old { font-size: 11px; color: var(--text-light); text-decoration: line-through; }
.seckill-progress { height: 4px; background: #fee2e2; border-radius: 2px; overflow: hidden; margin: 6px 0 4px; }
.seckill-bar { height: 100%; background: linear-gradient(90deg, #ef4444, #f97316); border-radius: 2px; transition: width 0.3s; }
.seckill-tag { font-size: 10px; color: var(--text-light); }

.brand-card {
    flex-shrink: 0; width: 160px; background: var(--white);
    border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow);
    cursor: pointer; transition: all 0.2s; text-align: center; padding-bottom: 12px;
}
.brand-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.brand-img { width: 100%; height: 80px; object-fit: cover; }
.brand-name { font-size: 14px; font-weight: 600; margin-top: 10px; }
.brand-discount { font-size: 12px; color: var(--red); margin-top: 4px; }

/* Goods Grid */
.goods-grid {
    display: grid; gap: var(--gap);
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}
.goods-card {
    background: var(--white); border-radius: var(--radius-lg); overflow: hidden;
    box-shadow: var(--shadow); cursor: pointer; transition: all 0.25s;
}
.goods-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}
.goods-card:hover .goods-img { transform: scale(1.05); }
.goods-img-wrap { position: relative; overflow: hidden; aspect-ratio: 1; }
.goods-img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.3s ease;
}
.platform-tag {
    position: absolute; left: 8px; top: 8px; padding: 2px 8px;
    border-radius: 4px; font-size: 10px; color: white; font-weight: 600;
}
.platform-tag.p-淘宝 { background: #FF5000; }
.platform-tag.p-京东 { background: #E1251B; }
.platform-tag.p-拼多多 { background: #E02E24; }
.platform-tag.p-抖音 { background: #000000; }
.hot-flag {
    position: absolute; left: 8px; bottom: 8px; padding: 2px 8px;
    background: linear-gradient(135deg, #ef4444, #f97316); color: white;
    border-radius: 4px; font-size: 10px; font-weight: 700; z-index: 2;
    animation: hotPulse 1.5s ease infinite;
}
@keyframes hotPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}
.goods-info { padding: 10px 12px 12px; }
.goods-title {
    font-size: 13px; line-height: 1.4; color: var(--text);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden; height: 36px; margin-bottom: 8px;
}
.goods-price-row { margin-bottom: 6px; }
.goods-price { display: flex; align-items: baseline; gap: 6px; }
.price-symbol { font-size: 12px; color: var(--red); font-weight: 600; }
.price-now { font-size: 18px; color: var(--red); font-weight: 700; }
.price-old { font-size: 11px; color: var(--text-light); text-decoration: line-through; }
.goods-meta { display: flex; justify-content: space-between; align-items: center; font-size: 11px; }
.rebate-tag {
    padding: 2px 6px; background: var(--primary-light); color: var(--primary-color);
    border-radius: 4px; font-weight: 600;
}
.sales { color: var(--text-light); }

/* Rank Page */
.filter-bar {
    display: flex; gap: 8px; flex-wrap: wrap;
    background: var(--white); border-radius: var(--radius-lg); padding: 12px 16px;
    box-shadow: var(--shadow); margin-bottom: 16px;
}
.filter-tag {
    padding: 6px 16px; border-radius: var(--radius-full); font-size: 13px;
    color: var(--text-secondary); cursor: pointer; transition: all 0.2s;
    background: var(--bg);
}
.filter-tag:hover { color: var(--primary-color); }
.filter-tag.active { background: var(--primary-color); color: white; font-weight: 600; }

.rank-list {
    background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow); overflow: hidden;
}
.rank-item {
    display: flex; align-items: center; gap: 16px; padding: 16px;
    border-bottom: 1px solid var(--border-light); cursor: pointer; transition: background 0.2s;
}
.rank-item:last-child { border-bottom: none; }
.rank-item:hover { background: var(--bg); }
.rank-num {
    width: 40px; height: 40px; border-radius: var(--radius); flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; font-weight: 800;
}
.rank-num.medal { font-size: 24px; }
.rank-num.normal { background: var(--bg); color: var(--text-light); }
.rank-num.medal { font-size: 28px; background: transparent; }
.ft-icon { margin-right: 4px; }
.rank-img { width: 80px; height: 80px; border-radius: var(--radius); object-fit: cover; flex-shrink: 0; }
.rank-info { flex: 1; min-width: 0; }
.rank-title {
    font-size: 14px; font-weight: 500; line-height: 1.4; margin-bottom: 8px;
    display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}
.rank-meta { display: flex; align-items: center; gap: 12px; font-size: 12px; color: var(--text-light); margin-bottom: 8px; }
.rank-bottom { display: flex; align-items: center; gap: 12px; }
.rank-price-wrap { display: flex; align-items: baseline; }
.rank-price-symbol { font-size: 14px; color: var(--red); font-weight: 600; }
.rank-price { font-size: 20px; font-weight: 800; color: var(--red); }

/* AI Page */
.ai-page { background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 40px; }
.ai-hero { text-align: center; margin-bottom: 40px; }
.ai-big-icon { font-size: 64px; margin-bottom: 16px; }
.ai-title { font-size: 28px; font-weight: 800; margin-bottom: 8px; }
.ai-desc { font-size: 14px; color: var(--text-secondary); margin-bottom: 24px; }
.ai-search-box {
    display: flex; align-items: center; gap: 8px; max-width: 600px; margin: 0 auto 16px;
    background: var(--bg); border-radius: var(--radius-full); padding: 6px 6px 6px 16px;
    border: 2px solid transparent; transition: all 0.2s;
}
.ai-search-box:focus-within { border-color: var(--primary-color); background: var(--white); }
.voice-btn {
    width: 40px; height: 40px; border-radius: 50%; background: var(--white);
    display: flex; align-items: center; justify-content: center; font-size: 20px;
    box-shadow: var(--shadow-sm); cursor: pointer; transition: all 0.2s;
}
.voice-btn:hover { background: var(--primary-light); }
.ai-search-input { flex: 1; height: 40px; font-size: 15px; background: transparent; }
.ai-search-btn {
    height: 40px; padding: 0 28px; background: var(--primary-gradient); color: white;
    border-radius: var(--radius-full); font-size: 15px; font-weight: 600;
}
.hot-searches { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; }
.hot-label { font-size: 13px; color: var(--text-light); }
.hot-word {
    padding: 4px 12px; background: var(--bg); border-radius: var(--radius-full);
    font-size: 12px; color: var(--text-secondary); cursor: pointer; transition: all 0.2s;
}
.hot-word:hover { background: var(--primary-light); color: var(--primary-color); }
.ai-placeholder { text-align: center; padding: 60px 20px; color: var(--text-light); }

/* Order Page */
.order-tabs {
    display: flex; gap: 4px; background: var(--white); border-radius: var(--radius-lg);
    padding: 6px; box-shadow: var(--shadow); margin-bottom: 16px;
}
.order-tab {
    flex: 1; padding: 10px; text-align: center; border-radius: var(--radius);
    font-size: 14px; color: var(--text-secondary); cursor: pointer; transition: all 0.2s; font-weight: 500;
}
.order-tab:hover { color: var(--primary-color); }
.order-tab.active { background: var(--primary-color); color: white; font-weight: 600; }

.order-list { display: flex; flex-direction: column; gap: 12px; }
.order-card {
    background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow);
    overflow: hidden; transition: all 0.2s;
}
.order-card:hover { box-shadow: var(--shadow-md); }
.order-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 16px; background: var(--bg); font-size: 12px; color: var(--text-light);
}
.order-status {
    padding: 3px 10px; border-radius: var(--radius-full); font-size: 12px; font-weight: 600;
}
.order-status.status-待付款 { background: var(--orange-light); color: var(--orange); }
.order-status.status-已付款 { background: #E6F4FF; color: #1890FF; }
.order-status.status-已结算 { background: var(--primary-light); color: var(--primary-color); }
.order-status.status-已失效 { background: var(--bg); color: var(--text-light); }
.order-goods {
    display: flex; align-items: center; gap: 12px; padding: 16px;
}
.order-goods-img { width: 70px; height: 70px; border-radius: var(--radius); object-fit: cover; flex-shrink: 0; }
.order-goods-info { flex: 1; min-width: 0; }
.order-goods-title {
    font-size: 14px; line-height: 1.4; margin-bottom: 6px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.order-goods-meta { font-size: 12px; }
.order-amount-info { text-align: right; flex-shrink: 0; }
.order-price { font-size: 18px; font-weight: 700; color: var(--red); }
.order-rebate { font-size: 12px; color: var(--primary-color); margin-top: 4px; }
.order-footer {
    display: flex; justify-content: flex-end; gap: 8px; padding: 12px 16px;
    border-top: 1px solid var(--border-light);
}

/* Empty State */
.empty-state { text-align: center; padding: 60px 20px; }
.empty-icon { font-size: 64px; margin-bottom: 16px; opacity: 0.5; }
.empty-title { font-size: 16px; color: var(--text-secondary); font-weight: 600; margin-bottom: 6px; }
.empty-desc { font-size: 13px; color: var(--text-light); }

/* Yun Page */
.yun-card { background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow); overflow: hidden; }
.yun-hero {
    background: linear-gradient(135deg, #667EEA, #764BA2); color: white;
    padding: 48px 24px; text-align: center;
}
.yun-icon { font-size: 72px; margin-bottom: 16px; }
.yun-hero h3 { font-size: 28px; font-weight: 800; margin-bottom: 8px; }
.yun-hero p { font-size: 14px; opacity: 0.9; margin-bottom: 24px; }
.yun-features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; padding: 32px; }
.yun-feature { text-align: center; padding: 24px; border-radius: var(--radius); background: var(--bg); }
.feature-icon { font-size: 48px; margin-bottom: 12px; }
.feature-title { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.feature-desc { font-size: 13px; color: var(--text-secondary); }

/* Profile Page */
.profile-card {
    background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow);
    padding: 24px; margin-bottom: 16px;
}
.profile-header-info { display: flex; align-items: center; gap: 20px; }
.big-avatar {
    width: 72px; height: 72px; border-radius: 50%; background: var(--primary-light);
    display: flex; align-items: center; justify-content: center; font-size: 36px;
}
.profile-user-info { flex: 1; }
.profile-name { font-size: 20px; font-weight: 700; margin-bottom: 4px; }
.profile-level { font-size: 13px; color: var(--primary-color); }
.profile-balance { text-align: right; }
.balance-label { font-size: 12px; color: var(--text-light); margin-bottom: 4px; }
.balance-value { font-size: 28px; font-weight: 800; color: var(--red); margin-bottom: 8px; }

.profile-menu-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
    background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 16px;
}
.pm-item {
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    padding: 20px; border-radius: var(--radius); cursor: pointer; transition: all 0.2s;
}
.pm-item:hover { background: var(--primary-light); transform: translateY(-2px); }
.pm-icon { font-size: 32px; }
.pm-item span:last-child { font-size: 13px; color: var(--text-secondary); }

/* Loading Skeleton */
.loading-skeleton { }
.skeleton-banner {
    height: 140px; background: linear-gradient(90deg, var(--border-light) 25%, var(--border) 50%, var(--border-light) 75%);
    background-size: 200% 100%; animation: shimmer 1.5s infinite;
    border-radius: var(--radius-xl); margin-bottom: 16px;
}
.skeleton-grid {
    display: grid; gap: var(--gap);
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}
.skeleton-card {
    aspect-ratio: 3/4; background: linear-gradient(90deg, var(--border-light) 25%, var(--border) 50%, var(--border-light) 75%);
    background-size: 200% 100%; animation: shimmer 1.5s infinite;
    border-radius: var(--radius-lg);
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* Toast */
.toast {
    position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.75); color: white; padding: 12px 24px;
    border-radius: var(--radius); font-size: 14px; z-index: 9999;
    animation: toastIn 0.2s ease;
}
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, -50%) scale(0.9); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }

/* Responsive */
@media (min-width: 1600px) {
    .goods-grid { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
}
@media (max-width: 1200px) {
    .left-sidebar { width: 180px; }
    .right-sidebar { width: 240px; }
    .goods-grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
    .data-bar { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 992px) {
    .right-sidebar { display: none; }
    .main-nav { display: none; }
    .yun-features { grid-template-columns: 1fr; }
    .goods-grid { grid-template-columns: repeat(3, 1fr); }
    .kk-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
    .left-sidebar { display: none; }
    .goods-grid { grid-template-columns: repeat(2, 1fr); }
}

/* AI Chat Modal */
.ai-chat-modal {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5); z-index: 10000;
    display: flex; align-items: center; justify-content: center;
}
.ai-chat-window {
    width: 480px; max-width: 90vw; max-height: 80vh;
    background: white; border-radius: 16px; overflow: hidden;
    display: flex; flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.ai-chat-header {
    padding: 16px 20px; background: var(--primary-gradient);
    color: white; font-size: 16px; font-weight: 600;
    display: flex; align-items: center; justify-content: space-between;
}
.chat-close-btn {
    background: none; border: none; color: white; font-size: 24px;
    cursor: pointer; width: 28px; height: 28px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%; line-height: 1;
}
.chat-close-btn:hover { background: rgba(255,255,255,0.2); }
.ai-chat-body {
    flex: 1; padding: 20px; overflow-y: auto;
    background: #f7f8fa; min-height: 300px; max-height: 500px;
}
.chat-msg {
    display: flex; gap: 8px; margin-bottom: 16px; align-items: flex-start;
}
.chat-msg.msg-user { flex-direction: row-reverse; }
.msg-avatar {
    width: 36px; height: 36px; border-radius: 50%;
    background: white; display: flex; align-items: center; justify-content: center;
    font-size: 18px; flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.msg-user .msg-avatar { background: var(--primary-light); }
.msg-bubble {
    max-width: 70%; padding: 12px 16px; border-radius: 12px;
    font-size: 14px; line-height: 1.6; word-break: break-word;
}
.msg-ai .msg-bubble {
    background: white; color: #333;
    border-bottom-left-radius: 4px;
}
.msg-user .msg-bubble {
    background: var(--primary-gradient); color: white;
    border-bottom-right-radius: 4px;
}
.ai-chat-input {
    display: flex; gap: 8px; padding: 12px 16px;
    border-top: 1px solid #eee; background: white;
}
.ai-chat-input input {
    flex: 1; padding: 10px 16px; border: 1px solid #e5e7eb;
    border-radius: 20px; font-size: 14px; outline: none;
}
.ai-chat-input input:focus { border-color: var(--primary-color); }
.ai-chat-input button {
    padding: 0 20px; background: var(--primary-gradient); color: white;
    border: none; border-radius: 20px; cursor: pointer; font-size: 14px;
}
.ai-chat-input button:disabled { background: #ccc; cursor: not-allowed; }

.ai-placeholder { text-align: center; padding: 80px 20px; }
.empty-icon-new { font-size: 80px; margin-bottom: 20px; opacity: 0.6; animation: float 3s ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.empty-title-new { font-size: 20px; font-weight: 700; color: var(--text); margin-bottom: 10px; }
.empty-desc-new { font-size: 14px; color: var(--text-light); max-width: 400px; margin: 0 auto; line-height: 1.8; }
