/*
Theme: 育辞课
Author: 蛙叔
Homepage: https://www.yucike.com
Description: 小学作业本模板免费下载，A4规格直接打印
Version: 1.0
*/

* { margin: 0; padding: 0; box-sizing: border-box; list-style: none; }
body {
    font-family: "Source Han Sans SC", "思源黑体", "PingFang SC", "Microsoft YaHei", sans-serif;
    background: #FAF8F5;
    color: #333;
    font-size: 15px;
    line-height: 1.6;
}

a { color: #5A8A6C; text-decoration: none; }
a:hover { color: #4A7A5C; }

img { max-width: 100%; height: auto; }

/* ===== 顶部导航 (墨绿底) ===== */
.header { background: #5A8A6C; position: sticky; top: 0; z-index: 100; }
.header-inner { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; padding: 0 20px; height: 56px; }
.logo a { color: #fff; font-size: 20px; font-weight: 700; letter-spacing: 1px; }
.logo .subtitle { font-size: 11px; color: rgba(255,255,255,0.6); margin-left: 6px; }
.nav { display: flex; gap: 4px; }
.nav a { color: rgba(255,255,255,0.85); font-size: 13px; padding: 5px 12px; transition: background 0.2s; }
.nav a:hover { background: rgba(255,255,255,0.1); color: #fff; }

/* ===== 两栏主布局 ===== */
.wrapper { max-width: 1200px; margin: 20px auto; padding: 0 15px; display: flex; gap: 20px; align-items: flex-start; }
.main-content { flex: 1; min-width: 0; }
.sidebar { width: 300px; flex-shrink: 0; }

/* ===== 侧边栏模块 ===== */
.sidebar-box { background: #fff; border: 1px solid #e0e0e0; margin-bottom: 16px; }
.sidebar-box h3 { background: #5A8A6C; color: #fff; font-size: 14px; font-weight: 600; padding: 10px 16px; }
.sidebar-box .box-content { padding: 10px 12px; font-size: 13px; color: #555; line-height: 1.8; }

/* ===== 值得买样式-商品卡片 ===== */
.prod-card { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid #eee; }
.prod-card:last-child { border-bottom: none; }
.prod-card .pic { width: 80px; height: 80px; background: #f5f5f5; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 28px; color: #ccc; }
.prod-card .info { flex: 1; min-width: 0; }
.prod-card .title { font-size: 13px; color: #333; line-height: 1.4; margin-bottom: 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.prod-card .title a { color: #333; }
.prod-card .title a:hover { color: #5A8A6C; }
.prod-card .price-wrap { display: flex; align-items: baseline; gap: 6px; margin-bottom: 4px; }
.prod-card .price { font-size: 18px; color: #e4393c; font-weight: 700; }
.prod-card .price-note { font-size: 11px; color: #e4393c; }
.prod-card .tags { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.prod-card .tag { font-size: 11px; padding: 1px 5px; background: #fef2e8; color: #e86e19; border-radius: 2px; }
.prod-card .tag-green { background: #e8f5e9; color: #5A8A6C; }
.prod-card .bottom { display: flex; align-items: center; justify-content: space-between; }
.prod-card .source { font-size: 11px; color: #999; }
.prod-card .buy-btn { font-size: 12px; color: #fff; background: #e4393c; padding: 3px 12px; border-radius: 3px; }
.prod-card .buy-btn:hover { background: #c73030; }

/* ===== 首页 ===== */
.site-intro { background: #fff; border: 1px solid #e0e0e0; padding: 24px; margin-bottom: 20px; }
.site-intro h2 { font-size: 18px; color: #333; margin-bottom: 8px; }
.site-intro p { font-size: 13px; color: #666; line-height: 1.8; }
.tool-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.tool-item { background: #fff; border: 1px solid #e0e0e0; padding: 20px 16px; text-align: center; transition: box-shadow 0.2s; }
.tool-item:hover { box-shadow: 0 2px 10px rgba(0,0,0,0.06); }
.tool-item .icon { font-size: 32px; display: block; margin-bottom: 8px; }
.tool-item h4 { font-size: 14px; color: #333; margin-bottom: 4px; font-weight: 600; }
.tool-item .desc { font-size: 12px; color: #999; margin-bottom: 10px; line-height: 1.4; }
.tool-item .btn { display: inline-block; background: #5A8A6C; color: #fff; padding: 4px 18px; font-size: 12px; }
.tool-item .btn:hover { background: #4A7A5C; }
.tool-banner {
    background: linear-gradient(135deg, #5A8A6C, #4A7A5C);
    color: #fff;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}
.tool-banner .banner-icon { font-size: 36px; flex-shrink: 0; }
.tool-banner .banner-content { flex: 1; min-width: 0; }
.tool-banner h3 { font-size: 17px; font-weight: 700; margin-bottom: 4px; }
.tool-banner p { font-size: 12px; opacity: .85; line-height: 1.5; }
.tool-banner .banner-btn {
    flex-shrink: 0;
    display: inline-block;
    background: rgba(255,255,255,.2);
    color: #fff;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: background .2s;
    white-space: nowrap;
}
.tool-banner .banner-btn:hover { background: rgba(255,255,255,.3); }
.tool-item.highlight {
    border-color: #5A8A6C;
    background: #F5FAF7;
    position: relative;
}
.tool-item.highlight .icon { font-size: 28px; }
.tool-item.highlight::after {
    content: 'NEW';
    position: absolute;
    top: -1px; right: -1px;
    background: #CC3333;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
}


/* ===== 文章列表 ===== */
.post-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.post-card { background: #fff; border: 1px solid #e0e0e0; padding: 16px; }
.post-card .preview { background: #f5f5f5; height: 120px; display: flex; align-items: center; justify-content: center; font-size: 28px; color: #5A8A6C; margin-bottom: 10px; }
.post-card h3 { font-size: 14px; margin-bottom: 5px; }
.post-card h3 a { color: #333; }
.post-card h3 a:hover { color: #5A8A6C; }
.post-card .meta { font-size: 12px; color: #aaa; margin-bottom: 10px; }
.post-card .dl-btn { display: inline-block; background: #5A8A6C; color: #fff; padding: 4px 16px; font-size: 12px; }
.post-card .dl-btn:hover { background: #4A7A5C; }

/* ===== 其他 ===== */
.page-title { font-size: 20px; font-weight: 600; color: #333; margin-bottom: 5px; }
.page-desc { font-size: 13px; color: #999; margin-bottom: 16px; }
.breadcrumb { font-size: 12px; color: #999; margin-bottom: 12px; }
.breadcrumb a { color: #5A8A6C; }

.article-box { background: #fff; border: 1px solid #e0e0e0; padding: 24px; }
.article-box h1 { font-size: 20px; font-weight: 600; margin-bottom: 8px; }
.article-box .meta { font-size: 12px; color: #999; margin-bottom: 16px; }
.article-box .pdf-view { background: #f5f5f5; min-height: 200px; display: flex; align-items: center; justify-content: center; font-size: 48px; color: #5A8A6C; margin-bottom: 16px; }
.article-box .content { font-size: 14px; line-height: 1.8; color: #555; margin-bottom: 16px; }

.download-btn { display: block; width: 100%; background: #5A8A6C; color: #fff; padding: 12px; text-align: center; font-size: 15px; font-weight: 600; }
.download-btn:hover { background: #4A7A5C; color: #fff; }

.pagination { text-align: center; margin-top: 20px; }
.pagination a, .pagination span { display: inline-block; padding: 5px 12px; margin: 0 2px; font-size: 12px; border: 1px solid #e0e0e0; background: #fff; color: #333; }
.pagination .current, .pagination a:hover { background: #5A8A6C; color: #fff; border-color: #5A8A6C; }

.footer { background: #5A8A6C; color: rgba(255,255,255,0.8); text-align: center; padding: 20px; font-size: 12px; margin-top: 30px; }
.footer a { color: rgba(255,255,255,0.7); }
.footer a:hover { color: #fff; }

.empty-state { text-align: center; padding: 40px 20px; color: #aaa; font-size: 13px; }

/* ===== 系统模块 - 日历 ===== */
.sidebar-box .box-content table { width: 100%; border-collapse: collapse; }
.sidebar-box .box-content table td, .sidebar-box .box-content table th { padding: 4px 2px; text-align: center; font-size: 13px; border: 1px solid #eee; }
.sidebar-box .box-content table td a { display: block; padding: 2px; color: #5A8A6C; font-weight: 600; }
.sidebar-box .box-content table td.today { background: #5A8A6C; color: #fff; font-weight: 700; border-radius: 3px; }
.sidebar-box .box-content table td.today a { color: #fff; }

/* ===== 系统模块 - 列表 ===== */
.sidebar-box .box-content ul { list-style: none; padding: 0; }
.sidebar-box .box-content ul li { padding: 4px 0; border-bottom: 1px solid #f5f5f5; font-size: 13px; }
.sidebar-box .box-content ul li a { color: #333; }
.sidebar-box .box-content ul li a:hover { color: #5A8A6C; }
/* ===== 纸型工具 ===== */
.tool-body{max-width:1200px;margin:20px auto;padding:0 15px;display:flex;gap:20px;align-items:flex-start}
.tool-preview-wrap{flex:1;min-width:0;background:#FAF8F5;border:1px solid #e0e0e0;display:flex;flex-direction:column;align-items:center;padding:10px;min-height:400px}
.tool-preview-wrap canvas{display:block}
.tool-preview-info{text-align:center;padding-bottom:10px;font-size:12px;line-height:1;color:#999}
.tool-config{width:300px;flex-shrink:0;background:#fff;border:1px solid #e0e0e0;padding:16px;position:sticky;top:76px}
.tool-config h3{font-size:13px;font-weight:600;color:#5A8A6C;margin-bottom:8px;padding-bottom:4px;border-bottom:2px solid #5A8A6C}
.tool-config .cfg-group{margin-bottom:10px}
.tool-config label{display:block;font-size:12px;color:#666;margin-bottom:3px}
.tool-config select,.tool-config input[type=number]{width:100%;padding:5px 7px;border:1px solid #ddd;font-size:12px;font-family:inherit;outline:none;background:#fff}
.tool-config select:focus,.tool-config input:focus{border-color:#5A8A6C}
.tool-config .input-row{display:flex;align-items:center;gap:6px}
.tool-config .input-row input[type=number]{width:62px;flex-shrink:0}
.tool-config .input-row .unit{font-size:12px;color:#999}
.tool-config .chk-row{display:flex;align-items:center;gap:6px}
.tool-config .chk-row input{width:auto}
.tool-config .chk-row label{display:inline;margin:0;cursor:pointer;font-size:12px}
.tool-config .row-duo{display:flex;gap:8px}
.tool-config .row-duo .cfg-group{flex:1;min-width:0}
.tool-config .export-select{flex:2}
.tool-config .export-select select{width:100%;padding:5px 7px;border:1px solid #ddd;font-size:12px;font-family:inherit;outline:none;background:#fff}
.tool-config .export-select select:focus{border-color:#5A8A6C}
.tool-export-btn,.tool-print-btn{width:100%;padding:8px 10px;border:none;color:#fff;font-size:12px;font-family:inherit;cursor:pointer;text-align:center;white-space:nowrap}
.tool-export-btn{background:#5A8A6C}
.tool-export-btn:hover{background:#4A7A5C}
.tool-print-btn{background:#888}
.tool-print-btn:hover{background:#666}
.tool-type-select{width:100%;padding:6px 7px;border:1px solid #ddd;font-size:13px;font-family:inherit;outline:none;background:#fff;cursor:pointer;margin-bottom:12px}
.tool-type-select:focus{border-color:#5A8A6C}
.tool-color-presets{display:flex;flex-wrap:wrap;gap:4px}
.tool-color-presets .preset-btn{width:28px;height:28px;border:2px solid transparent;cursor:pointer;transition:all .12s;display:flex;align-items:center;justify-content:center;font-size:10px;color:#666;padding:0}
.tool-color-presets .preset-btn.active{border-color:#5A8A6C;box-shadow:0 0 0 1px #5A8A6C}
.tool-color-presets .preset-btn:hover{border-color:#aaa}
.tool-color-presets.bg .preset-btn{width:28px;height:28px}

@media print{body{background:#fff}.tool-header,.tool-config,.tool-footer,.tool-preview-info,.nav{display:none!important}.tool-body{max-width:100%;margin:0;padding:0}.tool-preview-wrap{border:none;padding:0;min-height:auto}}


/* ===== 响应式 ===== */
@media (max-width: 768px) {
    .wrapper { flex-direction: column; }
    .sidebar { width: 100%; }
    .tool-grid, .post-list { grid-template-columns: 1fr; }
    .header-inner { flex-wrap: wrap; height: auto; padding: 10px 15px; gap: 6px; }
    .nav { flex-wrap: wrap; }
    .tool-body{flex-direction:column}.tool-config{width:100%;position:static}
}
@media (max-width: 600px) {
    .tool-banner { flex-direction: column; text-align: center; }
    .tool-banner .banner-btn { width: 100%; text-align: center; }
}
