/*
Theme Name: NextAICoder
Theme URI: https://nextaicoder.com
Description: 智能编程工具资讯网站主题
Author: NextAICoder Team
Author URI: https://nextaicoder.com
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: nextaicoder
Tags: ai, coding, programming, technology, responsive, modern
*/

/* Import main CSS file */
@import url('css/main.css');

/* Reading Progress Bar */
.reading-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background-color: #f0f0f0;
    z-index: 9999;
    display: none;
}

.reading-progress-bar .progress {
    height: 100%;
    background-color: #0073aa;
    width: 0%;
    transition: width 0.1s ease;
}

/* Search Suggestions */
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 999;
    max-height: 300px;
    overflow-y: auto;
    display: none;
}

.search-suggestions ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.search-suggestions li {
    border-bottom: 1px solid #f0f0f0;
}

.search-suggestions li:last-child {
    border-bottom: none;
}

.search-suggestions a {
    display: block;
    padding: 12px;
    color: #333;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.search-suggestions a:hover {
    background-color: #f5f5f5;
}

.search-suggestions h4 {
    margin: 0 0 4px;
    font-size: 16px;
    font-weight: 600;
}

.search-suggestion-type {
    font-size: 12px;
    color: #0073aa;
    margin-bottom: 4px;
    display: inline-block;
}

.search-suggestion-excerpt {
    margin: 0;
    font-size: 14px;
    color: #666;
    line-height: 1.4;
}

/* Infinite Scroll */
.infinite-scroll-loading {
    text-align: center;
    padding: 20px;
    color: #666;
    font-size: 14px;
}

/* Table of Contents Active Link */
.table-of-contents a.active {
    font-weight: 600;
    color: #0073aa;
}

/* Mobile Menu */
/* Removed duplicate mobile-menu-toggle styles, using .menu-toggle from main.css instead */

@media (max-width: 768px) {
    .main-navigation ul.menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: #fff;
        border: 1px solid #e0e0e0;
        border-radius: 4px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        z-index: 999;
    }
    
    .main-navigation ul.menu.show {
        display: block;
    }
    
    .main-navigation ul.menu > li {
        display: block;
        margin: 0;
    }
    
    .main-navigation ul.menu > li > a {
        display: block;
        padding: 12px 20px;
        border-bottom: 1px solid #f0f0f0;
    }
    
    .main-navigation ul.menu > li:last-child > a {
        border-bottom: none;
    }
    
    /* Reading Mode for Mobile */
    body.reading-mode {
        background-color: #fff;
        font-size: 18px;
        line-height: 1.8;
    }
    
    body.reading-mode .site-header,
    body.reading-mode .site-sidebar,
    body.reading-mode .site-footer {
        display: none;
    }
    
    body.reading-mode .content-area {
        margin: 0;
        padding: 20px;
        max-width: 100%;
    }
}

/* Lazy Loading */
img.lazyload {
    opacity: 0;
    transition: opacity 0.3s ease;
}

img.lazyload.loaded {
    opacity: 1;
}

/* Critical CSS */
.critical-css {
    display: none;
}

/* CDN Images */
.cdn-image {
    transition: opacity 0.3s ease;
}

/* Reading Progress Bar */
@media (max-width: 768px) {
    .reading-progress-bar {
        height: 3px;
    }
}

/* Mobile View */
body.mobile-view {
    font-size: 16px;
}

body.mobile-view .post-content {
    padding: 15px 0;
}

body.mobile-view .post-thumbnail img {
    width: 100%;
    height: auto;
}

/* Reading Progress Bar */
body.single-post-page .reading-progress-bar {
    display: block;
}

