/* ============================================
   767股票学习网 - 主样式表
   仿照 net767.com 经典股票学习网站风格
   ============================================ */

/* Reset & Base */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
    font-size: 14px;
    color: #333;
    background: #f5f5f5;
    line-height: 1.8;
}
a { color: #333; text-decoration: none; }
a:hover { color: #c00; text-decoration: underline; }
ul, ol { list-style: none; }
img { max-width: 100%; border: 0; }

/* Container */
.container { width: 1200px; margin: 0 auto; }

/* ===== Header ===== */
.header { background: #fff; border-bottom: 3px solid #c00; }
.header-top {
    background: #f8f8f8;
    border-bottom: 1px solid #e5e5e5;
    padding: 5px 0;
    font-size: 12px;
    color: #999;
}
.header-top .container { display: flex; justify-content: space-between; }
.header-top a { color: #666; margin-left: 15px; }
.header-top a:hover { color: #c00; }

.logo-area {
    padding: 15px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.logo {
    font-size: 28px;
    font-weight: bold;
    color: #c00;
    text-decoration: none;
}
.logo span { color: #333; font-size: 16px; margin-left: 10px; }
.logo:hover { text-decoration: none; color: #c00; }

.search-box { display: flex; }
.search-box input[type="text"] {
    width: 250px;
    height: 36px;
    border: 2px solid #c00;
    padding: 0 10px;
    font-size: 14px;
    outline: none;
    border-radius: 3px 0 0 3px;
}
.search-box button {
    height: 36px;
    padding: 0 20px;
    background: #c00;
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 14px;
    border-radius: 0 3px 3px 0;
}
.search-box button:hover { background: #a00; }

/* Navigation */
.nav { background: #c00; }
.nav ul { display: flex; flex-wrap: wrap; }
.nav ul li { position: relative; }
.nav ul li a {
    display: block;
    padding: 10px 18px;
    color: #fff;
    font-size: 15px;
    text-decoration: none;
    transition: background 0.2s;
}
.nav ul li a:hover,
.nav ul li.active a { background: #a00; color: #fff; }

/* ===== Main Content ===== */
.main { padding: 15px 0; }
.main-content { display: flex; gap: 15px; }
.content-left { flex: 1; min-width: 0; }
.sidebar { width: 300px; flex-shrink: 0; }

/* Section Box */
.section-box {
    background: #fff;
    margin-bottom: 15px;
    border: 1px solid #e5e5e5;
}
.section-header {
    background: linear-gradient(to bottom, #f8f8f8, #eee);
    border-bottom: 2px solid #c00;
    padding: 8px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.section-header h2 {
    font-size: 16px;
    color: #c00;
    font-weight: bold;
}
.section-header .more { font-size: 12px; color: #999; }
.section-header .more:hover { color: #c00; }
.section-body { padding: 10px 15px; }

/* Article List */
.article-list { }
.article-list li {
    padding: 6px 0;
    border-bottom: 1px dashed #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.article-list li:last-child { border-bottom: none; }
.article-list li a {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding-left: 15px;
    position: relative;
}
.article-list li a::before {
    content: "◆";
    position: absolute;
    left: 0;
    color: #c00;
    font-size: 8px;
    top: 2px;
}
.article-list li .date {
    color: #999;
    font-size: 12px;
    margin-left: 10px;
    flex-shrink: 0;
}

/* Featured / Banner */
.featured-section {
    background: #fff;
    border: 1px solid #e5e5e5;
    margin-bottom: 15px;
    padding: 15px;
}
.featured-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}
.featured-item {
    padding: 10px;
    background: #fafafa;
    border: 1px solid #f0f0f0;
    border-radius: 3px;
}
.featured-item h3 { font-size: 15px; margin-bottom: 5px; }
.featured-item h3 a { color: #333; }
.featured-item h3 a:hover { color: #c00; }
.featured-item p { color: #666; font-size: 13px; line-height: 1.6; }

/* Category Grid (Homepage) */
.category-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

/* Article Detail */
.article-detail { background: #fff; border: 1px solid #e5e5e5; }
.article-title {
    text-align: center;
    padding: 20px 20px 10px;
    border-bottom: 1px solid #eee;
}
.article-title h1 { font-size: 22px; color: #333; line-height: 1.4; }
.article-meta {
    padding: 8px 0;
    color: #999;
    font-size: 13px;
}
.article-meta span { margin: 0 10px; }
.article-content {
    padding: 20px 30px;
    line-height: 2;
    font-size: 15px;
}
.article-content h2 {
    font-size: 18px;
    color: #c00;
    margin: 20px 0 10px;
    padding-left: 10px;
    border-left: 3px solid #c00;
}
.article-content h3 {
    font-size: 16px;
    color: #333;
    margin: 15px 0 8px;
}
.article-content p { margin-bottom: 12px; text-indent: 2em; }
.article-content ul, .article-content ol {
    margin: 10px 0 10px 30px;
}
.article-content ul { list-style: disc; }
.article-content ol { list-style: decimal; }
.article-content li { margin-bottom: 5px; }
.article-content dl { margin: 10px 0; }
.article-content dt { font-weight: bold; margin-top: 10px; }
.article-content dd { padding-left: 20px; margin-bottom: 5px; color: #555; }
.article-content strong { color: #c00; }

/* Article Navigation */
.article-nav {
    padding: 15px 30px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    font-size: 13px;
}
.article-nav a { color: #06c; }
.article-nav a:hover { color: #c00; }

/* Sidebar Widgets */
.widget { margin-bottom: 15px; }
.widget .section-header h3 {
    font-size: 15px;
    color: #c00;
    font-weight: bold;
}
.widget-list li {
    padding: 5px 0;
    border-bottom: 1px dashed #eee;
}
.widget-list li:last-child { border-bottom: none; }
.widget-list li a {
    display: block;
    padding-left: 15px;
    position: relative;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.widget-list li a::before {
    content: "▸";
    position: absolute;
    left: 0;
    color: #c00;
}
.widget-list .rank-num {
    display: inline-block;
    width: 20px;
    height: 20px;
    line-height: 20px;
    text-align: center;
    background: #ddd;
    color: #fff;
    font-size: 12px;
    margin-right: 8px;
    border-radius: 2px;
}
.widget-list .rank-1, .widget-list .rank-2, .widget-list .rank-3 { background: #c00; }

/* Quick Nav */
.quick-nav { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.quick-nav a {
    display: block;
    padding: 8px;
    text-align: center;
    background: #f8f8f8;
    border: 1px solid #eee;
    border-radius: 3px;
    font-size: 13px;
}
.quick-nav a:hover { background: #c00; color: #fff; text-decoration: none; border-color: #c00; }

/* Pagination */
.pagination { text-align: center; padding: 20px 0; }
.pagination a, .pagination span {
    display: inline-block;
    padding: 5px 12px;
    margin: 0 3px;
    border: 1px solid #ddd;
    color: #333;
    font-size: 13px;
}
.pagination a:hover { background: #c00; color: #fff; border-color: #c00; text-decoration: none; }
.pagination .current { background: #c00; color: #fff; border-color: #c00; }
.pagination .dots { border: none; padding: 5px 8px; }

/* Breadcrumb */
.breadcrumb {
    background: #fff;
    padding: 10px 15px;
    margin-bottom: 15px;
    border: 1px solid #e5e5e5;
    font-size: 13px;
    color: #999;
}
.breadcrumb a { color: #06c; }
.breadcrumb a:hover { color: #c00; }

/* ===== Footer ===== */
.footer {
    background: #333;
    color: #999;
    padding: 25px 0;
    text-align: center;
    margin-top: 15px;
}
.footer p { margin-bottom: 5px; font-size: 13px; }
.footer a { color: #ccc; }
.footer a:hover { color: #fff; }
.footer .links { margin: 10px 0; }
.footer .links a { margin: 0 10px; }

/* Category Page Header */
.category-header {
    background: #fff;
    padding: 15px;
    margin-bottom: 15px;
    border: 1px solid #e5e5e5;
}
.category-header h1 {
    font-size: 20px;
    color: #c00;
    border-bottom: 2px solid #c00;
    padding-bottom: 10px;
}

/* Search Results */
.search-result-item {
    padding: 15px;
    border-bottom: 1px solid #eee;
}
.search-result-item h3 { font-size: 16px; margin-bottom: 5px; }
.search-result-item h3 a { color: #06c; }
.search-result-item h3 a:hover { color: #c00; }
.search-result-item p { color: #666; font-size: 13px; }
.search-keyword { color: #c00; font-weight: bold; }

/* Notice */
.notice {
    background: #fffbe6;
    border: 1px solid #ffe58f;
    padding: 10px 15px;
    margin-bottom: 15px;
    font-size: 13px;
    color: #666;
    border-radius: 3px;
}
.notice strong { color: #c00; }

/* Responsive adjustments */
@media (max-width: 1220px) {
    .container { width: 100%; padding: 0 10px; }
}
@media (max-width: 768px) {
    .main-content { flex-direction: column; }
    .sidebar { width: 100%; }
    .nav ul li a { padding: 8px 12px; font-size: 13px; }
    .category-grid { grid-template-columns: 1fr; }
    .featured-grid { grid-template-columns: 1fr; }
    .logo { font-size: 22px; }
}

/* 访客统计 */
.visit-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    padding: 10px 15px;
    margin-bottom: 15px;
    background: linear-gradient(135deg, #f5f7fa, #e8ecf1);
    border-radius: 6px;
    font-size: 13px;
    color: #555;
}
.visit-stats strong {
    color: #c62828;
    font-size: 15px;
    margin: 0 2px;
}

/* 书籍标签列表 */
.book-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 0 10px 0;
    margin-bottom: 10px;
    border-bottom: 1px dashed #eee;
}
.book-tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    background: #fff8f0;
    border: 1px solid #ffe0b2;
    border-radius: 4px;
    color: #c62828;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.2s;
    white-space: nowrap;
}
.book-tag:hover {
    background: #c62828;
    color: #fff;
    border-color: #c62828;
}
.book-tag:hover .book-count {
    background: rgba(255,255,255,0.3);
    color: #fff;
}
.book-count {
    display: inline-block;
    margin-left: 5px;
    padding: 1px 5px;
    background: #ffe0b2;
    border-radius: 3px;
    font-size: 11px;
    color: #999;
}
