/* ==========================================================================
   pages.css — 各页面专属样式：欢迎页、时间线、书信、感谢、信息卡片、规则、指南、404
   依赖顺序：base.css → layout.css → components.css → status.css → pages.css（最后加载）
   ========================================================================== */

/* ===== 欢迎页（index 入口） ===== */
.welcome-wrap {
    min-height: 65vh;
    display: flex;
    align-items: center;
    justify-content: flex-start; /* 卡片靠左 */
    padding: 1.5rem 0 2.5rem;
    /* 以浏览器左边界为基准：宽屏时抵消 .container 的水平居中与内边距，
       让卡片左边缘与边界保留 8rem 间隔；窄屏（视口不足）保留容器内边距缩进（min 夹取） */
    margin-left: min(0px, calc((100vw - 960px) / -2 + 15.5rem)); /* -1.5rem(容器内边距) + 8rem(边界间隔) = +6.5rem */
}

.welcome-card {
    max-width: 500px;
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2.4rem 2.2rem;
    text-align: left;
}

.welcome-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
    background: rgba(53, 208, 127, 0.12);
    color: var(--primary);
    font-size: 1.7rem;
    margin-bottom: 1.2rem;
}

/* "欢迎来到" 与站名同字号、更大 */
.welcome-hello,
.welcome-name {
    font-size: 2.4rem;
    font-weight: 800;
    line-height: 1.25;
}

.welcome-hello {
    color: var(--text);
    margin-bottom: 0.2rem;
}

.welcome-name {
    color: var(--primary); /* 高亮 */
    margin-bottom: 1.2rem;
}

/* 子卡片：简介 */
.welcome-subcard {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.9rem 1.1rem;
    margin-bottom: 1.4rem;
}

.welcome-tagline {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 0.4rem;
}

.welcome-subtitle {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.welcome-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: var(--primary);
    color: #0b0f14;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 0.7rem 1.3rem;
    border-radius: 10px;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.welcome-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(53, 208, 127, 0.35);
}

/* ===== 发展历程时间线 ===== */
.timeline-section {
    margin: 1rem auto 2rem;
    max-width: 720px;
}

.timeline {
    position: relative;
    padding: 0.5rem 0 0.5rem;
}

/* 竖向轴线 */
.timeline::before {
    content: '';
    position: absolute;
    top: 0.3rem;
    bottom: 0.3rem;
    left: 13px;
    width: 2px;
    background: var(--border);
    border-radius: 2px;
}

.timeline-item {
    position: relative;
    padding-left: 44px;
    margin-bottom: 1.6rem;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

/* 时间点圆点 */
.timeline-dot {
    position: absolute;
    left: 7px;
    top: 0.4rem;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 0 4px rgba(53, 208, 127, 0.18);
}

.timeline-date {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 0.45rem;
    font-weight: 600;
}

.timeline-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.9rem 1.1rem;
}

.timeline-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
    color: var(--text);
}

.timeline-desc {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ===== 服主的话 · 书信卡片 ===== */
.letter-card {
    max-width: 640px;
    margin: 1rem auto 2rem;
    padding: 2.2rem 2.4rem;
    border-radius: var(--radius);
    text-align: left;
}

/* 信头：抬头 + 装饰线 */
.letter-head {
    margin-bottom: 1.6rem;
    text-align: center;
}

.letter-to {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 2px;
    color: var(--text-muted);
    margin-bottom: 0.9rem;
}

.letter-rule {
    height: 2px;
    background: linear-gradient(to right, transparent, rgba(53, 208, 127, 0.55), transparent);
    border-radius: 2px;
}

/* 问候 */
.letter-greeting {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.6rem !important;
}

/* 正文：中文书信习惯，首行缩进 */
.letter-body-text {
    font-size: 0.98rem;
    line-height: 2;
    color: var(--text);
    margin-bottom: 1.2rem;
    text-indent: 2em;
}

/* 引导句（小标题式） */
.letter-lead {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--primary);
    margin: 1.6rem 0 1.2rem !important;
    padding-left: 0.8rem;
    border-left: 3px solid var(--primary);
}

/* 强调句：高亮标记 */
.letter-em {
    background: rgba(53, 208, 127, 0.16);
    padding: 0.1em 0.35em;
    border-radius: 4px;
    font-weight: 700;
    color: var(--primary);
}

/* 署名：分隔线 + 右对齐 */
.letter-sign {
    margin-top: 2.2rem;
    padding-top: 1.2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    text-align: right;
}

.letter-sign span {
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 1px;
    color: var(--text);
}

@media (max-width: 640px) {
    .letter-card {
        padding: 1.6rem 1.3rem;
    }
    .letter-body-text {
        text-indent: 1.5em;
    }
}

/* ===== 服主的话 · 特别感谢 ===== */
.thanks-section {
    max-width: 940px;
    margin: 0 auto 2.2rem;
    text-align: center;
}

/* 两纵列瀑布流排版（横向不对齐） */
.thanks-cards {
    column-count: 2;
    column-gap: 1.2rem;
}

.thanks-card {
    padding: 2rem 2.2rem;
    border-radius: var(--radius);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    break-inside: avoid; /* 卡片不在列间拆分 */
    margin-bottom: 1.2rem;
}

.thanks-name {
    margin-top: 0.8rem;
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text);
}

.thanks-role {
    margin-top: 0.3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
}

.thanks-role i {
    margin-right: 0.35em;
}

/* 主角色：正式群名 */
.role-main {
    font-size: 0.92rem;
    color: var(--primary);
    font-weight: 700;
}

/* 临时群名小标签 */
.role-temp {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.15rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #e0a34a;
    background: rgba(224, 163, 74, 0.1);
    border: 1px dashed rgba(224, 163, 74, 0.45);
}

.role-temp i {
    font-size: 0.72rem;
    margin-right: 0;
}

/* 被感谢者 B 站主页链接 */
.thanks-bili {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.7rem;
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
    background: rgba(251, 114, 153, 0.1);
    border: 1px solid rgba(251, 114, 153, 0.3);
    text-decoration: none;
    transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.thanks-bili .fa-bilibili {
    color: #fb7299;
    font-size: 1rem;
}

.thanks-bili:hover {
    color: #fb7299;
    background: rgba(251, 114, 153, 0.18);
    border-color: #fb7299;
}

/* 更多人员提示 */
.thanks-more {
    margin-top: 1.2rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    opacity: 0.8;
}

/* LittleSkin 皮肤头像：直接从完整皮肤图 CSS 双层裁剪合成
   （LittleSkin 无 CORS，Canvas 无法读取，改用 background 多层叠加） */
.skin-avatar {
    width: 96px;
    height: 96px;
    border: 3px solid var(--primary);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45), 0 0 14px rgba(53, 208, 127, 0.25);
    /* 两层：底层头部 (8,8) + 外层头部/头发 (40,8) */
    background-image: var(--skin-url), var(--skin-url);
    background-size: 800% 800%;
    background-repeat: no-repeat;
    background-position: 14.2857% 14.2857%, 71.4286% 14.2857%;
    background-color: rgba(24, 32, 44, 0.6);
    image-rendering: pixelated;
    flex-shrink: 0;
}

.thanks-text {
    margin-top: 1.1rem;
    text-align: left;
}

.thanks-text p {
    font-size: 0.94rem;
    line-height: 1.9;
    color: var(--text-muted);
    margin-bottom: 0.9rem;
}

/* 感谢文字视觉层次：首段导语（加粗亮色） */
.thanks-text p:first-child {
    color: var(--text);
    font-weight: 600;
    font-size: 0.97rem;
}

/* 感谢文字视觉层次：末段收尾强调（主题色加粗） */
.thanks-text p:last-child {
    margin-bottom: 0;
    color: var(--primary);
    font-weight: 700;
    font-size: 0.97rem;
}

/* 引用他人评价的引用块 */
.thanks-quote {
    margin-bottom: 0.9rem;
    padding: 0.7rem 1rem 0.7rem 1.1rem;
    border-left: 3px solid var(--primary);
    border-radius: 0 10px 10px 0;
    background: rgba(53, 208, 127, 0.08);
    color: var(--text-muted);
}

@media (max-width: 640px) {
    .thanks-cards {
        column-count: 1; /* 小屏回到单列 */
    }
    .thanks-card {
        padding: 1.6rem 1.3rem;
    }
}

/* ===== 信息卡片 ===== */
.info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.2rem;
    margin-top: 1.5rem;
}

/* 关于页：两个卡片并列 */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.2rem;
    max-width: 860px;
    margin: 0 auto 2rem;
}

.about-grid .card h3 {
    font-size: 1.05rem;
    color: var(--text);
    font-weight: 700;
    margin-bottom: 0.6rem;
}

/* 服务器特色列表 */
.feature-list {
    list-style: none;
    padding: 0;
    margin: 0.4rem 0 0;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.feature-list li {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.92rem;
    color: var(--text);
    line-height: 1.5;
}

.feature-list li i {
    color: var(--primary);
    flex-shrink: 0;
    font-size: 0.85rem;
}

@media (max-width: 640px) {
    .about-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== 游戏规则 ===== */
.rules-section {
    max-width: 860px;
    margin: 0 auto 2.5rem;
    text-align: center;
}

.section-title {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 0.4rem;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

/* 规则来源标注 */
.rules-source {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin: -1.1rem 0 1.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    background: rgba(53, 208, 127, 0.08);
    border: 1px solid rgba(53, 208, 127, 0.25);
    border-radius: 999px;
    padding: 0.25rem 0.9rem;
}

.rules-source i {
    color: var(--primary);
    font-size: 0.8rem;
}

.rules-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.2rem;
    text-align: left;
}

.rule-card {
    text-align: left;
    display: flex;
    flex-direction: column;
    padding: 1.8rem 1.6rem;
    min-height: 220px;
}

.rule-icon {
    width: 52px;
    height: 52px;
    font-size: 1.5rem;
    color: var(--primary);
    background: rgba(53, 208, 127, 0.12);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.rule-card h3 {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 0.7rem;
    padding-bottom: 0.65rem;
    border-bottom: 2px solid rgba(53, 208, 127, 0.25);
}

.rule-card p {
    font-size: 0.92rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 0;
    flex: 1;
}

.rule-note {
    font-size: 0.8rem;
    color: var(--primary);
    margin-top: 0.8rem;
    padding-top: 0.6rem;
    border-top: 1px dashed rgba(53, 208, 127, 0.3);
    flex-shrink: 0;
}

@media (max-width: 640px) {
    .rules-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== 指南 ===== */
.guide-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.2rem;
}

.guide-step {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.4rem;
}

.step-num {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.8rem;
}

.guide-step h3 {
    font-size: 1.05rem;
    margin-bottom: 0.4rem;
}

.guide-step p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 0.6rem;
}

.guide-code {
    display: inline-block;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.4rem 0.7rem;
    color: var(--accent);
    font-size: 0.88rem;
    word-break: break-all;
    cursor: pointer;
    font-family: inherit;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.guide-code:hover {
    border-color: var(--accent);
    background: rgba(88, 166, 255, 0.12);
}

.guide-note {
    margin-top: 0.5rem !important;
    margin-bottom: 0 !important;
}

.port-chip {
    color: var(--accent);
    background: rgba(88, 166, 255, 0.1);
    border: 1px solid transparent;
    padding: 0.1rem 0.3rem;
    border-radius: 4px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9em;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.port-chip:hover {
    border-color: var(--accent);
    background: rgba(88, 166, 255, 0.2);
}

/* ===== 404 页面 ===== */
.notfound-wrap {
    min-height: 62vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 0.4rem;
}

/* 标题行：标题 + 装饰图并排（参考旧版图标排版） */
.notfound-title-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.notfound-title {
    font-size: 2.4rem;
    font-weight: 800;
    color: var(--text);
    margin: 0;
}

/* 装饰图：小尺寸、延迟淡入（缩放 + 旋转动画） */
.notfound-deco {
    width: 84px;
    height: 84px;
    object-fit: contain;
    opacity: 0;
    animation: notfoundDecoIn 0.8s ease-out 1.2s forwards;
    filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.4));
}

@keyframes notfoundDecoIn {
    0% { opacity: 0; transform: scale(0.8) rotate(-8deg); }
    100% { opacity: 1; transform: scale(1) rotate(0deg); }
}

.notfound-sub {
    font-size: 1.05rem;
    color: var(--text-muted);
    max-width: 34rem;
    line-height: 1.9;
    margin: 0.6rem auto 0;
}

.notfound-actions {
    display: flex;
    gap: 0.9rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 1.4rem;
}

@media (max-width: 640px) {
    .notfound-title-row {
        flex-direction: column;
        gap: 0.5rem;
    }
    .notfound-title {
        font-size: 2rem;
    }
    .notfound-deco {
        width: 64px;
        height: 64px;
        animation: notfoundDecoIn 0.6s ease-out 0.8s forwards;
    }
}

/* ===== 响应式（跨模块） ===== */
@media (max-width: 768px) {
    .info-grid {
        grid-template-columns: 1fr;
    }
    .guide-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== 毛玻璃效果 =====
   注意：必须置于本文件（最后加载的样式表）末尾，
   以确保覆盖 status.css / pages.css 中元素各自定义的背景 */
.glass {
    background: rgba(24, 32, 44, 0.5);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

/* 悬停时保持毛玻璃，仅提升亮度 */
.card.glass:hover,
.guide-step.glass:hover {
    background: rgba(30, 40, 54, 0.6);
    border-color: var(--primary);
}

.nav-btn.glass:hover {
    background: rgba(251, 114, 153, 0.18);
    border-color: #fb7299;
}

/* 小屏性能：降低模糊半径 */
@media (max-width: 768px) {
    .glass {
        backdrop-filter: blur(8px) saturate(130%);
        -webkit-backdrop-filter: blur(8px) saturate(130%);
    }
}
