/* ==========================================
   Sudoku Guide - 文章样式表
   用于 sudoku-guide 目录下的所有文章页面
   ========================================== */

/* ==========================================
   文章内容区布局
   ========================================== */
.guide-content {
    max-width: 100%;
    margin: 0 auto;
    padding: 15px;
}

/* ==========================================
   文章头部样式
   ========================================== */
.guide-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px 30px;
    border-radius: 15px;
    margin-bottom: 30px;
}

.guide-category {
    display: inline-block;
    padding: 5px 15px;
    background: rgba(255,255,255,0.2);
    border-radius: 20px;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.guide-title {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 15px;
    line-height: 1.4;
}

.guide-meta {
    opacity: 0.9;
    font-size: 0.95rem;
}

/* ==========================================
   文章正文样式
   ========================================== */
.guide-body {
    background: var(--bg-primary);
    border-radius: 15px;
    padding: 40px 30px;
    line-height: 1.8;
    color: var(--text-primary);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.guide-body h2 {
    color: #764ba2;
    font-size: 1.5rem;
    font-weight: bold;
    margin-top: 35px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
}

.guide-body h3 {
    color: #764ba2;
    font-size: 1.2rem;
    font-weight: bold;
    margin-top: 25px;
    margin-bottom: 12px;
}

.guide-body p {
    margin-bottom: 15px;
}

.guide-body ul,
.guide-body ol {
    margin-bottom: 20px;
    padding-left: 25px;
}

.guide-body li {
    margin-bottom: 8px;
}

.guide-body a:not(.btn) {
    color: #667eea;
}

.guide-body a:not(.btn):hover {
    color: #764ba2;
}

/* ==========================================
   特殊盒子样式（提示、警告等）
   ========================================== */
.highlight-box {
    background: #f0f9ff;
    border-left: 4px solid #667eea;
    padding: 20px;
    margin: 20px 0;
    border-radius: 8px;
}

.tip-box {
    background: #ecfdf5;
    border-left: 4px solid #10b981;
    padding: 20px;
    margin: 20px 0;
    border-radius: 8px;
}

.warning-box {
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
    padding: 20px;
    margin: 20px 0;
    border-radius: 8px;
}

/* 深色主题适配 */
.theme-dark .highlight-box {
    background: rgba(102, 126, 234, 0.1);
}

.theme-dark .tip-box {
    background: rgba(16, 185, 129, 0.1);
}

.theme-dark .warning-box {
    background: rgba(245, 158, 11, 0.1);
}

/* ==========================================
   导航链接按钮
   ========================================== */
.nav-link-btn,
.guide-body .nav-link {
    display: inline-block;
    padding: 12px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white !important;
    text-decoration: none;
    border-radius: 8px;
    margin-top: 20px;
    margin-right: 10px;
    transition: all 0.3s ease;
}

.nav-link-btn:hover,
.guide-body .nav-link:hover {
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* ==========================================
   图片和图片说明
   ========================================== */
.image-container {
    text-align: center;
    margin: 25px 0;
}

.image-container img {
    max-width: 500px;
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.image-caption {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 10px;
}

/* ==========================================
   数独坐标和数字标记
   ========================================== */
.coord {
    font-family: monospace;
    background: #f3f4f6;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: bold;
    color: #667eea;
}

.number {
    font-family: monospace;
    background: #fef3c7;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: bold;
    color: #92400e;
}

.theme-dark .coord {
    background: #374151;
}

.theme-dark .number {
    background: #78350f;
    color: #fef3c7;
}

/* ==========================================
   比较表格
   ========================================== */
.comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.comparison-table th,
.comparison-table td {
    border: 1px solid var(--border-color);
    padding: 12px 15px;
    text-align: left;
}

.comparison-table th {
    background: var(--bg-secondary);
    font-weight: bold;
    color: #667eea;
}

.comparison-table tr:nth-child(even) {
    background: var(--bg-secondary);
}

/* ==========================================
   技巧卡片（用于技巧目录页）
   ========================================== */
.technique-card {
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
    background: var(--bg-primary);
}

.technique-card:hover {
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.2);
    border-color: #667eea;
}

.technique-card h4 {
    color: var(--text-primary);
    font-weight: bold;
    margin-bottom: 10px;
}

.technique-card p {
    color: var(--text-secondary);
    margin-bottom: 0;
    font-size: 0.95rem;
}

.technique-card a {
    color: #667eea;
    text-decoration: none;
}

.technique-card a:hover {
    text-decoration: underline;
}

/* ==========================================
   难度等级标签
   ========================================== */
.level-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-left: 10px;
}

.level-basic {
    background: #dcfce7;
    color: #166534;
}

.level-intermediate {
    background: #fef3c7;
    color: #92400e;
}

.level-advanced {
    background: #fee2e2;
    color: #991b1b;
}

.coming-soon {
    color: var(--text-secondary);
    font-style: italic;
}

/* ==========================================
   文章列表卡片（用于首页）
   ========================================== */
.post-card {
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    background: var(--bg-primary);
}

.post-card:hover {
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.2);
    transform: translateY(-2px);
    border-color: #667eea;
}

/* ==========================================
   特色文章（推荐/必读）样式
   ========================================== */
.post-featured {
    position: relative;
    border: 2px solid #667eea;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.15);
}

.post-featured::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px 8px 0 0;
}

.post-featured:hover {
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
    transform: translateY(-3px);
}

.featured-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 15px;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
    animation: pulse-glow 2s ease-in-out infinite;
}

.featured-badge i {
    color: #ffd700;
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
    }
    50% {
        box-shadow: 0 2px 15px rgba(102, 126, 234, 0.6);
    }
}

/* 深色主题适配 */
.theme-dark .post-featured {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
}

/* ==========================================
   文章分类标签
   ========================================== */
.post-category {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.category-tips {
    background: #dbeafe;
    color: #1e40af;
}

.category-knowledge {
    background: #dcfce7;
    color: #166534;
}

.category-news {
    background: #fef3c7;
    color: #92400e;
}

.category-health {
    background: #fed7aa;
    color: #9a3412;
}

.category-guide {
    background: #e0e7ff;
    color: #3730a3;
}

/* ==========================================
   文章标题和元信息
   ========================================== */
.post-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.post-title a {
    color: #667eea;
    text-decoration: none;
}

.post-title a:hover {
    color: #764ba2;
    text-decoration: underline;
}

.post-meta {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.post-excerpt {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ==========================================
   返回链接
   ========================================== */
.back-link {
    display: inline-block;
    padding: 12px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white !important;
    text-decoration: none;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.back-link:hover {
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* ==========================================
   分析步骤样式（用于技巧讲解）
   ========================================== */
.analysis-step {
    background: var(--bg-secondary);
    border-radius: 8px;
    padding: 15px;
    margin: 10px 0;
}

.analysis-step strong {
    color: #667eea;
}

.step-number {
    display: inline-block;
    width: 24px;
    height: 24px;
    background: #667eea;
    color: white;
    border-radius: 50%;
    text-align: center;
    line-height: 24px;
    font-size: 0.85rem;
    margin-right: 8px;
}

/* step-box 内的年份样式（如 2004, 2005 等） */
.step-box .step-number {
    width: auto;
    min-width: 50px;
    padding: 0 10px;
    border-radius: 4px;
    font-weight: 600;
}

/* ==========================================
   响应式布局
   ========================================== */
/* ==========================================
   面包屑导航
   ========================================== */
.guide-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 20px;
    background: var(--bg-secondary);
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.guide-breadcrumb a {
    color: #667eea;
    text-decoration: none;
    transition: color 0.2s;
}

.guide-breadcrumb a:hover {
    color: #764ba2;
    text-decoration: underline;
}

.guide-breadcrumb .separator {
    color: var(--text-secondary);
    opacity: 0.5;
}

.guide-breadcrumb .current {
    color: var(--text-secondary);
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 300px;
}

/* ==========================================
   响应式布局
   ========================================== */
@media (max-width: 991px) {
    .guide-content {
        padding: 20px 15px;
    }

    .guide-header {
        padding: 30px 20px;
    }

    .guide-title {
        font-size: 1.5rem;
    }

    .guide-body {
        padding: 25px 20px;
    }

    .guide-breadcrumb {
        padding: 10px 15px;
        font-size: 0.85rem;
    }

    .guide-breadcrumb .current {
        max-width: 150px;
    }
}
