:root {
    --bg-main: #fff4e6;
    --bg-secondary: #ffe8cc;
    --bg-card: #ffffff;
    --bg-hover: #ffd8a8;
    --text-primary: #9a3412;
    --text-secondary: #c2410c;
    --text-muted: #ea580c;
    --primary: #ff6b35;
    --primary-dark: #f97316;
    --primary-light: #ffe8cc;
    --accent: #ff8c5a;
    --border: #ffb88c;
    --shadow: 0 3px 8px 0 rgba(255, 107, 53, 0.2), 0 2px 4px 0 rgba(255, 107, 53, 0.15);
    --shadow-md: 0 8px 16px -2px rgba(255, 107, 53, 0.25), 0 4px 8px -1px rgba(255, 107, 53, 0.15);
    --shadow-lg: 0 16px 32px -4px rgba(255, 107, 53, 0.3), 0 8px 16px -2px rgba(255, 107, 53, 0.2);
}

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

body {
    font-family: 'Open Sans', 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.75;
    display: flex;
    min-height: 100vh;
}

a {
    text-decoration: none !important;
    color: inherit;
}

.sidebar {
    width: 220px;
    background: var(--bg-card);
    border-right: 1px solid var(--border);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
    padding: 1.25rem 0;
}

.sidebar-logo {
    padding: 0 1.25rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none !important;
}

.sidebar-logo i {
    font-size: 1.5rem;
    color: var(--primary);
}

.sidebar-nav {
    padding: 0 0.5rem;
}

.sidebar-nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.875rem;
    margin-bottom: 0.25rem;
    border-radius: 8px;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.15s ease;
    cursor: pointer;
    text-decoration: none !important;
}

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

.sidebar-nav-item.active {
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 600;
}

.sidebar-nav-item i {
    width: 18px;
    text-align: center;
    font-size: 0.95rem;
}

.main-content {
    flex: 1;
    margin-left: 220px;
    min-height: 100vh;
    background: var(--bg-secondary);
    display: flex;
    flex-direction: column;
}

.top-bar {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 0.875rem 1.5rem;
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

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

.search-box input {
    width: 100%;
    padding: 0.625rem 0.875rem 0.625rem 2.5rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.9rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
    transition: all 0.15s ease;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--bg-card);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.search-box input::placeholder {
    color: var(--text-muted);
}

.search-box i {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.875rem;
}

.user-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

@media (max-width: 1024px) {
    .btn-icon {
        display: flex !important;
    }
}

.btn-icon:hover {
    background: var(--bg-hover);
    color: var(--primary);
}

.content-area {
    flex: 1;
    padding: 2rem 1.5rem;
    max-width: 1600px;
    margin: 0 auto;
    width: 100%;
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border);
}

.empty-icon {
    font-size: 4rem;
    color: var(--text-muted);
    opacity: 0.5;
    margin-bottom: 1.5rem;
}

.empty-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.empty-text {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.empty-action {
    display: inline-block;
    padding: 0.875rem 2rem;
    background: var(--primary);
    color: white;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.2s ease;
    text-decoration: none !important;
}

.empty-action:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.empty-state-inline {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: var(--shadow);
    min-height: 200px;
    justify-content: center;
}

.empty-icon-small {
    font-size: 2.5rem;
    color: var(--text-muted);
    opacity: 0.5;
    margin-bottom: 1rem;
}

.empty-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.empty-title-small {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.empty-text-small {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0;
}

.empty-action-small {
    display: inline-block;
    padding: 0.625rem 1.25rem;
    background: var(--primary);
    color: white;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    text-decoration: none !important;
    margin-top: 0.5rem;
}

.empty-action-small:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.home-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

@media (max-width: 1400px) {
    .categories-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1024px) {
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    transition: all 0.2s ease;
    box-shadow: var(--shadow);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.stat-icon {
    width: 56px;
    height: 56px;
    background: var(--primary-light);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.5rem;
}

.stat-info {
    flex: 1;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.home-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
}

.home-main {
    min-width: 0;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    margin-top: 2.5rem;
}

.section-header:first-child {
    margin-top: 0;
}

.section-title {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--text-primary);
}

.view-all-link {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    transition: gap 0.15s ease;
    text-decoration: none !important;
}

.view-all-link:hover {
    gap: 0.5rem;
}

.games-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 2.5rem;
}

@media (max-width: 1400px) {
    .games-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1024px) {
    .games-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

.game-box {
    background: var(--bg-card);
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.2s ease;
    cursor: pointer;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow);
    text-decoration: none !important;
}

.game-box:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.game-cover {
    width: 100%;
    aspect-ratio: 4/3;
    background: var(--bg-secondary);
    position: relative;
    overflow: hidden;
}

.game-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.game-box:hover .game-cover img {
    transform: scale(1.05);
}

.bookmark-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.15s ease;
    box-shadow: var(--shadow);
    z-index: 10;
}

.bookmark-btn:hover {
    background: white;
    color: var(--primary);
    transform: scale(1.1);
}

.bookmark-btn.saved {
    background: var(--primary);
    color: white;
}

.game-details {
    padding: 0.875rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.game-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
    text-decoration: none !important;
}

.game-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: auto;
    font-size: 0.8rem;
    flex-wrap: wrap;
}

.stars {
    color: var(--accent);
    font-size: 0.75rem;
    letter-spacing: 1px;
}

.rating-value {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.8rem;
}


.player-num {
    color: var(--text-muted);
    font-size: 0.75rem;
}

/* 移动端游戏评分垂直排列 */
@media (max-width: 480px) {
    .game-rating {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 0.25rem !important;
    }
    
    .game-rating .player-num {
        margin-top: 0.25rem !important;
        display: block !important;
        width: 100%;
    }
}

.home-sidebar {
    position: sticky;
    top: 80px;
    height: fit-content;
}

.sidebar-widget {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.25rem;
    margin-bottom: 1.25rem;
}

.widget-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.quick-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.quick-link-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.75rem;
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: all 0.15s ease;
    text-decoration: none !important;
}

.quick-link-item:hover {
    background: var(--bg-hover);
    color: var(--primary);
}

.quick-link-item i {
    width: 18px;
    text-align: center;
    color: var(--primary);
}

.category-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.category-item-small {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.625rem 0.75rem;
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.875rem;
    transition: all 0.15s ease;
    text-decoration: none !important;
}

.category-item-small:hover {
    background: var(--bg-hover);
    color: var(--primary);
}

.category-item-small span:first-child {
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.category-item-small i {
    color: var(--primary);
    font-size: 0.875rem;
}

.category-count {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.page-container {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border);
}

.page-heading {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.page-description {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

.footer-section {
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    padding: 2.5rem 1.5rem;
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
    max-width: 1600px;
}

@media (max-width: 1400px) {
    .popular-games-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1024px) {
    .popular-games-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}
    margin-left: auto;
    margin-right: auto;
}

.footer-title {
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.875rem;
    font-size: 1rem;
}

.footer-link {
    display: block;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    transition: color 0.15s ease;
    font-size: 0.875rem;
    text-decoration: none !important;
}

.footer-link:hover {
    color: var(--primary);
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.875rem;
    max-width: 1600px;
    margin: 0 auto;
}

.scroll-up {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 44px;
    height: 44px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    box-shadow: var(--shadow-lg);
    transition: all 0.2s ease;
    opacity: 0;
    visibility: hidden;
    z-index: 999;
}

.scroll-up.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-up:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2.5rem;
    padding: 1.5rem 0;
    flex-wrap: wrap;
}

.pagination-btn {
    min-width: 40px;
    height: 40px;
    padding: 0 0.875rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none !important;
}

.pagination-btn:hover:not(:disabled):not(.active) {
    background: var(--bg-hover);
    border-color: var(--primary);
    color: var(--primary);
}

.pagination-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    font-weight: 600;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-btn i {
    font-size: 0.85rem;
}

.pagination-info {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin: 0 0.5rem;
}

@media (max-width: 1200px) {
    .home-layout {
        grid-template-columns: 1fr;
    }

    .home-sidebar {
        position: static;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1.25rem;
    }
}

@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 100;
        position: fixed;
        height: 100vh;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0 !important;
        width: 100%;
    }

    .top-bar {
        padding: 0.75rem 1rem;
    }

    .games-list {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 0.875rem;
    }
    
    .btn-icon {
        display: flex !important;
    }
}

@media (max-width: 768px) {
    .content-area {
        padding: 1rem;
    }

    .page-heading {
        font-size: 1.75rem;
    }

    .home-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .stat-card {
        padding: 1rem;
        gap: 1rem;
    }
    
    .stat-icon {
        width: 48px;
        height: 48px;
        font-size: 1.25rem;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
    
    .stat-label {
        font-size: 0.875rem;
    }
    
    .games-list {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 0.75rem;
        margin-bottom: 1.5rem;
    }
    
    .game-box {
        border-radius: 8px;
    }
    
    .game-details {
        padding: 0.75rem;
    }
    
    .game-name {
        font-size: 0.8125rem;
        margin-bottom: 0.375rem;
    }
    
    .game-rating {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
        font-size: 0.75rem;
    }
    
    .stars {
        font-size: 0.7rem;
    }
    
    .rating-value {
        font-size: 0.75rem;
    }
    
    .player-num {
        font-size: 0.7rem;
        margin-top: 0.25rem;
    }
    
    .section-header {
        margin-bottom: 1rem;
    }
    
    .section-title {
        font-size: 1.25rem;
    }
    
    .top-bar {
        padding: 0.75rem 1rem;
    }
    
    .search-box {
        max-width: none;
    }
    
    .search-box input {
        font-size: 0.875rem;
        padding: 0.5rem 0.75rem 0.5rem 2.25rem;
    }
    
    .home-layout {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .home-sidebar {
        position: static;
    }
    
    .sidebar-widget {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .widget-title {
        font-size: 1rem;
        margin-bottom: 0.75rem;
    }
}

.legal-content {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 2.5rem;
    border: 1px solid var(--border);
    max-width: 900px;
    margin: 0 auto;
}

.legal-content h1 {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.legal-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.legal-content p {
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 1.05rem;
    margin-bottom: 1.5rem;
}

.legal-content a {
    color: var(--primary);
    text-decoration: none !important;
    transition: color 0.15s ease;
}

.legal-content a:hover {
    color: var(--primary-dark);
    text-decoration: underline !important;
}

.legal-content strong {
    color: var(--text-primary);
    font-weight: 600;
}

@media (max-width: 768px) {
    .legal-content {
        padding: 1.5rem;
    }

    .legal-content h1 {
        font-size: 1.75rem;
    }

    .legal-content h2 {
        font-size: 1.25rem;
    }

    .legal-content p {
        font-size: 1rem;
    }
}



    
    .section,
    .games-section {
        margin-bottom: 2rem !important;
    }
    
    .games-grid,
    .featured-grid {
        gap: 0.75rem !important;
    }
    
    .item-info,
    .game-card-content {
        padding: 0.875rem 0.75rem !important;
    }
    
    .section-title {
        margin-bottom: 0.75rem !important;
    }
}


/* ============================================
   移动端完整优化 (480px及以下)
   ============================================ */
@media (max-width: 480px) {
    /* 侧边栏移动端优化 */
    .sidebar {
        width: 280px;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    }
    
    .sidebar-logo {
        padding: 0 1rem;
        margin-bottom: 1.5rem;
        font-size: 1.1rem;
    }
    
    .sidebar-logo img {
        height: 32px !important;
    }
    
    .sidebar-nav-item {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }
    
    /* 主内容区域 */
    .main-content {
        margin-left: 0 !important;
    }
    
    .content-area {
        padding: 0.75rem !important;
    }
    
    /* 顶部栏 */
    .top-bar {
        padding: 0.625rem 0.75rem !important;
        min-height: 56px;
    }
    
    .search-box {
        flex: 1;
        min-width: 0;
    }
    
    .search-box input {
        font-size: 0.875rem !important;
        padding: 0.5rem 0.625rem 0.5rem 2rem !important;
    }
    
    .search-box i {
        left: 0.625rem;
        font-size: 0.8rem;
    }
    
    .btn-icon {
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
        flex-shrink: 0;
    }
    
    /* 统计卡片 */
    .home-stats {
        grid-template-columns: 1fr !important;
        gap: 0.75rem !important;
        margin-bottom: 1rem !important;
    }
    
    .stat-card {
        padding: 0.875rem !important;
        gap: 0.75rem !important;
    }
    
    .stat-icon {
        width: 44px !important;
        height: 44px !important;
        font-size: 1.1rem !important;
    }
    
    .stat-value {
        font-size: 1.25rem !important;
    }
    
    .stat-label {
        font-size: 0.8125rem !important;
    }
    
    /* 游戏列表 */
    .games-list {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.625rem !important;
        margin-bottom: 1.25rem !important;
    }
    
    .game-box {
        border-radius: 8px !important;
    }
    
    .game-cover {
        aspect-ratio: 4/3;
    }
    
    .game-details {
        padding: 0.625rem !important;
    }
    
    .game-name {
        font-size: 0.75rem !important;
        margin-bottom: 0.375rem !important;
        line-height: 1.3 !important;
    }
    
    .game-rating {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 0.25rem !important;
        font-size: 0.7rem !important;
        margin-top: auto;
    }
    
    .stars {
        font-size: 0.65rem !important;
    }
    
    .rating-value {
        font-size: 0.7rem !important;
    }
    
    .player-num {
        font-size: 0.65rem !important;
        margin-top: 0.25rem !important;
        display: block !important;
    }
    
    .bookmark-btn {
        width: 28px !important;
        height: 28px !important;
        top: 0.375rem !important;
        right: 0.375rem !important;
    }
    
    /* 章节标题 */
    .section-header {
        margin-bottom: 0.75rem !important;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .section-title {
        font-size: 1.1rem !important;
        margin-bottom: 0 !important;
    }
    
    .view-all-link {
        font-size: 0.8125rem !important;
    }
    
    /* 侧边栏小部件 */
    .home-sidebar {
        margin-top: 1rem;
    }
    
    .sidebar-widget {
        padding: 0.875rem !important;
        margin-bottom: 0.875rem !important;
    }
    
    .widget-title {
        font-size: 0.9375rem !important;
        margin-bottom: 0.625rem !important;
    }
    
    .quick-link-item {
        padding: 0.625rem 0.75rem !important;
        font-size: 0.8125rem !important;
    }
    
    .category-item-link {
        padding: 0.5rem 0.75rem !important;
        font-size: 0.8125rem !important;
    }
    
    /* 页脚 */
    .footer-section {
        padding: 1.5rem 1rem !important;
    }
    
    .footer-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }
    
    .footer-title {
        font-size: 1rem !important;
        margin-bottom: 0.75rem !important;
    }
    
    .footer-link {
        font-size: 0.875rem !important;
        padding: 0.375rem 0 !important;
    }
    
    /* 滚动到顶部按钮 */
    .scroll-up {
        width: 44px !important;
        height: 44px !important;
        bottom: 1rem !important;
        right: 1rem !important;
    }
    
    /* 空状态 */
    .empty-state {
        padding: 2rem 1rem !important;
    }
    
    .empty-icon {
        font-size: 3rem !important;
        margin-bottom: 1rem !important;
    }
    
    .empty-title {
        font-size: 1.25rem !important;
    }
    
    .empty-text {
        font-size: 0.875rem !important;
    }
    
    /* 导航栏完整修复 */
    /* 导航栏容器 */
    .top-nav,
    .nav-bar,
    .header,
    .site-header {
        padding: 0.5rem 0.75rem !important;
        min-height: 56px;
    }
    
    /* 导航栏包装器 - 关键修复 */
    .nav-wrapper,
    .header-container,
    .nav-content,
    .header-inner {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 0.5rem !important;
        flex-wrap: nowrap !important;
    }
    
    /* Logo和品牌 - 左侧 */
    .brand,
    .site-logo,
    .logo-wrapper,
    .brand-logo,
    .logo {
        display: flex !important;
        align-items: center !important;
        gap: 0.5rem !important;
        font-size: 0.875rem !important;
        font-weight: 600;
        flex: 0 1 auto !important;
        min-width: 0;
        max-width: calc(100% - 50px);
        overflow: hidden;
    }
    
    .brand span,
    .site-logo span,
    .logo-wrapper span,
    .brand-logo span,
    .logo span {
        font-size: 0.875rem !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .brand img,
    .site-logo img,
    .logo-wrapper img,
    .brand-logo img,
    .logo img {
        height: 28px !important;
        width: auto !important;
        flex-shrink: 0;
    }
    
    /* 搜索框优化（runloot.org使用顶部搜索框，不隐藏） */
    .search-box {
        flex: 1 !important;
        min-width: 0 !important;
        max-width: none !important;
    }
    
    .search-box input {
        font-size: 0.875rem !important;
        padding: 0.5rem 0.625rem 0.5rem 2rem !important;
    }
    
    /* 导航菜单 - 隐藏 */
    .nav-menu,
    .nav-links,
    .site-nav,
    .nav-actions,
    nav > ul {
        display: none !important;
    }
    
    /* 移动菜单按钮 - 右侧显示 */
    .mobile-menu-btn,
    .mobile-menu-toggle,
    .menu-toggle {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
        min-height: 40px !important;
        padding: 0 !important;
        margin: 0 !important;
        flex-shrink: 0 !important;
        background: transparent !important;
        border: none !important;
        cursor: pointer;
        z-index: 1001;
        order: 999;
    }
    
    .mobile-menu-btn span,
    .menu-toggle span {
        display: block;
        width: 22px;
        height: 2px;
        background: currentColor;
        margin: 3px 0;
        transition: all 0.3s;
    }
    
    /* 移动菜单中的搜索框 */
    .mobile-nav .search-wrapper,
    .mobile-nav .search-container,
    .mobile-menu .search-wrapper {
        display: flex !important;
        width: 100% !important;
        padding: 0.75rem 1rem !important;
        margin: 0 !important;
        border-bottom: 1px solid var(--border, rgba(255, 255, 255, 0.1)) !important;
        gap: 0.5rem !important;
        box-sizing: border-box !important;
    }
    
    .mobile-nav .search-input,
    .mobile-menu .search-input {
        flex: 1 !important;
        padding: 0.625rem 0.75rem !important;
        font-size: 14px !important;
        border-radius: 6px !important;
        border: 1px solid var(--border, rgba(255, 255, 255, 0.2)) !important;
        background: rgba(255, 255, 255, 0.1) !important;
        color: var(--text-main, #ffffff) !important;
        min-height: 44px !important;
        box-sizing: border-box !important;
    }
    
    .mobile-nav .search-btn,
    .mobile-menu .search-btn {
        padding: 0.625rem 1rem !important;
        min-width: 44px !important;
        min-height: 44px !important;
        flex-shrink: 0 !important;
    }
}

/* ============================================
   中等屏幕导航栏优化 (768px及以下)
   ============================================ */
@media (max-width: 768px) {
    .top-nav,
    .nav-bar,
    .header,
    .site-header {
        padding: 0.75rem 1rem;
    }
    
    .nav-wrapper,
    .header-container,
    .nav-content,
    .header-inner {
        padding: 0;
        gap: 1rem;
    }
    
    .brand,
    .site-logo,
    .logo-wrapper,
    .brand-logo,
    .logo {
        font-size: 1rem !important;
    }
    
    .brand img,
    .site-logo img,
    .logo-wrapper img,
    .brand-logo img,
    .logo img {
        height: 32px !important;
    }
    
    .search-wrapper,
    .search-container {
        max-width: 200px;
        flex: 0 1 auto;
    }
    
    .nav-menu,
    .nav-links,
    .site-nav {
        display: none;
    }
    
    .mobile-menu-btn,
    .menu-toggle {
        display: flex !important;
    }
}
