/* ============ 初音未来风格博客 · 完整版样式 ============ */
/* 主色调：初音标志性的青色/蓝绿色 + 马卡龙点缀 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    /* 新增全局防裁切核心 */
    word-wrap: break-word;
    overflow-wrap: anywhere;
}
:root {
    --cyan: #39c5bb;          /* 初音青 */
    --cyan-deep: #0f8a86;
    --cyan-soft: #d9f4f1;
    --blue-soft: #e7f6ff;
    --mint: #b8f0e0;
    --text: #25424b;
    --text-light: #5a7a85;
    --card: #ffffff;
    --line: #d5ecea;
}
html {
    scroll-behavior: smooth;
}
body {
    font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
    background:
        radial-gradient(1200px 500px at 85% -10%, #d9f6ff 0%, transparent 60%),
        radial-gradient(900px 400px at -10% 30%, #dff7f0 0%, transparent 55%),
        linear-gradient(180deg, #f6fcff 0%, #f3fbfd 100%);
    background-attachment: fixed;
    color: var(--text);
    line-height: 1.8;
    min-height: 100vh;
}
/* ============ 顶部工具条 ============ */
.top-toolbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(6px);
    box-shadow: 0 1px 6px rgba(15, 138, 134, 0.12);
    border-bottom: 2px solid var(--cyan-soft);
}
.toolbar-left {
    display: flex;
    align-items: center;
    gap: 8px;
}
.logo-img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--cyan-soft);
    flex-shrink: 0;
}
.site-badge {
    font-weight: 700;
    color: var(--cyan-deep);
    letter-spacing: 1px;
}
.toolbar-right {
    display: flex;
    gap: 8px;
    align-items: center;
}
.tool-btn {
    font-size: 13px;
    padding: 6px 12px;
    border: 1px solid var(--cyan);
    border-radius: 20px;
    background: #fff;
    color: var(--cyan-deep);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.25s;
}
.tool-btn:hover {
    background: var(--cyan);
    color: #fff;
    transform: translateY(-1px);
}
.link-btn {
    background: var(--cyan);
    color: #fff;
}
.link-btn:hover {
    background: var(--cyan-deep);
    color: #fff;
}
/* ============ 背景音符飘浮动画 ============ */
.music-notes {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}
.music-notes::before,
.music-notes::after {
    content: "♪";
    position: absolute;
    color: rgba(57, 197, 187, 0.22);
    font-size: 44px;
    animation: floatUp 9s linear infinite;
}
.music-notes::before { left: 12%; bottom: -60px; animation-duration: 11s; }
.music-notes::after  { left: 82%; bottom: -60px; animation-duration: 8s; }
@keyframes floatUp {
    0%   { transform: translateY(0) rotate(0deg); opacity: 0; }
    10%  { opacity: 0.8; }
    100% { transform: translateY(-110vh) rotate(30deg); opacity: 0; }
}
/* ============ Hero 横幅 ============ */
.hero {
    position: relative;
    margin-top: 44px;
    height: 300px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.05) 0%, rgba(10,40,50,0.35) 100%);
}
.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: #fff;
    text-shadow: 0 2px 10px rgba(0, 60, 70, 0.55);
    padding: 0 16px;
}
.blog-title {
    font-size: 40px;
    font-weight: 800;
    letter-spacing: 2px;
    margin-bottom: 8px;
}
.blog-subtitle {
    font-size: 17px;
    opacity: 0.95;
    margin-bottom: 14px;
}
.hero-tags span {
    display: inline-block;
    margin: 0 5px;
    padding: 4px 14px;
    border-radius: 20px;
    background: rgba(255,255,255,0.22);
    border: 1px solid rgba(255,255,255,0.45);
    font-size: 13px;
}
/* ============ 导航 ============ */
.main-nav {
    position: sticky;
    top: 44px;
    z-index: 90;
    display: flex;
    justify-content: center;
    gap: 6px;
    padding: 10px;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(5px);
    border-bottom: 2px solid var(--cyan-soft);
    flex-wrap: wrap;
}
.nav-link {
    text-decoration: none;
    color: var(--text-light);
    font-size: 15px;
    padding: 6px 16px;
    border-radius: 20px;
    transition: all 0.25s;
}
.nav-link:hover { background: var(--cyan-soft); color: var(--cyan-deep); }
.nav-link.active { background: var(--cyan); color: #fff; font-weight: 600; }
/* ============ 主容器与面板 ============ */
.container {
    position: relative;
    z-index: 1;
    max-width: 860px;
    margin: 0 auto;
    padding: 24px 16px 40px;
}
.panel {
    background: var(--card);
    border-radius: 18px;
    padding: 26px 26px 30px;
    margin-bottom: 26px;
    box-shadow: 0 6px 24px rgba(15, 138, 134, 0.08);
    border: 1px solid var(--line);
    animation: panelIn 0.5s ease both;
    /* 兜底防止面板内部内容溢出 */
    overflow-wrap: break-word;
}
@keyframes panelIn {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}
.panel-title {
    font-size: 22px;
    color: var(--cyan-deep);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.t-emoji { color: var(--cyan); }
.panel-desc {
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 18px;
}
.panel-desc code {
    background: var(--cyan-soft);
    color: var(--cyan-deep);
    padding: 1px 6px;
    border-radius: 6px;
    font-size: 13px;
}
/* ===== 首页 ===== */
.home-flex {
    display: flex;
    gap: 24px;
    align-items: center;
    flex-wrap: wrap;
}
.home-text { flex: 1 1 320px; }
.home-text p { margin-bottom: 12px; }
.home-sticker {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 16px;
    box-shadow: 0 6px 18px rgba(57, 197, 187, 0.25);
    flex-shrink: 0;
}
/* ===== 心情抽签 ===== */
.mood-box {
    background: linear-gradient(135deg, var(--cyan-soft) 0%, var(--blue-soft) 100%);
    border-radius: 14px;
    padding: 22px;
    text-align: center;
}
.draw-btn {
    font-size: 17px;
    font-weight: 600;
    padding: 12px 34px;
    border: none;
    border-radius: 30px;
    background: var(--cyan);
    color: #fff;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(57, 197, 187, 0.4);
    transition: all 0.25s;
}
.draw-btn:hover { background: var(--cyan-deep); transform: scale(1.04); }
.draw-btn:active { transform: scale(0.97); }
.draw-result {
    min-height: 56px;
    margin-top: 18px;
    font-size: 18px;
    color: var(--cyan-deep);
    font-weight: 600;
}
.draw-placeholder { font-weight: 400; color: var(--text-light); font-size: 14px; }
.draw-result.pop { animation: pop 0.45s ease; }
@keyframes pop {
    0% { transform: scale(0.6); opacity: 0.3; }
    70% { transform: scale(1.12); }
    100% { transform: scale(1); opacity: 1; }
}
.draw-history {
    margin-top: 12px;
    font-size: 13px;
    color: var(--text-light);
    text-align: center;
    min-height: 20px;
}
/* ===== 笔记列表（a 链接，整行可点击） ===== */
.note-list { display: flex; flex-direction: column; gap: 12px; }
.note-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 12px;
    background: #f6fdfb;
    border: 1px solid var(--line);
    cursor: pointer;
    text-decoration: none;
    color: var(--text);
    transition: all 0.22s;
    flex-wrap: wrap;
}
.note-item:hover { background: var(--cyan-soft); transform: translateX(4px); }
.note-item-title { font-size: 16px; font-weight: 600; color: var(--text); }
.note-item-date { font-size: 13px; color: var(--text-light); flex-shrink: 0; }
/* 笔记正文 */
.note-view { margin-top: 6px; }
.back-btn {
    font-size: 14px;
    padding: 7px 16px;
    border: 1px solid var(--cyan);
    border-radius: 18px;
    background: #fff;
    color: var(--cyan-deep);
    cursor: pointer;
    margin-bottom: 16px;
    transition: all 0.2s;
}
.back-btn:hover { background: var(--cyan); color: #fff; }
.note-article h3 {
    font-size: 22px;
    color: var(--cyan-deep);
    margin-bottom: 4px;
}
.note-article .note-meta { font-size: 13px; color: var(--text-light); margin-bottom: 16px; }
.note-article p { margin-bottom: 12px; }
.note-article img {
    max-width: 100%;
    border-radius: 12px;
    box-shadow: 0 4px 14px rgba(15,138,134,0.2);
    margin: 10px 0;
    display: block;
}
.note-article video {
    max-width: 100%;
    border-radius: 12px;
    margin: 10px 0;
    display: block;
    background: #000;
}
.note-article code {
    background: var(--cyan-soft);
    color: var(--cyan-deep);
    padding: 1px 6px;
    border-radius: 5px;
    font-size: 14px;
}
/* ===== 资源列表 ===== */
.res-list { display: flex; flex-direction: column; gap: 12px; }
.res-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 12px;
    background: #f6fdfb;
    border: 1px solid var(--line);
    transition: all 0.22s;
    flex-wrap: wrap;
}
.res-item:hover { background: var(--cyan-soft); }
.res-item-name { font-size: 15px; font-weight: 600; }
.res-dl {
    text-decoration: none;
    font-size: 14px;
    color: #fff;
    background: var(--cyan);
    padding: 6px 16px;
    border-radius: 18px;
    flex-shrink: 0;
    transition: all 0.2s;
}
.res-dl:hover { background: var(--cyan-deep); }
/* 加载提示与空态 */
.loading-tip { color: var(--text-light); font-size: 14px; }
.empty-tip { color: var(--text-light); font-size: 14px; }
/* ===== 页脚 ===== */
.site-footer {
    text-align: center;
    padding: 22px 16px;
    color: var(--text-light);
    font-size: 14px;
    border-top: 2px solid var(--cyan-soft);
}
.footer-sub { font-size: 12px; margin-top: 4px; opacity: 0.8; }
.footer-sub a { color: var(--cyan-deep); }
/* ===== 关于页 ===== */
.hero-short { height: 220px; }
.about-flex {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    flex-wrap: wrap;
}
.about-avatar {
    width: 130px;
    height: 130px;
    object-fit: cover;
    border-radius: 50%;
    box-shadow: 0 6px 18px rgba(57, 197, 187, 0.3);
    border: 3px solid var(--cyan-soft);
    flex-shrink: 0;
}
.about-text { flex: 1 1 320px; }
.about-text p { margin-bottom: 10px; }
.social-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
}
.social-card {
    display: flex;
    flex-direction: column;
    padding: 16px;
    border-radius: 14px;
    background: #f6fdfb;
    border: 1px solid var(--line);
    text-decoration: none;
    color: var(--text);
    transition: all 0.22s;
}
.social-card:hover { background: var(--cyan-soft); transform: translateY(-3px); }
.social-name { font-size: 16px; font-weight: 600; color: var(--cyan-deep); }
.social-handle { font-size: 13px; color: var(--text-light); margin-top: 4px; }
.contact-list { display: flex; flex-direction: column; gap: 10px; max-width: 520px; }
.contact-item {
    display: flex;
    gap: 14px;
    padding: 12px 16px;
    border-radius: 12px;
    background: #f6fdfb;
    border: 1px solid var(--line);
    flex-wrap: wrap;
}
.contact-label { flex-shrink: 0; font-weight: 600; color: var(--cyan-deep); min-width: 70px; }
.contact-value { color: var(--text); word-break: break-all; }
.contact-note { margin-top: 14px; font-size: 13px; color: var(--text-light); }
/* ============ 响应式 ============ */
@media (max-width: 640px) {
    .blog-title { font-size: 28px; }
    .hero { height: 230px; }
    .hero-short { height: 180px; }
    .hero-tags span { font-size: 12px; padding: 3px 10px; }
    .main-nav { top: 42px; gap: 3px; }
    .nav-link { font-size: 13px; padding: 5px 11px; }
    .panel { padding: 20px 16px 24px; }
    .home-sticker { width: 110px; height: 110px; }
    .about-avatar { width: 100px; height: 100px; }
    /* 移动端：首页中上部双栏改为单栏堆叠 */
    .home-top { grid-template-columns: 1fr; }
    .entry-grid { grid-template-columns: 1fr; }
    .entry-card { flex-direction: row; align-items: center; text-align: left; }
    .entry-icon { font-size: 26px; margin-bottom: 0; margin-right: 12px; }
}
/* ===== 首页：中上部双栏（欢迎 + 心情抽签） ===== */
.home-top {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 20px;
    align-items: start;
}
.home-welcome { margin-bottom: 0; }
.home-welcome p { margin-bottom: 10px; }
.home-welcome .home-sticker {
    margin-top: 10px;
    display: block;
}
.mood-panel { margin-bottom: 0; }
/* ===== 首页：功能入口跳转卡片 ===== */
.entry-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 22px;
    margin-bottom: 26px;
}
.entry-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 24px 16px;
    border-radius: 18px;
    background: var(--card);
    border: 1px solid var(--line);
    box-shadow: 0 6px 24px rgba(15, 138, 134, 0.08);
    text-decoration: none;
    color: var(--text);
    transition: all 0.25s;
    animation: panelIn 0.5s ease both;
}
.entry-card:nth-child(2) { animation-delay: 0.08s; }
.entry-card:nth-child(3) { animation-delay: 0.16s; }
.entry-card:hover {
    background: var(--cyan-soft);
    transform: translateY(-4px);
    box-shadow: 0 10px 28px rgba(15, 138, 134, 0.16);
}
.entry-icon { font-size: 34px; margin-bottom: 10px; }
.entry-title { font-size: 18px; font-weight: 700; color: var(--cyan-deep); }
.entry-desc { font-size: 13px; color: var(--text-light); margin-top: 4px; }
/* ===== 独立阅读页（read.html） ===== */
.read-container {
    max-width: 780px;
    margin-top: 8px;
}
.read-top { margin-bottom: 12px; }
.read-top .back-btn {
    display: inline-block;
    text-decoration: none;
}
.note-article h3 {
    font-size: 24px;
    color: var(--cyan-deep);
    margin-bottom: 4px;
}
.note-article .note-meta { font-size: 13px; color: var(--text-light); margin-bottom: 16px; }
.note-article p { margin-bottom: 12px; }
.note-article img {
    max-width: 100%;
    border-radius: 12px;
    box-shadow: 0 4px 14px rgba(15,138,134,0.2);
    margin: 10px 0;
    display: block;
}
.note-article video {
    max-width: 100%;
    border-radius: 12px;
    margin: 10px 0;
    display: block;
    background: #000;
}
.note-article code {
    background: var(--cyan-soft);
    color: var(--cyan-deep);
    padding: 1px 6px;
    border-radius: 5px;
    font-size: 14px;
}

/* ===================== 极简版 simple.html 专用样式 + 兜底防裁切 ===================== */
.simple-page {
    background: #f8fffe;
    color: #25424b;
}
.simple-panel {
    background: #ffffff;
    border:1px solid var(--line);
    border-radius:14px;
    padding:20px;
    margin-bottom:16px;
    overflow-wrap: break-word;
}
.simple-page .note-item,
.simple-page .res-item {
    flex-wrap: wrap;
}
