/* ==========================================================================
   表情包页面样式 —— 原站绿色风格（与全站旧版页面一致）
   ========================================================================== */

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

html, body { height: 100%; }

body {
    font-family: "宋体", SimSun, serif;
    background: #f5f5f5;
    color: #333;
    line-height: 1.8;
    font-size: 14px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ---- 顶部导航 ---- */
.header {
    background: #2d5a3d;
    border-bottom: 3px solid #1a3d26;
}

.header-inner {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 15px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    color: #fff;
    font-size: 18px;
    font-weight: bold;
    text-decoration: none;
}

.nav { display: flex; gap: 30px; }

.nav a {
    color: #c8e6c9;
    text-decoration: none;
    font-size: 14px;
}

.nav a:hover { color: #fff; }

.nav a.active { color: #fff; }

.header-right {
    display: flex;
    gap: 15px;
    align-items: center;
}

.header-right a {
    color: #fff;
    text-decoration: none;
    font-size: 13px;
    padding: 5px 15px;
    border: 1px solid #4a7c59;
}

.header-right a:hover { background: #4a7c59; }

.user-info {
    color: #fff;
    font-size: 13px;
}

.notice-btn {
    position: relative;
    color: #fff;
    text-decoration: none;
    font-size: 13px;
    padding: 5px 15px;
    border: 1px solid #4a7c59;
}

.notice-btn:hover { background: #4a7c59; }

.notice-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #e53e3e;
    color: #fff;
    font-size: 11px;
    line-height: 1;
    padding: 2px 6px;
    border-radius: 9px;
}

/* ---- 主体 ---- */
.main {
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 15px;
    flex: 1;
    width: 100%;
}

.page-box {
    background: #fff;
    border: 1px solid #ddd;
    padding: 30px;
}

.page-title {
    font-size: 20px;
    color: #1b5e20;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #2d5a3d;
}

.page-sub {
    font-size: 13px;
    color: #666;
    margin-top: -18px;
    margin-bottom: 20px;
}

.crumb {
    font-size: 13px;
    margin-bottom: 15px;
}

.crumb a { color: #2d5a3d; text-decoration: none; }
.crumb a:hover { text-decoration: underline; }

/* ---- 合集卡片 ---- */
.pack-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.pack-card {
    background: #fff;
    border: 1px solid #ddd;
    display: flex;
    flex-direction: column;
}

.pack-cover {
    height: 130px;
    background: #e8f5e9;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    overflow: hidden;
}

.pack-cover img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    background: #fff;
    border: 1px solid #ddd;
    padding: 4px;
}

.pack-cover img:nth-child(n+4) { display: none; }

.pack-cover .cover-empty { color: #a0c0a8; font-size: 30px; }

.pack-body {
    padding: 14px 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.pack-name {
    font-size: 15px;
    font-weight: bold;
    color: #1b5e20;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.pack-count {
    font-size: 12px;
    font-weight: normal;
    color: #2d5a3d;
    background: #e8f5e9;
    padding: 0 10px;
    border-radius: 3px;
}

.pack-actions { margin-top: auto; display: flex; gap: 10px; }

.pack-actions a {
    flex: 1;
    text-align: center;
    padding: 8px 0;
    font-size: 13px;
    text-decoration: none;
    border: 1px solid #2d5a3d;
}

.pack-actions .btn-preview { background: #fff; color: #2d5a3d; }
.pack-actions .btn-preview:hover { background: #e8f5e9; }

.pack-actions .btn-zip { background: #2d5a3d; color: #fff; }
.pack-actions .btn-zip:hover { background: #1a3d26; color: #fff; }

.pack-actions .btn-disabled {
    flex: 1;
    text-align: center;
    padding: 8px 0;
    font-size: 13px;
    background: #eee;
    color: #999;
    border: 1px solid #ddd;
    cursor: not-allowed;
}

/* ---- 表情网格 ---- */
.emoji-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 14px;
}

.emoji-cell {
    background: #fff;
    border: 1px solid #ddd;
    padding: 12px 10px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.emoji-cell:hover { border-color: #2d5a3d; }

.emoji-cell-img {
    width: 88px;
    height: 88px;
    object-fit: contain;
    margin: 0 auto;
    cursor: zoom-in;
    background:
        conic-gradient(#f2f2f2 0 25%, #fff 0 50%, #f2f2f2 0 75%, #fff 0) 0 0/14px 14px;
}

.emoji-cell-name {
    font-size: 12px;
    color: #888;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.emoji-cell .btn-down {
    display: block;
    padding: 6px 0;
    background: #2d5a3d;
    color: #fff;
    font-size: 12px;
    text-decoration: none;
}

.emoji-cell .btn-down:hover { background: #1a3d26; }

/* 页头「下载整包」按钮（合集详情页右上角） */
.btn-zip {
    display: inline-block;
    padding: 9px 26px;
    background: #2d5a3d;
    color: #fff;
    font-size: 14px;
    text-decoration: none;
    border: none;
    cursor: pointer;
}

.btn-zip:hover { background: #1a3d26; color: #fff; }

/* ---- 预览浮层 ---- */
.preview-mask {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    z-index: 90;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 14px;
    padding: 20px;
}

.preview-mask.is-open { display: flex; }

.preview-mask img {
    max-width: min(420px, 86vw);
    max-height: 60vh;
    background: #fff;
    padding: 10px;
    border-radius: 4px;
}

.preview-name { color: #eee; font-size: 13px; word-break: break-all; text-align: center; }

.preview-close {
    position: absolute;
    top: 16px;
    right: 22px;
    background: none;
    border: none;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
}

/* ---- 空状态 ---- */
.empty-tip {
    text-align: center;
    color: #999;
    padding: 50px 0;
}

/* ---- 页脚 ---- */
.footer {
    background: #2d5a3d;
    color: #c8e6c9;
    padding: 30px 15px;
    margin-top: auto;
}

.footer-inner {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
}

.footer-section h4 {
    color: #fff;
    font-size: 14px;
    margin-bottom: 15px;
}

.footer-section a {
    display: block;
    color: #c8e6c9;
    text-decoration: none;
    font-size: 13px;
    margin-bottom: 8px;
}

.footer-section a:hover { color: #fff; }

.footer-bottom {
    max-width: 1000px;
    margin: 20px auto 0;
    padding-top: 20px;
    border-top: 1px solid #4a7c59;
    text-align: center;
    font-size: 12px;
}

/* ---- 移动端 ---- */
@media (max-width: 768px) {
    html, body { height: auto; }
    .header-inner {
        height: auto;
        flex-direction: column;
        padding: 10px 15px;
    }
    .logo { margin-bottom: 8px; }
    .nav { flex-wrap: wrap; justify-content: center; }
    .main { padding: 25px 10px; }
    .page-box { padding: 20px 15px; }
    .footer-inner { flex-direction: column; gap: 22px; }
}
