/*
relapse - a Pelican theme using Bootstrap 
Copyright (c) 2012-2016 Warren Moore
https://github.com/wamonite/relapse
*/
@media screen and (min-width: 767px)
{
  header
  {
    background-color: #016cdb;
  }
  header .container h1
  {
    font-family: 'Chelsea Market', "Helvetica Neue", Helvetica, Arial, sans-serif;
    border-bottom: 0;
    text-shadow: 2px 2px 5px #000000;
  }
  section#body
  {
    padding-top: 10px;
  }
  header .container h1 a
  {
    color: #fff;
  }
  header .container h1 a:hover
  {
    color: #ddd;
  }
}

@media screen and (max-width: 767px)
{
  header .container h1
  {
    font-family: 'Chelsea Market', "Helvetica Neue", Helvetica, Arial, sans-serif;
    border-bottom: 0;
    text-shadow: 1px 1px 2px #000000;
  }
}

body
{
  font-family: "PT Serif", Georgia, "Times New Roman", Times, serif;
}
header
{
  padding: 10px 0 10px;
}
header .container h1
{
  margin: 0 0 0;
}
header .container p
{
  margin: 5px 0 0;
  border-bottom: 0;
  color: #000;
}
a,a:hover,a:visited,a:active,a:link
{
  text-decoration: none;
}
h1,h2,h3,h4,h5,h6
{
  border-bottom: 1px solid #bbb;
}
section#body nav
{
  margin-bottom: 0;
}
article .info
{
  font-size: smaller;
  margin-top: 2px;
}
section#content nav
{
  text-align: center;
}
section#side h1
{
  font-size: 18px;
}
section#side h1.bio
{
  border-bottom: none;
}
section#side p
{
  text-align: center;
}
footer
{
  margin-top: 20px;
  text-align: center;
  border-top: 1px solid #bbb;
}
:not(pre) > code
{
  color: #000;
  background-color: #f5f2f0;
  font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
}
.page-header
{
  padding-bottom: 0;
  margin: 0 0 0;
}
[data-lightbox] > img
{
  padding: 2px;
  border-radius: 6px;
  background-color: #fff;
  transition: background-color 0.5s ease-out;
}
[data-lightbox] > img:hover
{
  background-color: #337ab7;
  transition: none;
}
article table
{
  border: 0;
  width: 100%;
}
article table th, article table td
{
  border: 0;
  padding: 2px;
}

/* --- 顶部 Banner 响应式布局 --- */

header {
    /* 关键：使用 ../ 返回上一级目录寻找 images 文件夹 */
    background-image: url('../images/left_banner_English_en_1.jpg') !important;
    
    /* 确保图片铺满且不变形 */
    background-size: cover; 
    background-position: center;
    background-repeat: no-repeat;
    
    /* 设定高度，防止内容塌陷 */
    min-height: 140px; 
    
    /* 隐藏文字 "英语学习笔记" */
    text-indent: -9999px;
    overflow: hidden;
    
    /* 移除原有的蓝色背景或边框 */
    background-color: transparent !important;
    border-bottom: none !important;
}

/* 针对移动端（手机）的适配 */
@media (max-width: 768px) {
    header {
        /* 手机端使用小图，同样注意路径 */
        background-image: url('../images/left_banner_English_en_2.jpg') !important;
        min-height: 70px; /* 手机端高度可以设小一点 */
    }
}

footer {
    font-family: "Microsoft YaHei", "PingFang SC", sans-serif;  /* 字体 */
    padding-bottom: 90px;
}

/* ===== 全局字体与排版优化 ===== */
body {
    font-size: 16px;              /* 基础字号调大 */
    line-height: 1.8;             /* 行高加大，阅读更舒适 */
    color: #333;                  /* 正文颜色加深 */
    letter-spacing: 0.5px;        /* 字间距微调，中文更透气 */
}

/* 文章正文区域限制宽度，避免一行太长看着累 */
article, .entry-content, .post-content {
    max-width: 720px;
    margin: 0 auto;
}

/* 段落间距 */
p {
    margin-bottom: 1.2em;
}

/* 标题层级优化 */
h1 {
    font-size: 2em;
    line-height: 1.3;
    margin-bottom: 0.8em;
}
h2 {
    font-size: 1.6em;
    line-height: 1.4;
    margin-bottom: 0.6em;
}
h3 {
    font-size: 1.3em;
    line-height: 1.4;
    margin-bottom: 0.5em;
}

/* 链接样式优化 */
a {
    color: #0066cc;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s;
}
a:hover {
    border-bottom-color: #0066cc;
}

/* 图片自适应 */
img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

/* 代码块美化 */
pre {
    background: #f6f8fa;
    padding: 16px;
    border-radius: 6px;
    overflow-x: auto;
    font-size: 14px;
    line-height: 1.6;
}
code {
    background: #f0f0f0;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.9em;
}

/* 引用块美化 */
blockquote {
    border-left: 4px solid #0066cc;
    padding: 12px 20px;
    margin: 1.5em 0;
    background: #f9f9f9;
    color: #555;
}

/* ===== 移动端适配 ===== */

/* 平板及以下屏幕 */
@media screen and (max-width: 768px) {
    body {
        font-size: 15px;
        padding: 0 16px;        /* 左右留边距，文字不贴屏幕边缘 */
    }

    /* 文章区域取消固定宽度，撑满屏幕 */
    article, .entry-content, .post-content {
        max-width: 100%;
        padding: 0 4px;
    }

    /* 标题字号缩小，适配小屏 */
    h1 {
        font-size: 1.6em;
    }
    h2 {
        font-size: 1.35em;
    }
    h3 {
        font-size: 1.15em;
    }

    /* 图片自适应，不超出屏幕 */
    img {
        max-width: 100%;
        height: auto;
    }

    /* 代码块横向滚动，不撑破页面 */
    pre {
        font-size: 13px;
        padding: 12px;
        overflow-x: auto;
        white-space: pre;
    }

    /* 表格自适应 */
    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    /* 引用块缩小内边距 */
    blockquote {
        padding: 10px 14px;
        margin: 1em 0;
    }
}

/* 手机屏幕 */
@media screen and (max-width: 480px) {
    body {
        font-size: 14px;
        padding: 0 12px;
    }

    h1 {
        font-size: 1.4em;
    }
    h2 {
        font-size: 1.2em;
    }

    /* 代码块字号再小一点 */
    pre {
        font-size: 12px;
        padding: 10px;
    }
}

/* =========================================
   底部音乐播放器
   ========================================= */
#music-player {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #b00479;
    color: #fff;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.3);
    z-index: 1000;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    padding: 8px 0;
}

/* 播放器内部容器 —— 改为纵向排列两行 */
.player-controls {
    width: 95%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;   /* 关键：纵向排列 top-row 和 bottom-row */
    align-items: center;
    gap: 6px;
}

/* --- 第一行：歌名 + 按钮 --- */
.top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 10px;
}

/* 歌曲信息 */
.track-info {
    flex: 1;
    min-width: 0;             /* 防止 flex 子项溢出 */
    font-size: 14px;
    font-weight: bold;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 按钮通用样式 */
.player-controls button {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background 0.3s, transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;           /* 按钮不被压缩 */
}

.player-controls button:hover {
    background-color: rgba(255,255,255,0.2);
    transform: scale(1.1);
}

/* --- 第二行：进度条 + 音量 --- */
.bottom-row {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 10px;
}

/* 进度条区域 */
.progress-container {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    flex: 1;                  /* 进度条占据剩余空间 */
    min-width: 0;
}

#progress-bar {
    flex: 1;
    cursor: pointer;
    accent-color: #fff;
}

/* 音量控制 */
.volume-container {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

#volume-slider {
    width: 80px;
    cursor: pointer;
    accent-color: #fff;
}