/* 超和平Busters动漫社 — 前台样式
   设计基调：Apple/小米式的大留白 + 圆角卡片，bilibili 式粉色点缀，
   保留原站樱花粉配色与飘落特效。响应式：桌面优先，768px 以下转单列。 */

:root {
    --pink: #fb7299;          /* B站粉 */
    --pink-deep: #c84a6b;     /* 原站主色 */
    --pink-soft: #ffe6ed;
    --pink-line: #ffd0dc;
    --text: #2b2b2b;
    --text-sub: #888;
    --bg: #fff8fa;
    --card: #ffffff;
    --radius: 18px;
    --shadow: 0 6px 24px rgba(200, 74, 107, 0.08);
    --maxw: 1080px;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: "Microsoft Yahei", "PingFang SC", -apple-system, sans-serif;
    background-color: var(--bg);
    background-image: radial-gradient(#ffdde1 1px, transparent 1px);
    background-size: 22px 22px;
    color: var(--text);
    line-height: 1.7;
    overflow-x: hidden;
}

/* ---------- 樱花飘落特效 ---------- */
.sakura {
    position: fixed;
    top: -10%;
    z-index: 0;
    pointer-events: none;
    animation: fall linear infinite;
}
@keyframes fall {
    0%   { transform: translateY(0) rotate(0deg); opacity: 1; }
    100% { transform: translateY(105vh) rotate(360deg); opacity: 0; }
}

/* ---------- 导航 ---------- */
.nav {
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
    background: rgba(255, 255, 255, 0.82);
    border-bottom: 1px solid var(--pink-line);
}
.nav-inner {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 18px;
}
.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    color: var(--pink-deep);
    text-decoration: none;
    font-size: 1.05rem;
    white-space: nowrap;
}
.nav-brand img { width: 32px; height: 32px; border-radius: 50%; }
.nav-links { margin-left: auto; display: flex; flex-wrap: wrap; gap: 4px; }
.nav-links a {
    color: var(--pink-deep);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 7px 14px;
    border-radius: 999px;
    transition: background .25s;
    white-space: nowrap;
}
.nav-links a:hover { background: var(--pink-soft); }

/* 汉堡菜单按钮：桌面端隐藏，手机端显示 */
.nav-toggle {
    display: none;
    margin-left: auto;
    background: var(--pink-soft);
    border: 1px solid var(--pink-line);
    border-radius: 10px;
    color: var(--pink-deep);
    font-size: 1.2rem;
    line-height: 1;
    padding: 8px 12px;
    cursor: pointer;
}

/* ---------- Hero ---------- */
.hero {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 72px 20px 56px;
    text-align: center;
    position: relative;
    z-index: 1;
}
.hero-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 36px;
    flex-wrap: wrap;
    margin-bottom: 28px;
}
.hero-logos img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #fff;
    box-shadow: 0 8px 30px rgba(200, 74, 107, 0.18);
}
.hero h1 {
    font-size: 2.6rem;
    color: var(--pink-deep);
    letter-spacing: 3px;
    line-height: 1.35;
}
.hero .slogan {
    color: #995566;
    font-size: 1.15rem;
    margin-top: 12px;
}
.hero .cta {
    display: inline-block;
    margin-top: 28px;
    background: linear-gradient(135deg, var(--pink), var(--pink-deep));
    color: #fff;
    padding: 12px 34px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 700;
    box-shadow: 0 8px 20px rgba(251, 114, 153, 0.35);
    transition: transform .2s;
}
.hero .cta:hover { transform: translateY(-2px); }

/* ---------- 内容区 ---------- */
.container {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 20px 40px;
    position: relative;
    z-index: 1;
}
.card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 36px;
    margin-bottom: 32px;
    box-shadow: var(--shadow);
    border: 1px solid #ffeef3;
}
.section-title {
    color: var(--pink-deep);
    font-size: 1.5rem;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.section-title::before {
    content: "";
    width: 5px;
    height: 1.3em;
    border-radius: 3px;
    background: linear-gradient(180deg, var(--pink), var(--pink-deep));
}

/* 文案排版：段落间距 + 无序列表（后台文案中以 "- " 开头的行） */
.card section p, .card > p { margin-bottom: 4px; }
.txt-list {
    list-style: none;
    margin: 10px 0 14px;
    padding: 0;
}
.txt-list li {
    position: relative;
    padding: 7px 0 7px 30px;
    border-bottom: 1px dashed #ffeef3;
}
.txt-list li:last-child { border-bottom: none; }
.txt-list li::before {
    content: "🌸";
    position: absolute;
    left: 2px;
    font-size: 0.85em;
    top: 8px;
}

/* 部门卡片 */
.dept-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
    margin-top: 22px;
}
.dept-card {
    background: #fff7f9;
    border: 1px dashed var(--pink-line);
    border-radius: 14px;
    padding: 24px;
    font-size: 0.96rem;
    transition: transform .2s, box-shadow .2s;
}
.dept-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.dept-card h3 { color: #b3405c; margin-bottom: 10px; font-size: 1.1rem; }

/* 社徽 & 看板娘 */
.gallery-row {
    display: flex;
    gap: 40px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 22px;
}
.gallery-item { text-align: center; }
.gallery-item img {
    width: 210px;
    height: 210px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #fff;
    box-shadow: 0 8px 30px rgba(200, 74, 107, 0.15);
}
.gallery-item p { margin-top: 12px; color: var(--text-sub); font-size: 0.95rem; }

/* ---------- 社团活动：单行滑块 ---------- */
.act-slider { position: relative; margin-top: 22px; }
.act-track {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding: 4px 2px 12px;
    scrollbar-width: thin;
    scrollbar-color: var(--pink-line) transparent;
}
.act-track::-webkit-scrollbar { height: 6px; }
.act-track::-webkit-scrollbar-thumb { background: var(--pink-line); border-radius: 3px; }
.act-item {
    flex: 0 0 240px;
    scroll-snap-align: start;
    border-radius: 14px;
    overflow: hidden;
    background: #fff7f9;
    border: 1px solid #ffeef3;
    transition: transform .2s;
}
.act-item:hover { transform: translateY(-3px); }
.act-item img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
    cursor: zoom-in;
}
.act-item .cap {
    padding: 10px 14px;
    font-size: 0.9rem;
    color: var(--text-sub);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.act-empty { color: var(--text-sub); text-align: center; padding: 30px 0; }
.act-btn {
    position: absolute;
    top: 40%;
    transform: translateY(-50%);
    z-index: 5;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid var(--pink-line);
    background: rgba(255, 255, 255, 0.92);
    color: var(--pink-deep);
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: background .2s;
}
.act-btn:hover { background: var(--pink-soft); }
.act-btn.prev { left: -10px; }
.act-btn.next { right: -10px; }

/* 图片灯箱 */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(0, 0, 0, 0.82);
    align-items: center;
    justify-content: center;
    padding: 24px;
    cursor: zoom-out;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 88vh; border-radius: 10px; }

/* ---------- 答疑区 ---------- */
.qa-form {
    background: #fff7f9;
    border-radius: 14px;
    padding: 20px;
    margin-top: 18px;
}
.qa-form input[type="text"], .qa-form textarea {
    width: 100%;
    border: 1px solid var(--pink-line);
    border-radius: 10px;
    padding: 10px 14px;
    font: inherit;
    background: #fff;
    margin-bottom: 12px;
    resize: vertical;
}
.qa-form textarea { min-height: 90px; }
.btn {
    background: linear-gradient(135deg, var(--pink), var(--pink-deep));
    color: #fff;
    border: none;
    padding: 10px 28px;
    border-radius: 999px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: opacity .2s;
}
.btn:hover { opacity: .88; }
.qa-hint { color: var(--text-sub); font-size: 0.85rem; margin-top: 8px; }
.qa-item {
    border-top: 1px dashed var(--pink-line);
    padding: 16px 4px;
}
.qa-item:first-of-type { border-top: none; }
.qa-q { font-weight: 600; }
.qa-q .who { color: var(--pink-deep); margin-right: 8px; }
.qa-a {
    margin-top: 8px;
    background: var(--pink-soft);
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 0.95rem;
}
.qa-a::before { content: "官方回复 · "; color: var(--pink-deep); font-weight: 700; }
.qa-time { color: var(--text-sub); font-size: 0.8rem; margin-left: 10px; font-weight: 400; }

/* flash 消息 */
.flash { border-radius: 10px; padding: 10px 16px; margin: 12px 0; font-size: 0.95rem; }
.flash.ok { background: #e8f9ee; color: #1d7a3d; }
.flash.error, .flash.qa_error { background: #ffe9ec; color: #c0392b; }
.flash.qa_ok { background: #e8f9ee; color: #1d7a3d; }

/* ---------- 页脚 & 访问统计 ---------- */
footer {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 36px 20px 30px;
    background: linear-gradient(180deg, #fff0f4, var(--pink-soft));
    color: #885566;
    margin-top: 40px;
}
.stats-line {
    font-size: 0.78rem;
    color: #c9a3ae;
    margin-top: 14px;
}
.admin-link { font-size: 0.8rem; color: #c9a3ae; text-decoration: none; }
.admin-link:hover { color: var(--pink-deep); }

/* ---------- 右侧快速跳转导航：仅宽屏桌面显示 ---------- */
.side-nav {
    display: none;
    position: fixed;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 90;
    flex-direction: column;
    gap: 4px;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(10px);
    border: 1px solid var(--pink-line);
    border-radius: 999px;
    padding: 12px 8px;
    box-shadow: var(--shadow);
}
@media (min-width: 1200px) {
    .side-nav { display: flex; }
}
.side-nav a {
    color: var(--pink-deep);
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 7px 14px;
    border-radius: 999px;
    text-align: center;
    transition: background .2s, color .2s;
}
.side-nav a:hover { background: var(--pink-soft); }
.side-nav a.active {
    background: linear-gradient(135deg, var(--pink), var(--pink-deep));
    color: #fff;
}

/* ---------- B站账号 ---------- */
.bili-head {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    background: #fff7f9;
    border: 1px solid #ffeef3;
    border-radius: 14px;
    padding: 18px 22px;
    margin-top: 18px;
}
.bili-face {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 2px solid var(--pink-line);
    object-fit: cover;
}
.bili-name { font-weight: 700; font-size: 1.1rem; color: var(--pink-deep); }
.bili-stats { display: flex; gap: 18px; color: var(--text-sub); font-size: 0.92rem; margin-top: 4px; }
.bili-stats b { color: var(--pink); font-size: 1.15rem; margin-right: 3px; }
.bili-link {
    margin-left: auto;
    background: linear-gradient(135deg, var(--pink), var(--pink-deep));
    color: #fff;
    text-decoration: none;
    padding: 9px 22px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.92rem;
    white-space: nowrap;
    transition: opacity .2s;
}
.bili-link:hover { opacity: .88; }
.bili-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 18px;
    margin-top: 20px;
}
.bili-item {
    text-decoration: none;
    color: var(--text);
    border-radius: 14px;
    overflow: hidden;
    background: #fff7f9;
    border: 1px solid #ffeef3;
    transition: transform .2s;
    display: block;
}
.bili-item:hover { transform: translateY(-3px); }
.bili-cover { position: relative; }
.bili-cover img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    display: block;
}
.bili-play {
    position: absolute;
    right: 8px;
    bottom: 8px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 0.78rem;
    border-radius: 8px;
    padding: 2px 8px;
}
.bili-title {
    font-size: 0.92rem;
    font-weight: 600;
    padding: 10px 12px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.6em;
}
.bili-date { font-size: 0.78rem; color: var(--text-sub); padding: 2px 12px 10px; }

/* ---------- 手机适配 ---------- */
@media (max-width: 768px) {
    .nav-inner { flex-wrap: wrap; }
    .nav-toggle { display: block; }
    /* 菜单默认折叠，点汉堡按钮展开为整列 */
    .nav-links {
        display: none;
        flex-basis: 100%;
        margin-left: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
        padding-top: 10px;
    }
    .nav-links.open { display: flex; }
    .nav-links a {
        padding: 10px 14px;
        font-size: 0.95rem;
        text-align: center;
        background: var(--pink-soft);
    }
    .hero { padding: 48px 16px 40px; }
    .hero h1 { font-size: 1.7rem; letter-spacing: 1px; }
    .hero-logos { gap: 20px; }
    .hero-logos img { width: 104px; height: 104px; }
    .card { padding: 22px 18px; }
    .dept-grid { grid-template-columns: 1fr; }
    .gallery-item img { width: 150px; height: 150px; }
    .act-item { flex-basis: 170px; }
    .act-btn { display: none; }  /* 手机端直接滑动，不显示箭头 */
    .bili-link { margin-left: 0; width: 100%; text-align: center; }
}
