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

:root {
    --bg-primary: #141414;
    --bg-secondary: #1a1a1a;
    --bg-card: #212121;
    --bg-hover: #2a2a2a;
    --text-primary: #ffffff;
    --text-secondary: #999999;
    --text-muted: #666666;
    --border-color: #2a2a2a;
    --accent-color: #5B9BD5;
    --accent-hover: #4A8BC5;
    --accent-gradient: linear-gradient(135deg, #4A8BC5 0%, #6BA8D8 100%);
    --badge-latest: linear-gradient(135deg, #ff4757 0%, #ff6b81 100%);
    --vip-color: #fbbf24;
    --vip-bg: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
    --card-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    --sidebar-width: 240px;
    --header-height: 64px;
    --radius-lg: 16px;
    --radius-md: 12px;
    --radius-sm: 8px;
}

[data-theme="light"] {
    --bg-primary: #f5f5f5;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-hover: #f0f0f0;
    --text-primary: #111111;
    --text-secondary: #666666;
    --text-muted: #999999;
    --border-color: #e5e5e5;
    --accent-color: #00CC9F;
    --accent-hover: #99CC66;
    --accent-gradient: linear-gradient(135deg, #00CC9F 0%, #99CC66 100%);
    --vip-color: #d97706;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    --card-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Inter", "SF Pro Display", "PingFang SC", "Microsoft YaHei", sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    font-size: 15px;
    line-height: 1.6;
    letter-spacing: 0.01em;
}

.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    overflow-y: auto;
    transition: width 0.3s;
    z-index: 100;
}

.sidebar.collapsed {
    width: 64px;
}

.sidebar-header {
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-logo {
    width: 32px;
    height: 32px;
    background: var(--accent-gradient);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.sidebar-title {
    font-size: 17px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    letter-spacing: 0.05em;
}

.sidebar.collapsed .sidebar-title,
.sidebar.collapsed .nav-text,
.sidebar.collapsed .nav-badge,
.sidebar.collapsed .sidebar-section-title {
    display: none;
}

.sidebar-nav {
    padding: 12px 8px;
}

.sidebar-section-title {
    font-size: 13px;
    color: var(--text-muted);
    text-transform: uppercase;
    padding: 16px 12px 8px;
    letter-spacing: 0.5px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 2px;
}

.nav-item:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.nav-item.active {
    background: var(--accent-color);
    color: #fff;
}

.nav-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.nav-icon svg {
    display: block !important;
    width: 16px !important;
    height: 16px !important;
    margin-top: 0px;
}
.nav-text {
    flex: 1;
    font-size: 15px;
    line-height: 1;
    vertical-align: middle;
}

.nav-badge {
    background: var(--vip-color);
    color: #8b4513;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 600;
}

.main-wrapper {
    margin-left: var(--sidebar-width);
    flex: 1;
    min-height: 100vh;
    transition: margin-left 0.3s;
}

.sidebar.collapsed ~ .main-wrapper {
    margin-left: 64px;
}

.main-header {
    height: var(--header-height);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    padding: 0 24px;
    gap: 16px;
    position: sticky;
    top: 0;
    z-index: 50;
}

.toggle-sidebar {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 20px;
    padding: 8px;
    border-radius: 6px;
}

.toggle-sidebar:hover {
    background: var(--bg-hover);
}

.search-box {
    flex: 1;
    max-width: 400px;
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 8px 16px 8px 40px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 15px;
}

.search-box input:focus {
    outline: none;
    border-color: var(--accent-color);
}

.search-box .search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.header-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 12px;
}

.theme-toggle {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
}

.theme-toggle:hover {
    background: var(--bg-hover);
}

.user-avatar-small {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 15px;
    cursor: pointer;
}

.header-auth-btns {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 14px;
}

.main-content {
    padding: 24px;
}

.page-title {
    font-size: 26px;
    font-weight: 600;
    margin-bottom: 20px;
}

.banner-section {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.banner-card {
    border-radius: 12px;
    padding: 24px;
    position: relative;
    overflow: hidden;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.banner-primary {
    background: var(--accent-gradient);
    color: #fff;
}

.banner-secondary {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: #fff;
}

.banner-title {
    font-size: 30px;
    font-weight: 700;
    margin-bottom: 8px;
}

.banner-desc {
    font-size: 15px;
    opacity: 0.9;
    margin-bottom: 16px;
}

.banner-btn {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    color: #fff;
    padding: 8px 20px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 15px;
    width: fit-content;
}

.banner-btn:hover {
    background: rgba(255,255,255,0.3);
}

.banner-emoji {
    position: absolute;
    right: 20px;
    bottom: 20px;
    font-size: 80px;
    opacity: 0.3;
}

.section {
    margin-bottom: 32px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.section-title {
    font-size: 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-more {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
}

.section-more:hover {
    color: var(--accent-color);
}

.tag-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

@media (max-width: 768px) {
    .tag-nav {
        flex-direction: column;
        align-items: stretch;
    }
    .tag-nav .filter-search {
        margin-left: 0;
        width: 100%;
    }
    .tag-nav .filter-search input {
        flex: 1;
        min-width: 0;
        width: auto;
    }
    .source-grid {
        grid-template-columns: 1fr;
    }
}

.tag-item {
    padding: 6px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
}

.tag-item:hover, .tag-item.active {
    background: var(--accent-color);
    color: #fff;
    border-color: var(--accent-color);
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.3s;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--card-shadow);
    border-color: var(--accent-color);
}

.card-cover-wrap {
    position: relative;
    width: 100%;
    padding-top: 75%;
    overflow: hidden;
    background: var(--bg-hover);
}

.card-cover-wrap .card-cover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    z-index: 2;
}

.badge-latest {
    background: var(--badge-latest);
}

.badge-hot {
    background: #ff4757;
}

.badge-new {
    background: #51cf66;
}

.badge-vip {
    background: var(--vip-bg);
    color: #8b4513;
}

.card-body {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

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

.card-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    flex-shrink: 0;
    background: var(--bg-hover);
}

.card-header-info {
    flex: 1;
    min-width: 0;
}

.card-header-title {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-header-desc {
    font-size: 13px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.card-tag {
    font-size: 13px;
    color: var(--text-secondary);
    background: var(--bg-hover);
    padding: 2px 8px;
    border-radius: 4px;
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
    color: var(--text-primary);
}

.card-summary {
    font-size: 14px;
    color: var(--text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
    flex: 1;
}

.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
    margin-top: 12px;
    border-top: 1px solid var(--border-color);
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: var(--text-muted);
}

.card-meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.card-price {
    color: #ff6b6b;
    font-weight: 600;
    font-size: 16px;
}

.card-vip-price {
    color: var(--vip-color);
    font-size: 12px;
}

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

.task-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
}

.task-item:hover {
    border-color: var(--accent-color);
    background: var(--bg-hover);
}

.task-info {
    flex: 1;
}

.task-title {
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 6px;
}

.task-meta {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    gap: 12px;
}

.task-budget {
    color: var(--accent-color);
    font-size: 18px;
    font-weight: 600;
}

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

.article-item {
    display: flex;
    gap: 16px;
    padding: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
}

.article-item:hover {
    border-color: var(--accent-color);
}

.article-cover {
    width: 120px;
    height: 80px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.article-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.article-title {
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 6px;
}

.article-summary {
    font-size: 13px;
    color: var(--text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-meta {
    font-size: 12px;
    color: var(--text-muted);
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 32px;
}

.pagination a, .pagination span {
    padding: 8px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
}

.pagination a:hover, .pagination .active {
    background: var(--accent-color);
    color: #fff;
    border-color: var(--accent-color);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

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

.btn-primary:hover {
    background: var(--accent-hover);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.btn-outline:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
}

.form-input, .form-textarea, .form-select {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
    outline: none;
    border-color: var(--accent-color);
}

.form-textarea {
    min-height: 100px;
    resize: vertical;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 99;
    opacity: 0;
    transition: opacity 0.3s;
    -webkit-tap-highlight-color: transparent;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

/* 移动端导航点击优化 */
@media (max-width: 768px) {
    .nav-item {
        padding: 12px 16px !important;
        -webkit-tap-highlight-color: transparent;
    }
    .nav-item:active {
        background: var(--bg-hover) !important;
    }
    .sidebar {
        transform: translateX(-100%);
        width: var(--sidebar-width) !important;
        z-index: 100 !important;
        transition: transform 0.3s ease;
    }
    
    .sidebar.mobile-open {
        transform: translateX(0);
    }
    
    .main-wrapper {
        margin-left: 0 !important;
    }
    
    .sidebar.collapsed {
        width: var(--sidebar-width) !important;
        transform: translateX(-100%);
    }
    
    .banner-section {
        grid-template-columns: 1fr;
    }
    
    .card-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .article-item {
        flex-direction: column;
    }
    
    .article-cover {
        width: 100%;
        height: 120px;
    }
    
    .tool-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .main-content {
        padding: 16px;
    }
    
    .hero-banner {
        padding: 24px;
    }
    
    .hero-title {
        font-size: 22px;
    }
    
    .hero-emoji {
        display: none;
    }
    
    .search-box {
        display: none;
    }
    
    .content-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

.main-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 32px 24px;
    margin-top: auto;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.footer-brand {
    text-align: center;
}

.footer-desc {
    color: var(--text-muted);
    font-size: 13px;
    margin-top: 6px;
}

.footer-links {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-links a {
    color: var(--text-secondary);
    font-size: 13px;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--text-primary);
}

.footer-copy {
    color: var(--text-muted);
    font-size: 12px;
    text-align: center;
}

@media (max-width: 480px) {
    .card-grid, .content-grid, .tool-grid {
        grid-template-columns: 1fr !important;
    }
}

