/* ========== Reset & Base ========== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { overflow-y: scroll; overflow-x: hidden; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: #f2f3f5;
    color: #333;
    min-height: 100vh;
    overflow-x: hidden;
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; }
button { cursor: pointer; border: none; outline: none; }
input, textarea { outline: none; border: none; }

/* ========== Layout ========== */
.bbs-wrapper {
    display: block;
    max-width: 1240px;
    margin: 0 auto;
    padding: 20px 15px;
    gap: 20px;
    min-height: 100vh;
}

/* ========== Left Sidebar ========== */
.sidebar-left {
    width: 220px;
    flex-shrink: 0;
    position: fixed;
    top: 20px;
    left: max(15px, calc((100vw - 1240px) / 2 + 15px));
    height: auto;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.06), 0 1px 3px rgba(0,0,0,0.04);
    padding: 8px 0;
    z-index: 10;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.sidebar-left::-webkit-scrollbar {
    display: none;
}
.sidebar-left::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 10px;
    right: 10px;
    height: 30px;
    background: rgba(45,127,249,0.06);
    border-radius: 0 0 16px 16px;
    z-index: -1;
    filter: blur(2px);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 18px;
    margin-bottom: 5px;
}
.sidebar-logo .logo-icon {
    font-size: 24px;
}
.sidebar-logo .logo-text {
    font-size: 20px;
    font-weight: 700;
    color: #333;
}

/* Nav Menu */
.sidebar-nav {
    flex: 1;
}
.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    border-radius: 10px;
    color: #555;
    font-size: 15px;
    transition: all 0.2s ease;
    margin-bottom: 2px;
}
.nav-item:hover {
    background: #f0f1f3;
    color: #333;
}
.nav-item.active {
    background: #eef3ff;
    color: #2d7ff9;
    font-weight: 600;
}
.nav-item i {
    width: 20px;
    text-align: center;
    font-size: 16px;
}

/* Publish Button */
.sidebar-publish {
    padding: 10px 18px;
    margin-top: 10px;
}
.btn-publish {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 0;
    background: #2d7ff9;
    color: #fff;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.2s ease;
}
.btn-publish:hover {
    background: #1a6fe6;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(45,127,249,0.3);
}
.btn-publish i {
    font-size: 16px;
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 15px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid #eee;
    margin-top: 10px;
}
.sidebar-login {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #666;
    font-size: 14px;
}
.sidebar-login i { font-size: 16px; }
.btn-theme-toggle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f0f1f3;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.2s ease;
}
.btn-theme-toggle:hover {
    background: #e0e1e3;
}

/* ========== Main Content ========== */
.main-content {
    min-width: 0;
    margin-left: 240px;
    margin-right: 320px;
}

/* Search Box */
.search-box {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    border-radius: 16px;
    padding: 14px 20px;
    margin-bottom: 16px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.06), 0 1px 3px rgba(0,0,0,0.04);
    position: relative;
}
.search-box::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 10px;
    right: 10px;
    height: 20px;
    background: rgba(45,127,249,0.05);
    border-radius: 0 0 16px 16px;
    z-index: -1;
    filter: blur(2px);
}
.search-box i { color: #bbb; font-size: 16px; }
.search-box input {
    flex: 1;
    background: transparent;
    font-size: 15px;
    color: #333;
}
.search-box input::placeholder { color: #bbb; }

/* Sort Tabs */
.sort-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 0;
    background: #fff;
    border-radius: 12px 12px 0 0;
    padding: 16px 25px 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    border: 1px solid #eef0f2;
    border-bottom: none;
}
.sort-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    font-size: 14px;
    color: #888;
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 8px;
}
.sort-tab:hover { color: #2d7ff9; }
.sort-tab.active {
    color: #2d7ff9;
    font-weight: 600;
}
.sort-tab i { font-size: 14px; }

/* Post List Container */
.post-list {
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0;
}
.post-list::after {
    display: none;
}

/* Profile Banner (legacy) */
.profile-banner {
    background: linear-gradient(135deg, #2d7ff9 0%, #7c5cfc 50%, #c76ced 100%);
    border-radius: 16px 16px 0 0;
    height: 160px;
    position: relative;
}

/* Profile Card */
.profile-card {
    background: #fff;
    border-radius: 0 0 16px 16px;
    padding: 0 25px 25px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.profile-info {
    display: flex;
    align-items: flex-end;
    gap: 18px;
    margin-top: -40px;
    margin-bottom: 15px;
    position: relative;
}
.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 4px solid #fff;
    background: #f0f1f3;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
}
.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.avatar-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #ffd93d, #ff6b6b);
    color: #fff;
    font-size: 32px;
    font-weight: 700;
}
.online-dot {
    position: absolute;
    bottom: 4px;
    right: 4px;
    width: 14px;
    height: 14px;
    background: #4caf50;
    border-radius: 50%;
    border: 2px solid #fff;
}
.profile-meta {
    flex: 1;
    padding-bottom: 5px;
}
.profile-name {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    margin-bottom: 6px;
}
.profile-stats {
    display: flex;
    gap: 20px;
    font-size: 14px;
    color: #999;
}
.profile-stats span b {
    color: #333;
    font-weight: 600;
    margin-right: 3px;
}
.btn-edit-profile {
    position: absolute;
    right: 0;
    bottom: 5px;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 7px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
    color: #666;
    font-size: 13px;
    transition: all 0.2s ease;
}
.btn-edit-profile:hover {
    border-color: #2d7ff9;
    color: #2d7ff9;
}

/* Profile Tabs */
.profile-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid #eee;
    margin-bottom: 0;
    overflow-x: auto;
}
.profile-tabs::-webkit-scrollbar { display: none; }
.tab-item {
    padding: 12px 18px;
    font-size: 14px;
    color: #666;
    white-space: nowrap;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}
.tab-item:hover { color: #2d7ff9; }
.tab-item.active {
    color: #2d7ff9;
    font-weight: 600;
    border-bottom-color: #2d7ff9;
}

/* Articles Section */
.articles-section {
    background: #fff;
    border-radius: 16px;
    padding: 20px 25px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.articles-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}
.articles-title {
    font-size: 17px;
    font-weight: 700;
    color: #333;
}
.btn-write {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #2d7ff9;
    font-size: 14px;
    font-weight: 500;
    padding: 6px 14px;
    border-radius: 6px;
    transition: all 0.2s ease;
}
.btn-write:hover {
    background: #eef3ff;
}
.btn-write i { font-size: 14px; }

/* Post Item */
.post-item {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 20px;
    padding: 22px 25px;
    margin-bottom: 12px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #eef0f2;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: all 0.2s ease;
}
.post-item:last-child { margin-bottom: 0; }
.post-item:hover {
    background: #fafbfc;
    box-shadow: 0 4px 12px rgba(0,0,0,0.07);
    border-color: #e0e3e8;
}
.post-main { flex: 1; min-width: 0; }
.post-author {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
    font-size: 13px;
}
.post-author-name { color: #555; font-weight: 500; }
.post-author-sep { color: #ddd; font-size: 12px; }
.post-author-time { color: #999; font-size: 12px; }
.post-title {
    font-size: 17px;
    font-weight: 700;
    color: #333;
    margin-bottom: 8px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.post-text {
    font-size: 14px;
    color: #777;
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 14px;
}
.post-footer {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid #f0f1f3;
    margin-top: 0;
}
.post-stats {
    display: flex;
    gap: 18px;
}
.post-stat {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    color: #aaa;
}
.post-stat i { font-size: 14px; }
.post-cat-badge {
    display: inline-block;
    padding: 3px 14px;
    border-radius: 4px;
    font-size: 12px;
    color: #fff;
    font-weight: 500;
    white-space: nowrap;
}
.post-thumb {
    width: 180px;
    height: 120px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
}
.post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Share Code */
.post-share-code {
    width: 100%;
    background: linear-gradient(135deg, #fff8e1 0%, #fff3cd 100%);
    border: 1px solid #ffe082;
    border-radius: 10px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.share-label {
    font-size: 13px;
    color: #e65100;
    font-weight: 600;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 5px;
}
.share-label i { font-size: 14px; color: #f57c00; }
.share-input {
    flex: 1;
    min-width: 0;
    background: #fff;
    border: 1px solid #eedba0;
    border-radius: 6px;
    padding: 7px 12px;
    font-size: 13px;
    font-family: 'SFMono-Regular', Consolas, monospace;
    color: #333;
    outline: none;
    transition: border-color 0.2s;
}
.share-input:focus { border-color: #f57c00; }
.btn-copy {
    padding: 7px 16px;
    background: linear-gradient(135deg, #f57c00, #ef6c00);
    color: #fff;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s ease;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(245,124,0,0.3);
}
.btn-copy:hover {
    background: linear-gradient(135deg, #ef6c00, #e65100);
    box-shadow: 0 3px 10px rgba(245,124,0,0.4);
    transform: translateY(-1px);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #bbb;
}
.empty-state i {
    font-size: 48px;
    margin-bottom: 15px;
    color: #ddd;
}
.empty-state p { font-size: 15px; }

/* Filter Buttons */
.filter-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
    background: #fff;
    border-radius: 0 0 12px 12px;
    padding: 8px 25px 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    border: 1px solid #eef0f2;
    border-top: none;
}
.filter-btn {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    background: #f0f1f3;
    color: #666;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}
.filter-btn:hover {
    background: #e0e1e3;
}
.filter-btn.active {
    background: #2d7ff9;
    color: #fff;
}

/* ========== Right Sidebar ========== */
.sidebar-right {
    width: 300px;
    flex-shrink: 0;
    position: fixed;
    top: 20px;
    right: max(15px, calc((100vw - 1240px) / 2 + 15px));
    height: calc(100vh - 40px);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Sign-in Card */
.signin-card {
    background: linear-gradient(135deg, #7c5cfc 0%, #c76ced 50%, #f59aef 100%);
    border-radius: 16px;
    padding: 25px 20px;
    color: #fff;
    position: relative;
    overflow: hidden;
}
.signin-card::before {
    content: '';
    position: absolute;
    top: -30px;
    right: -30px;
    width: 100px;
    height: 100px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
}
.signin-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 5px;
    position: relative;
    z-index: 1;
}
.signin-days {
    font-size: 28px;
    font-weight: 700;
}
.signin-days span {
    font-size: 14px;
    font-weight: 400;
}
.signin-label {
    font-size: 13px;
    opacity: 0.85;
}
.signin-sub {
    font-size: 12px;
    opacity: 0.7;
    margin-bottom: 18px;
}
.signin-rules {
    font-size: 12px;
    opacity: 0.7;
    padding: 4px 10px;
    background: rgba(255,255,255,0.15);
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    white-space: nowrap;
    flex-shrink: 0;
    min-width: 62px;
}
.btn-signin {
    display: block;
    width: 100%;
    padding: 12px 0;
    background: rgba(255,255,255,0.25);
    color: #fff;
    border-radius: 25px;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    transition: all 0.2s ease;
    position: relative;
    z-index: 1;
    backdrop-filter: blur(10px);
}
.btn-signin:hover {
    background: rgba(255,255,255,0.35);
    color: #fff;
}
.btn-signin i { margin-left: 5px; }

/* Task Card */
.task-card {
    background: #fff;
    border-radius: 16px;
    padding: 18px 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.06), 0 1px 3px rgba(0,0,0,0.04);
    position: relative;
}
.task-card::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 10px;
    right: 10px;
    height: 30px;
    background: rgba(45,127,249,0.06);
    border-radius: 0 0 16px 16px;
    z-index: -1;
    filter: blur(2px);
}
.task-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}
.task-header h3 {
    font-size: 15px;
    font-weight: 700;
    color: #333;
}
.task-header h3 i { color: #f57c00; margin-right: 5px; }
.task-refresh {
    font-size: 12px;
    color: #bbb;
}

.task-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f5f5f5;
}
.task-item:last-child { border-bottom: none; }
.task-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}
.task-icon.blue { background: #e3f2fd; color: #1976d2; }
.task-icon.green { background: #e8f5e9; color: #388e3c; }
.task-icon.orange { background: #fff3e0; color: #f57c00; }
.task-info { flex: 1; min-width: 0; }
.task-name {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 2px;
}
.task-desc {
    font-size: 12px;
    color: #999;
}
.task-reward {
    text-align: right;
    flex-shrink: 0;
}
.task-points {
    font-size: 14px;
    font-weight: 700;
    color: #f57c00;
    margin-bottom: 2px;
}
.btn-task {
    padding: 3px 10px;
    border: 1px solid #ddd;
    border-radius: 12px;
    font-size: 11px;
    color: #666;
    background: #fff;
    transition: all 0.2s ease;
}
.btn-task:hover {
    border-color: #2d7ff9;
    color: #2d7ff9;
}

/* Warning */
.task-warning {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 10px 0 0;
    font-size: 12px;
    color: #e53935;
    border-top: 1px solid #f5f5f5;
    margin-top: 5px;
}
.task-warning i { font-size: 14px; }

/* Leaderboard Card */
.leaderboard-card {
    background: #fff;
    border-radius: 16px;
    padding: 18px 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.06), 0 1px 3px rgba(0,0,0,0.04);
    position: relative;
}
.leaderboard-card::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 10px;
    right: 10px;
    height: 30px;
    background: rgba(255,215,0,0.08);
    border-radius: 0 0 16px 16px;
    z-index: -1;
    filter: blur(2px);
}
.leaderboard-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
}
.leaderboard-header i { color: #ffd700; font-size: 16px; }
.leaderboard-header h3 {
    font-size: 15px;
    font-weight: 700;
    color: #333;
}

.lb-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #f5f5f5;
}
.lb-item:last-child { border-bottom: none; }
.lb-rank {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}
.lb-rank.gold { background: #fff8e1; color: #f9a825; }
.lb-rank.silver { background: #f5f5f5; color: #9e9e9e; }
.lb-rank.bronze { background: #fff3e0; color: #ff8f00; }
.lb-rank.normal { background: #f5f5f5; color: #bbb; }
.lb-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}
.lb-avatar img { width: 100%; height: 100%; object-fit: cover; }
.lb-avatar-letter {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    border-radius: 50%;
}
.lb-info { flex: 1; }
.lb-name {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    display: flex;
    align-items: center;
    gap: 5px;
}
.lb-vip {
    font-size: 12px;
}
.lb-days {
    font-size: 12px;
    color: #999;
}

/* ========== Mobile Responsive ========== */
@media (max-width: 1100px) {
    .sidebar-right {
        width: 260px;
        right: 15px;
    }
    .main-content {
        margin-right: 280px;
    }
}

@media (max-width: 960px) {
    .sidebar-right { display: none; }
    .main-content {
        margin-right: 0;
    }
}

@media (max-width: 768px) {
    .sidebar-left { display: none; }
    .bbs-wrapper {
        padding: 0;
        gap: 0;
    }
    .main-content {
        margin-left: 0;
        margin-right: 0;
        padding: 10px;
        padding-top: 6px;
    }
    /* Search */
    .search-box { padding: 12px 15px; border-radius: 10px; }
    .search-box::after { display: none; }
    /* Tabs & Filters */
    .sort-tabs { margin-bottom: 10px; padding: 10px 12px; border-radius: 10px; }
    .sort-tab { padding: 8px 14px; font-size: 13px; }
    .filter-nav { margin-bottom: 10px; padding: 10px 12px; border-radius: 10px; }
    .filter-btn { padding: 6px 12px; font-size: 12px; }
    /* Post items */
    .post-item { padding: 14px; gap: 10px 12px; border-radius: 10px; margin-bottom: 10px; }
    .post-title { font-size: 15px; margin-bottom: 5px; }
    .post-text { font-size: 13px; -webkit-line-clamp: 2; margin-bottom: 8px; }
    .post-author { margin-bottom: 8px; gap: 4px; font-size: 12px; }
    .post-cat-badge { padding: 2px 8px; font-size: 11px; }
    .post-thumb { width: 100px; height: 72px; border-radius: 8px; }
    .post-footer { padding-top: 10px; }
    .post-stats { gap: 12px; }
    .post-stat { font-size: 12px; }
    /* Share code mobile */
    .post-share-code { padding: 10px 12px; gap: 8px; border-radius: 8px; flex-wrap: wrap; }
    .share-label { font-size: 12px; }
    .share-input { padding: 6px 10px; font-size: 12px; min-width: 0; }
    .btn-copy { padding: 6px 12px; font-size: 11px; }
    /* Topic grid */
    .topic-square { padding: 16px 12px; border-radius: 10px; box-shadow: 0 2px 8px rgba(0,0,0,0.04); }
    .topic-square::after { display: none; }
    .topic-page-title { font-size: 18px; margin-bottom: 14px; }
    .topic-grid { grid-template-columns: 1fr; gap: 8px; }
    .topic-card { padding: 14px 12px; border-radius: 10px; gap: 12px; }
    .topic-icon { width: 40px; height: 40px; font-size: 17px; border-radius: 10px; }
    .topic-name { font-size: 14px; }
    .topic-meta { font-size: 11px; }
    .topic-follow-btn { width: 28px; height: 28px; font-size: 11px; }
    /* Category detail */
    .category-detail-header { padding: 12px 14px; gap: 10px; margin-bottom: 10px; border-radius: 10px; }
    .category-back-btn { width: 32px; height: 32px; font-size: 13px; border-radius: 8px; }
    .category-detail-info h2 { font-size: 16px; }
    .category-detail-count { font-size: 12px; }
    /* Apps page mobile */
    .apps-page-header { padding: 24px 15px 20px; margin-bottom: 16px; }
    .apps-page-icon { width: 52px; height: 52px; font-size: 22px; border-radius: 14px; }
    .apps-page-header h1 { font-size: 20px; }
    .apps-grid { grid-template-columns: 1fr; gap: 12px; }
    .app-card { padding: 16px; gap: 12px; border-radius: 12px; }
    .app-card-icon { width: 48px; height: 48px; font-size: 20px; border-radius: 12px; }
    .app-card-name { font-size: 15px; }
    .app-card-desc { font-size: 12px; margin: 6px 0 10px; }
    /* Legacy */
    .profile-banner { height: 120px; border-radius: 12px 12px 0 0; }
    .profile-card { padding: 0 15px 15px; }
    .articles-section { padding: 15px; border-radius: 12px; }
}

/* Mobile Bottom Nav */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #fff;
    z-index: 1000;
    padding: 8px 0 env(safe-area-inset-bottom, 5px);
    box-shadow: 0 -2px 10px rgba(0,0,0,0.08);
}
.mobile-bottom-nav-inner {
    display: flex;
}
.mobile-nav-item {
    flex: 1;
    text-align: center;
}
.mobile-nav-item a {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #999;
    font-size: 11px;
    gap: 2px;
}
.mobile-nav-item a i { font-size: 18px; }
.mobile-nav-item a.active { color: #2d7ff9; }

@media (max-width: 768px) {
    .mobile-bottom-nav { display: block; }
    body { padding-bottom: 60px; }
}

/* ========== Mobile Header ========== */
.mobile-header {
    display: none;
    position: sticky;
    top: 0;
    z-index: 100;
    background: #fff;
    padding: 12px 15px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    align-items: center;
    justify-content: space-between;
}
.mobile-header .logo-text {
    font-size: 18px;
    font-weight: 700;
    color: #333;
}
.mobile-header-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}
.mobile-header-actions a {
    color: #666;
    font-size: 14px;
}
@media (max-width: 768px) {
    .mobile-header { display: flex; }
}

/* ========== Dark Mode ========== */
body.dark-mode {
    background: #0f0f23;
    color: #d0d0d0;
}

/* Dark - Left Sidebar */
body.dark-mode .sidebar-left { background: #16213e; box-shadow: 0 4px 15px rgba(0,0,0,0.2); }
body.dark-mode .sidebar-left::after { background: rgba(45,127,249,0.08); }
body.dark-mode .sidebar-logo .logo-text { color: #e0e0e0; }
body.dark-mode .nav-item { color: #888; }
body.dark-mode .nav-item:hover { background: rgba(255,255,255,0.04); color: #ccc; }
body.dark-mode .nav-item.active { background: rgba(45,127,249,0.15); color: #2d7ff9; }
body.dark-mode .sidebar-footer { border-top-color: rgba(255,255,255,0.06); }
body.dark-mode .sidebar-login { color: #888; }
body.dark-mode .btn-theme-toggle { background: rgba(255,255,255,0.06); color: #888; }
body.dark-mode .btn-publish { background: #2d7ff9; }

/* Dark - Search Box */
body.dark-mode .search-box { background: #16213e; box-shadow: 0 4px 15px rgba(0,0,0,0.2); }
body.dark-mode .search-box::after { background: rgba(45,127,249,0.08); }
body.dark-mode .search-box input { color: #ccc; }
body.dark-mode .search-box input::placeholder { color: #555; }
body.dark-mode .search-box i { color: #555; }

/* Dark - Sort Tabs */
body.dark-mode .sort-tabs { background: #16213e; box-shadow: 0 2px 8px rgba(0,0,0,0.2); border-color: rgba(255,255,255,0.06); }
body.dark-mode .sort-tab { color: #888; }
body.dark-mode .sort-tab:hover { color: #aaa; }
body.dark-mode .sort-tab.active { color: #2d7ff9; }

/* Dark - Filter */
body.dark-mode .filter-nav { background: #16213e; box-shadow: 0 2px 8px rgba(0,0,0,0.2); border-color: rgba(255,255,255,0.06); }
body.dark-mode .filter-btn { background: rgba(255,255,255,0.06); color: #888; }
body.dark-mode .filter-btn:hover { background: rgba(255,255,255,0.1); color: #aaa; }
body.dark-mode .filter-btn.active { background: #2d7ff9; color: #fff; }

/* Dark - Post List */
body.dark-mode .post-list { background: transparent; box-shadow: none; }
body.dark-mode .post-list::after { display: none; }
body.dark-mode .post-item { background: #16213e; border-color: rgba(255,255,255,0.06); box-shadow: 0 2px 8px rgba(0,0,0,0.2); }
body.dark-mode .post-item:hover { background: #1a2744; box-shadow: 0 4px 12px rgba(0,0,0,0.3); border-color: rgba(255,255,255,0.1); }
body.dark-mode .post-author-name { color: #bbb; }
body.dark-mode .post-author-sep { color: #444; }
body.dark-mode .post-author-time { color: #666; }
body.dark-mode .post-title { color: #e0e0e0; }
body.dark-mode .post-text { color: #888; }
body.dark-mode .post-stat { color: #666; }

/* Dark - Post Footer */
body.dark-mode .post-footer { border-top-color: rgba(255,255,255,0.06); }

/* Dark - Share Code */
body.dark-mode .post-share-code { background: rgba(255,248,225,0.06); border-color: rgba(255,224,130,0.15); }
body.dark-mode .share-label { color: #f5a623; }
body.dark-mode .share-label i { color: #f5a623; }
body.dark-mode .share-input { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.1); color: #ccc; }
body.dark-mode .btn-copy { background: linear-gradient(135deg, #e65100, #bf360c); box-shadow: 0 2px 6px rgba(230,81,0,0.3); }

/* Dark - Right Sidebar */
body.dark-mode .task-card,
body.dark-mode .leaderboard-card {
    background: #16213e;
    box-shadow: none;
}
body.dark-mode .task-card::after,
body.dark-mode .leaderboard-card::after { display: none; }
body.dark-mode .task-header h3,
body.dark-mode .leaderboard-header h3 { color: #e0e0e0; }
body.dark-mode .task-name { color: #ddd; }
body.dark-mode .task-desc { color: #666; }
body.dark-mode .task-refresh { color: #555; }
body.dark-mode .task-points { color: #f57c00; }
body.dark-mode .task-item { border-bottom-color: rgba(255,255,255,0.06); }
body.dark-mode .task-warning { border-top-color: rgba(255,255,255,0.06); }
body.dark-mode .btn-task { border-color: #333; color: #888; background: transparent; }
body.dark-mode .btn-task:hover { border-color: #2d7ff9; color: #2d7ff9; }
body.dark-mode .task-icon.blue { background: rgba(25,118,210,0.15); }
body.dark-mode .task-icon.green { background: rgba(56,142,60,0.15); }
body.dark-mode .task-icon.orange { background: rgba(245,124,0,0.15); }
body.dark-mode .lb-name { color: #ddd; }
body.dark-mode .lb-days { color: #666; }
body.dark-mode .lb-item { border-bottom-color: rgba(255,255,255,0.06); }
body.dark-mode .lb-rank.gold { background: rgba(249,168,37,0.15); }
body.dark-mode .lb-rank.silver { background: rgba(158,158,158,0.15); }
body.dark-mode .lb-rank.bronze { background: rgba(255,143,0,0.15); }
body.dark-mode .lb-rank.normal { background: rgba(255,255,255,0.06); color: #666; }

/* Dark - Topic Square */
body.dark-mode .topic-square { background: #16213e; box-shadow: 0 4px 15px rgba(0,0,0,0.2); }
body.dark-mode .topic-square::after { background: rgba(45,127,249,0.08); }
body.dark-mode .topic-page-title { color: #e0e0e0; }
body.dark-mode .topic-card { background: rgba(255,255,255,0.04); border-color: transparent; }
body.dark-mode .topic-card:hover { background: rgba(45,127,249,0.08); border-color: rgba(45,127,249,0.15); box-shadow: none; }
body.dark-mode .topic-name { color: #e0e0e0; }
body.dark-mode .topic-meta { color: #666; }
body.dark-mode .topic-follow-btn { border-color: #333; color: #555; background: transparent; }
body.dark-mode .topic-card:hover .topic-follow-btn { border-color: #2d7ff9; color: #2d7ff9; }
body.dark-mode .category-detail-header { border-bottom-color: rgba(255,255,255,0.06); }
body.dark-mode .category-back-btn { background: rgba(255,255,255,0.06); color: #888; }
body.dark-mode .category-back-btn:hover { background: rgba(255,255,255,0.1); color: #ccc; }
body.dark-mode .category-detail-info h2 { color: #e0e0e0; }
body.dark-mode .category-detail-count { color: #666; }

/* Dark - Apps Page */
body.dark-mode .apps-page-header h1 { color: #e0e0e0; }
body.dark-mode .apps-page-header p { color: #666; }
body.dark-mode .app-card { background: #16213e; border-color: rgba(255,255,255,0.06); box-shadow: 0 2px 8px rgba(0,0,0,0.2); }
body.dark-mode .app-card:hover { background: #1a2744; box-shadow: 0 4px 12px rgba(0,0,0,0.3); border-color: rgba(255,255,255,0.1); }
body.dark-mode .app-card-name { color: #e0e0e0; }
body.dark-mode .app-card-version { background: rgba(255,255,255,0.06); color: #888; }
body.dark-mode .app-card-desc { color: #777; }
body.dark-mode .btn-app-detail { background: rgba(45,127,249,0.12); color: #5a9fff; }
body.dark-mode .btn-app-detail:hover { background: rgba(45,127,249,0.2); }
body.dark-mode .btn-app-coming { background: rgba(255,255,255,0.06); color: #555; }

/* Dark - Mobile */
body.dark-mode .mobile-header { background: #16213e; box-shadow: none; }
body.dark-mode .mobile-header .logo-text { color: #e0e0e0; }
body.dark-mode .mobile-header-actions a { color: #888; }
body.dark-mode .mobile-bottom-nav { background: #16213e; box-shadow: 0 -1px 0 rgba(255,255,255,0.06); }
body.dark-mode .mobile-nav-item a { color: #666; }
body.dark-mode .mobile-nav-item a.active { color: #2d7ff9; }

/* Dark - Legacy elements */
body.dark-mode .profile-card,
body.dark-mode .articles-section { background: #16213e; box-shadow: none; }
body.dark-mode .profile-name,
body.dark-mode .articles-title { color: #e0e0e0; }
body.dark-mode .profile-stats { color: #777; }
body.dark-mode .profile-stats span b { color: #ccc; }
body.dark-mode .btn-edit-profile { background: transparent; border-color: #333; color: #aaa; }
body.dark-mode .profile-tabs { border-bottom-color: rgba(255,255,255,0.06); }
body.dark-mode .tab-item { color: #888; }
body.dark-mode .tab-item.active { color: #2d7ff9; border-bottom-color: #2d7ff9; }

/* Dark - Common page styles */
body.dark-mode .page-wrapper { color: #d0d0d0; }
body.dark-mode .page-top-bar h1 { color: #e0e0e0; }
body.dark-mode .page-back { background: rgba(255,255,255,0.06); color: #888; }
body.dark-mode .page-back:hover { background: rgba(255,255,255,0.1); color: #ccc; }
body.dark-mode .card-box { background: #16213e; box-shadow: none; }
body.dark-mode .card-box-title { color: #e0e0e0; }
body.dark-mode .card-box-desc { color: #777; }
body.dark-mode .pill-item { background: rgba(255,255,255,0.06); color: #888; box-shadow: none; }
body.dark-mode .pill-item:hover { background: rgba(255,255,255,0.1); color: #aaa; }
body.dark-mode .pill-item.active { background: #2d7ff9; color: #fff; }
body.dark-mode .feature-item { background: #16213e; box-shadow: none; }
body.dark-mode .feature-item h3 { color: #e0e0e0; }
body.dark-mode .feature-item p { color: #777; }
body.dark-mode .section-heading { color: #e0e0e0; }
body.dark-mode .page-bottom-nav { background: #16213e; box-shadow: 0 -1px 0 rgba(255,255,255,0.06); }
body.dark-mode .page-bottom-nav a { color: #666; }
body.dark-mode .page-bottom-nav a.active { color: #2d7ff9; }

/* ========== Common Page Styles ========== */
.page-wrapper {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px 15px 80px;
}
.page-top-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 0;
    margin-bottom: 20px;
}
.page-back {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #f0f1f3;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555;
    font-size: 14px;
    transition: all 0.2s;
}
.page-back:hover { background: #e0e1e3; color: #333; }
.page-top-bar h1 {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    flex: 1;
}
.page-top-bar .page-login {
    font-size: 13px;
    color: #2d7ff9;
    font-weight: 500;
}

/* Card Grid */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}
.card-box {
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: all 0.2s;
}
.card-box:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}
.card-box-img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    background: #f0f1f3;
    display: block;
}
.card-box-body { padding: 14px 16px; }
.card-box-title {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.4;
}
.card-box-desc {
    font-size: 13px;
    color: #999;
    margin-bottom: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.card-box-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.card-box-price {
    font-size: 18px;
    font-weight: 700;
    color: #ff4757;
}
.card-box-price small { font-size: 13px; }
.card-box-btn {
    padding: 6px 16px;
    background: #2d7ff9;
    color: #fff;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s;
}
.card-box-btn:hover { background: #1a6fe6; color: #fff; }
.card-box-btn.green { background: #4caf50; }
.card-box-btn.green:hover { background: #43a047; }
.card-box-btn.orange { background: #ff9800; }
.card-box-btn.orange:hover { background: #f57c00; }

/* Category Pills */
.pill-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    overflow-x: auto;
    padding-bottom: 5px;
}
.pill-nav::-webkit-scrollbar { display: none; }
.pill-item {
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 13px;
    background: #fff;
    color: #666;
    white-space: nowrap;
    transition: all 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.pill-item:hover { background: #eef3ff; color: #2d7ff9; }
.pill-item.active { background: #2d7ff9; color: #fff; }

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #2d7ff9 0%, #7c5cfc 50%, #c76ced 100%);
    border-radius: 20px;
    padding: 50px 30px;
    text-align: center;
    color: #fff;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}
.hero-section::before {
    content: '';
    position: absolute;
    top: -50px; right: -50px;
    width: 200px; height: 200px;
    background: rgba(255,255,255,0.08);
    border-radius: 50%;
}
.hero-back {
    position: absolute;
    top: 18px;
    left: 18px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.18);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.3);
    backdrop-filter: blur(10px);
    z-index: 2;
    transition: all 0.2s ease;
}
.hero-back:hover {
    background: rgba(255,255,255,0.28);
    color: #fff;
    transform: translateX(-2px);
}
.hero-section h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 10px;
    position: relative;
}
.hero-section .version {
    font-size: 18px;
    opacity: 0.9;
    margin-bottom: 8px;
}
.hero-section .desc {
    font-size: 15px;
    opacity: 0.8;
    margin-bottom: 25px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}
.hero-icon {
    width: 100px;
    height: 100px;
    border-radius: 24px;
    margin: 0 auto 20px;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    overflow: hidden;
}
.hero-icon img { width: 100%; height: 100%; object-fit: cover; }
.hero-icon i { font-size: 42px; color: #fff; }
.btn-hero {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 40px;
    background: rgba(255,255,255,0.2);
    color: #fff;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 600;
    backdrop-filter: blur(10px);
    transition: all 0.2s;
    border: 1px solid rgba(255,255,255,0.3);
}
.btn-hero:hover {
    background: rgba(255,255,255,0.3);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

/* Hero Actions (button + QR) */
.hero-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}
.hero-qr {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
.hero-qr-img {
    width: 120px;
    height: 120px;
    background: #fff;
    border-radius: 12px;
    padding: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}
.hero-qr-img img {
    width: 100%;
    height: 100%;
    display: block;
    border-radius: 4px;
}
.hero-qr-tip {
    font-size: 12px;
    color: rgba(255,255,255,0.85);
}

/* Feature Row */
.feature-row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 30px;
}
.feature-item {
    background: #fff;
    border-radius: 14px;
    padding: 24px 20px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: all 0.2s;
}
.feature-item:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(0,0,0,0.08); }
.feature-item .fi-icon { font-size: 36px; margin-bottom: 12px; }
.feature-item h3 { font-size: 15px; font-weight: 600; color: #333; margin-bottom: 6px; }
.feature-item p { font-size: 13px; color: #999; line-height: 1.5; }

/* Section Title */
.section-heading {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    margin-bottom: 20px;
    padding-left: 12px;
    border-left: 4px solid #2d7ff9;
}

/* ROM Badge */
.rom-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
}
.rom-badge.line { background: #2d7ff9; }
.rom-badge.card { background: #4caf50; }

/* ========== Shop / Points Exchange ========== */
.shop-banner {
    background: linear-gradient(135deg, #2d7ff9 0%, #7c5cfc 50%, #c76ced 100%);
    border-radius: 16px;
    padding: 35px 30px;
    color: #fff;
    position: relative;
    overflow: hidden;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.shop-banner::before {
    content: '';
    position: absolute;
    top: -40px;
    right: -40px;
    width: 160px;
    height: 160px;
    background: rgba(255,255,255,0.08);
    border-radius: 50%;
}
.shop-banner-content { position: relative; z-index: 1; }
.shop-banner-content h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
}
.shop-banner-content p {
    font-size: 15px;
    opacity: 0.85;
    margin-bottom: 16px;
}
.shop-banner-points {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    background: rgba(255,255,255,0.2);
    border-radius: 25px;
    font-size: 15px;
    font-weight: 500;
    backdrop-filter: blur(10px);
}
.shop-banner-points i { font-size: 16px; }
.shop-banner-icon {
    position: relative;
    z-index: 1;
    font-size: 64px;
    opacity: 0.3;
    margin-right: 20px;
}

/* Shop Section */
.shop-section {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.06), 0 1px 3px rgba(0,0,0,0.04);
    overflow: hidden;
    position: relative;
}
.shop-section::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 10px;
    right: 10px;
    height: 30px;
    background: rgba(45,127,249,0.06);
    border-radius: 0 0 16px 16px;
    z-index: -1;
    filter: blur(2px);
}

/* Shop Tabs */
.shop-tabs {
    display: flex;
    gap: 0;
    padding: 0 20px;
    border-bottom: 1px solid #f0f1f3;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.shop-tabs::-webkit-scrollbar { display: none; }
.shop-tab {
    padding: 16px 20px;
    font-size: 15px;
    color: #666;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
}
.shop-tab:hover { color: #2d7ff9; }
.shop-tab.active {
    color: #2d7ff9;
    font-weight: 700;
    border-bottom-color: #2d7ff9;
}

/* Shop Grid */
.shop-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    padding: 20px;
}

/* Shop Card */
.shop-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #f0f1f3;
    transition: all 0.2s;
}
.shop-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}
.shop-card-img-wrap {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #f5f5f5;
}
.shop-card-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}
.shop-card:hover .shop-card-img-wrap img {
    transform: scale(1.05);
}
.shop-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ddd;
    font-size: 40px;
}
.shop-card-body {
    padding: 16px;
}
.shop-card-name {
    font-size: 16px;
    font-weight: 700;
    color: #333;
    margin-bottom: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.shop-card-stock {
    display: inline-block;
    padding: 3px 10px;
    background: #f5f5f5;
    border-radius: 4px;
    font-size: 12px;
    color: #999;
    margin-bottom: 12px;
}
.shop-card-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.shop-card-price {
    color: #ff4757;
}
.shop-card-price strong {
    font-size: 22px;
    font-weight: 700;
}
.shop-card-price span {
    font-size: 13px;
    margin-left: 3px;
}
.shop-card-btn {
    display: inline-flex;
    align-items: center;
    padding: 8px 20px;
    background: #2d7ff9;
    color: #fff;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
}
.shop-card-btn:hover {
    background: #1a6fe6;
    color: #fff;
}

/* Shop Responsive */
@media (max-width: 768px) {
    .shop-banner { padding: 25px 20px; }
    .shop-banner-content h1 { font-size: 22px; }
    .shop-banner-icon { display: none; }
    .shop-grid { grid-template-columns: 1fr; gap: 15px; padding: 15px; }
    .shop-card-img-wrap { height: 160px; }
}

/* Dark - Shop */
body.dark-mode .shop-section { background: #16213e; box-shadow: none; }
body.dark-mode .shop-section::after { display: none; }
body.dark-mode .shop-tabs { border-bottom-color: rgba(255,255,255,0.06); }
body.dark-mode .shop-tab { color: #888; }
body.dark-mode .shop-tab.active { color: #2d7ff9; border-bottom-color: #2d7ff9; }
body.dark-mode .shop-card { background: #1a2744; border-color: rgba(255,255,255,0.06); }
body.dark-mode .shop-card-name { color: #e0e0e0; }
body.dark-mode .shop-card-stock { background: rgba(255,255,255,0.06); color: #777; }
body.dark-mode .shop-card-placeholder { color: #444; }

/* Page Empty */
.page-empty {
    text-align: center;
    padding: 80px 20px;
    color: #bbb;
}
.page-empty i { font-size: 56px; margin-bottom: 15px; color: #ddd; }
.page-empty p { font-size: 16px; }

/* Toast */
.toast-msg {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.8);
    color: #fff;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 10000;
}

/* Common bottom nav for inner pages */
.page-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #fff;
    display: flex;
    padding: 8px 0 env(safe-area-inset-bottom, 5px);
    box-shadow: 0 -2px 10px rgba(0,0,0,0.08);
    z-index: 1000;
}
.page-bottom-nav a {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    color: #999;
    font-size: 11px;
}
.page-bottom-nav a i { font-size: 18px; }
.page-bottom-nav a.active { color: #2d7ff9; }

/* ========== Topic Square (话题广场) ========== */
.topic-square {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.06), 0 1px 3px rgba(0,0,0,0.04);
    position: relative;
}
.topic-square::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 10px;
    right: 10px;
    height: 20px;
    background: rgba(45,127,249,0.05);
    border-radius: 0 0 16px 16px;
    z-index: -1;
    filter: blur(2px);
}
.topic-page-title {
    font-size: 22px;
    font-weight: 700;
    color: #333;
    margin-bottom: 22px;
    padding-left: 2px;
}
.topic-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}
@media (max-width: 960px) {
    .topic-grid { grid-template-columns: 1fr; }
}
.topic-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #f8f9fb;
    border-radius: 14px;
    padding: 16px 14px;
    transition: all 0.2s;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    border: 1px solid transparent;
}
.topic-card:hover {
    background: #f0f4ff;
    border-color: rgba(45,127,249,0.15);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.06);
}
.topic-icon {
    width: 46px;
    height: 46px;
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}
.topic-info {
    flex: 1;
    min-width: 0;
}
.topic-name {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin-bottom: 3px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.topic-meta {
    font-size: 12px;
    color: #999;
}
.topic-follow-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1.5px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #bbb;
    font-size: 12px;
    flex-shrink: 0;
    transition: all 0.2s;
    background: #fff;
}
.topic-card:hover .topic-follow-btn {
    border-color: #2d7ff9;
    color: #2d7ff9;
}

/* Category Detail Header */
.category-detail-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 22px;
    margin-bottom: 12px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #eef0f2;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.category-back-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #f0f1f3;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555;
    font-size: 14px;
    transition: all 0.2s;
    flex-shrink: 0;
}
.category-back-btn:hover { background: #e0e1e3; color: #333; }
.category-detail-info h2 {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    margin-bottom: 2px;
}
.category-detail-count {
    font-size: 13px;
    color: #999;
}

/* ========== Apps Download Page ========== */
.apps-page-header {
    text-align: center;
    padding: 40px 20px 30px;
    margin-bottom: 24px;
}
.apps-page-icon {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    background: linear-gradient(135deg, #2d7ff9 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    color: #fff;
    margin: 0 auto 16px;
    box-shadow: 0 8px 24px rgba(45,127,249,0.3);
}
.apps-page-header h1 {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    margin-bottom: 8px;
}
.apps-page-header p {
    font-size: 14px;
    color: #999;
}
.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
    margin-bottom: 30px;
}
.app-card {
    display: flex;
    gap: 16px;
    background: #fff;
    border-radius: 16px;
    padding: 20px;
    border: 1px solid #eef0f2;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: all 0.25s;
}
.app-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    border-color: rgba(45,127,249,0.15);
}
.app-card-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.app-card-body {
    flex: 1;
    min-width: 0;
}
.app-card-name {
    font-size: 16px;
    font-weight: 700;
    color: #333;
    margin-bottom: 2px;
    display: inline;
}
.app-card-version {
    font-size: 12px;
    color: #999;
    background: #f0f1f3;
    padding: 1px 8px;
    border-radius: 6px;
    margin-left: 8px;
    vertical-align: middle;
}
.app-card-desc {
    font-size: 13px;
    color: #888;
    margin: 8px 0 12px;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.app-card-actions {
    display: flex;
    gap: 8px;
}
.btn-app-detail {
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    color: #2d7ff9;
    background: rgba(45,127,249,0.08);
    transition: all 0.2s;
    text-decoration: none;
}
.btn-app-detail:hover {
    background: rgba(45,127,249,0.15);
}
.btn-app-download {
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    color: #fff;
    background: #2d7ff9;
    transition: all 0.2s;
    text-decoration: none;
}
.btn-app-download:hover {
    background: #1a6fe8;
    box-shadow: 0 2px 8px rgba(45,127,249,0.3);
}
.btn-app-coming {
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    color: #bbb;
    background: #f0f1f3;
    cursor: default;
}
