/* 移动端样式文件 */
/* 主要定义手机屏幕下的页面布局和外观 */

/* 导入Google字体 */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500&display=swap');

/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 页面基础样式 */
body {
    font-family: 'Noto Sans SC', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
    font-size: 16px; /* 移动端字体稍大 */
}

/* 主头部样式 - 天蓝色渐变背景 */
.main-header {
    /* 从上到下、由深到浅的天蓝色渐变 */
    background: linear-gradient(180deg, #4a90e2 0%, #7bb3f0 100%);
    padding: 12px 0;
    box-shadow: 0 2px 10px rgba(74, 144, 226, 0.3);
}

/* 头部容器布局 */
.header-container {
    max-width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column; /* 移动端垂直排列 */
    align-items: center;
    padding: 0 15px;
    text-align: center;
}

/* 左侧Logo区域 */
.header-left .logo-link {
    display: flex;
    flex-direction: column; /* 移动端垂直排列 */
    align-items: center;
    text-decoration: none;
    /* 移除边框 */
    border: none;
    margin-bottom: 10px;
}

/* Logo图片样式 */
.logo-img {
    width: 50px; /* 移动端稍小 */
    height: 50px;
    /* 背景透明 */
    background: transparent;
    /* 无边框 */
    border: none;
    margin-bottom: 8px;
}

/* 网站名称样式 */
.site-name {
    color: white;
    font-size: 24px; /* 移动端稍小 */
    font-weight: 500;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* 右侧公告区域 */
.header-right .announcement {
    color: white;
    font-size: 16px; /* 移动端稍小 */
    font-weight: 300;
}

/* 主要内容区域 */
.main-content {
    min-height: calc(100vh - 180px);
    padding: 20px 10px;
}

/* 容器样式 */
.container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 10px;
}

/* 首页垂直布局（移动端） */
.home-list {
    margin-top: 30px;
}

/* 年级项目（移动端） */
.grade-item {
    background: white;
    border-radius: 12px;
    margin-bottom: 20px;
    padding: 25px 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

/* 年级项目悬停效果（移动端） */
.grade-item:active {
    transform: scale(0.98);
}

/* 年级标题（移动端） */
.grade-title {
    font-size: 24px;
    color: #4a90e2;
    margin-bottom: 10px;
    font-weight: 500;
    text-align: center;
}

/* 年级描述（移动端） */
.grade-desc {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
    text-align: center;
}

/* 进入按钮（移动端） */
.enter-btn {
    background: linear-gradient(45deg, #4a90e2, #7bb3f0);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 20px;
    font-size: 16px;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s ease;
}

/* 列表页样式（移动端） */
.list-header {
    display: flex;
    flex-direction: column; /* 移动端垂直排列 */
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* 返回按钮组（移动端） */
.back-buttons {
    display: flex;
    gap: 10px;
    width: 100%;
}

/* 返回按钮（移动端） */
.back-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    flex: 1;
    text-align: center;
    font-size: 14px;
}

/* 批量下载区域（移动端） */
.batch-download {
    margin-bottom: 15px;
    padding: 12px;
    background: #e3f2fd;
    border-radius: 8px;
}

/* 下载按钮（移动端） */
.download-selected {
    background: #28a745;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    width: 100%;
    font-size: 16px;
}

/* 试题列表（移动端） */
.exam-list {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* 列表项（移动端） */
.exam-item {
    display: flex;
    flex-direction: column; /* 移动端垂直排列 */
    padding: 15px;
    border-bottom: 1px solid #eee;
    transition: background-color 0.3s ease;
}

/* 列表项悬停效果（移动端） */
.exam-item:active {
    background-color: #f8f9fa;
}

/* 列表项最后一项去掉下边框 */
.exam-item:last-child {
    border-bottom: none;
}

/* 试题信息区域（移动端） */
.exam-info {
    margin-bottom: 10px;
}

/* 试题标题（移动端） */
.exam-info h3 {
    color: #4a90e2;
    margin-bottom: 5px;
    font-size: 18px;
}

/* 试题学期信息（移动端） */
.exam-info p {
    color: #666;
    font-size: 14px;
}

/* 列表项底部操作区（移动端） */
.exam-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* 复选框样式（移动端） */
.exam-checkbox {
    margin-right: 10px;
    transform: scale(1.3);
}

/* 详情按钮（移动端） */
.detail-btn {
    background: #4a90e2;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
}

/* 详情页样式（移动端） */
.detail-header {
    display: flex;
    flex-direction: column; /* 移动端垂直排列 */
    gap: 15px;
    margin-bottom: 15px;
    padding: 15px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* 双按钮布局（移动端） */
.detail-nav {
    display: flex;
    flex-direction: row; /* 移动端垂直排列 */
    gap: 10px;
    width: 100%;
}

/* 操作按钮通用样式（移动端） */
.action-btn {
    padding: 8px 8px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    font-size: 16px;
    width: 100%;
}

/* 预览按钮（移动端） */
.preview-btn {
    background: #17a2b8;
    color: white;
}

/* 打印按钮（移动端） */
.print-btn {
    background: #ffc107;
    color: #212529;
}

/* 全屏按钮（移动端） */
.fullscreen-btn {
    background: #6f42c1;
    color: white;
}

/* PDF预览容器（移动端） */
.pdf-preview {
    background: white;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 15px;
}

/* PDF.js容器（移动端） */
.pdf-js-container {
    width: 100%;
    height: 400px; /* 移动端高度适中 */
    border: 1px solid #ddd;
    border-radius: 5px;
    background: #f8f9fa;
}

/* 全屏模态框（移动端） */
.fullscreen-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    z-index: 9999;
}

/* 全屏内容（移动端） */
.fullscreen-content {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* 全屏头部（移动端） */
.fullscreen-header {
    background: #333;
    color: white;
    padding: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* 关闭按钮（移动端） */
.close-btn {
    background: #8B8B83;
    color: white;
    border: none;
    padding: 5px 9px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 18px;
}

/* PDF.js全屏容器（移动端） */
.fullscreen-pdf-container {
    flex: 1;
    width: 100%;
}

/* 底部样式（移动端） */
.main-footer {
    background: #343a40;
    color: white;
    padding: 15px 0 10px;
}

/* 底部容器（移动端） */
.footer-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 10px;
}

/* 底部区块（移动端） */
.footer-section {
    margin-bottom: 5px;
}

/* 底部区块标题（移动端） */
.footer-section h4 {
    margin-bottom: 10px;
    color: #4a90e2;
    font-size: 16px;
}

/* 底部文本（移动端） */
.footer-section p {
    font-size: 10px;
    line-height: 1.5;
    margin-bottom: 8px;
}

/* 隐藏PC端特定元素（移动端） */
.home-grid {
    display: none;
}

/* 显示移动端特定元素 */
.home-list {
    display: block;
}