/* =========================================================
   notes.css — 笔记页（学科首页 + 详情页）
   依赖：style.css
   ========================================================= */

/* =========================================================
   一、学科首页（notes/math.html）— 笔记列表
   ========================================================= */

.notes-main {
    position: relative;
    z-index: 10;
    max-width: 860px;
    margin: 0 auto;
    padding: 130px 60px 80px;
}

.notes-main .back-link {
    display: inline-block;
    color: rgba(255, 255, 255, 0.55);
    text-decoration: none;
    font-size: 16px;
    letter-spacing: 1px;
    margin-bottom: 24px;
    transition: color 0.3s;
}

.notes-main .back-link:hover {
    color: #ffcc00;
}

.notes-main h1 {
    font-size: 38px;
    font-weight: 300;
    letter-spacing: 6px;
    text-align: center;
    margin-bottom: 12px;
    text-shadow: 0 0 12px rgba(255, 255, 255, 0.6);
}

.notes-main .note-meta {
    text-align: center;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.55);
    letter-spacing: 2px;
    margin-bottom: 50px;
}

/* 笔记列表 */
.notes-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 单条笔记卡片 */
.note-item {
    display: block;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 24px 28px;
    text-decoration: none;
    color: #fff;
    transition: transform 0.3s, border-color 0.3s, background 0.3s, box-shadow 0.3s;
}

.note-item:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 204, 0, 0.6);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.note-item-title {
    font-size: 20px;
    letter-spacing: 2px;
    color: #fff;
    margin-bottom: 10px;
    transition: color 0.3s;
}

.note-item:hover .note-item-title {
    color: #ffcc00;
}

.note-item-more {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 1px;
    transition: color 0.3s, transform 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.note-item:hover .note-item-more {
    color: #ffcc00;
    transform: translateX(4px);
}

/* =========================================================
   二、笔记详情页（notes/math/xxx.html）— 内嵌 PDF
   ========================================================= */

.note-detail {
    position: relative;
    z-index: 10;
    max-width: 1100px;
    margin: 0 auto;
    padding: 130px 30px 80px;
}

.note-detail .back-link {
    display: inline-block;
    color: rgba(255, 255, 255, 0.55);
    text-decoration: none;
    font-size: 16px;
    letter-spacing: 1px;
    margin-bottom: 24px;
    transition: color 0.3s;
}

.note-detail .back-link:hover {
    color: #ffcc00;
}

.note-detail h1 {
    font-size: 34px;
    font-weight: 300;
    letter-spacing: 4px;
    text-align: center;
    margin-bottom: 12px;
    text-shadow: 0 0 12px rgba(255, 255, 255, 0.6);
}

.note-detail .note-meta {
    text-align: center;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 2px;
    margin-bottom: 40px;
}

/* PDF 预览框 */
.note-pdf-frame {
    width: 100%;
    height: 85vh;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(0, 0, 0, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.note-pdf-frame iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* 协议声明 */
.note-license {
    margin-top: 50px;
    padding: 24px 28px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    text-align: center;
    font-size: 14px;
    line-height: 1.9;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 1px;
}

.note-license a {
    color: #ffcc00;
    text-decoration: none;
}

.note-license a:hover {
    text-decoration: underline;
}

/* =========================================================
   空状态
   ========================================================= */

.talks-empty {
    text-align: center;
    padding: 80px 20px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 15px;
    letter-spacing: 1px;
}

/* =========================================================
   手机适配
   ========================================================= */

@media (max-width: 1024px) {
    .notes-main,
    .note-detail {
        padding: 100px 20px 60px;
    }

    .notes-main h1,
    .note-detail h1 {
        font-size: 28px;
        letter-spacing: 4px;
    }

    .notes-main .note-meta,
    .note-detail .note-meta {
        margin-bottom: 36px;
    }

    .note-item {
        padding: 20px 22px;
    }

    .note-item-title {
        font-size: 17px;
    }

    .note-pdf-frame {
        height: 65vh;
    }
}

/* 手机端按钮，桌面端隐藏 */
.note-pdf-mobile {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    background: rgba(255, 204, 0, 0.15);
    border: 1px solid rgba(255, 204, 0, 0.4);
    border-radius: 10px;
    color: #ffcc00;
    text-decoration: none;
    font-size: 15px;
    letter-spacing: 1px;
    margin: 20px auto;
    width: fit-content;
}

/* 手机端：隐藏 iframe，显示按钮 */
@media (max-width: 1024px) {
    .note-pdf-frame {
        display: none;
    }

    .note-pdf-mobile {
        display: flex;              /* ← 改成 flex */
        width: fit-content;         /* ← 宽度自适应 */
        margin: 20px auto;          /* ← 水平居中 */
    }
}