/* --- 基础设置 (保留之前的变量和导航栏样式) --- */
:root {
    --brand-magenta: #9e005d; 
    --brand-magenta-dark: #7a0048;
    --text-dark: #333333;
    --text-light: #ffffff;
    --bg-light: #f7f7f7;
    --border-color: #e0e0e0;
    --font-main: 'Open Sans', sans-serif;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-md: 0 8px 24px rgba(0,0,0,0.12);
}
* { margin: 0; padding: 0; box-sizing: border-box; font-family: var(--font-main); }
body { background-color: #ffffff; color: var(--text-dark); line-height: 1.6; overflow-x: hidden; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
[v-cloak] { display: none !important; } /* 防止Vue加载闪烁 */

/* --- 导航栏和原有组件样式保持不变 --- */
.navbar { background-color: var(--brand-magenta); color: var(--text-light); padding: 0 2rem; position: sticky; top: 0; z-index: 100; box-shadow: 0 2px 10px rgba(0,0,0,0.2); }
.nav-container { max-width: 1200px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; height: 70px; }
.logo h1 { font-size: 1.8rem; font-weight: 800; }
.nav-links { display: flex; gap: 2rem; }
.nav-links a { font-size: 0.95rem; font-weight: 600; padding: 10px 0; opacity: 0.8; transition: all 0.3s;}
.nav-links a:hover, .nav-links a.active { opacity: 1; border-bottom: 2px solid white; }
.nav-actions { display: flex; align-items: center; gap: 1.5rem; }
.icon-btn { background: none; border: none; color: white; font-size: 1.2rem; cursor: pointer; }
.login-btn { background: transparent; color: white; border: 1px solid white; padding: 8px 20px; border-radius: 20px; font-weight: 600; cursor: pointer; transition: all 0.3s; }
.login-btn:hover { background: white; color: var(--brand-magenta); }
.cart-wrapper { position: relative; cursor: pointer; }
.cart-badge { position: absolute; top: -8px; right: -10px; background: #ff3b30; color: white; font-size: 0.7rem; font-weight: bold; padding: 2px 6px; border-radius: 50%; }

/* --- Hero & Features (首页) --- */
.hero-section { background-color: var(--brand-magenta); color: white; display: flex; align-items: center; padding: 4rem 2rem; }
.hero-content { flex: 1; max-width: 600px; margin-left: 10%; }
.hero-title { font-size: 3.5rem; font-weight: 800; margin-bottom: 1rem; line-height: 1.1; }
.hero-subtitle { font-size: 1.2rem; margin-bottom: 2rem; opacity: 0.9; }
.cta-btn { background-color: #007bff; color: white; border: none; padding: 15px 30px; font-size: 1.1rem; font-weight: 700; border-radius: 30px; cursor: pointer; }
.hero-image { flex: 1; display: flex; justify-content: center; }
.hero-image img { width: 80%; border-radius: 10px; box-shadow: var(--shadow-md); }

.features-section { display: flex; max-width: 1200px; margin: -40px auto 40px; background: white; box-shadow: var(--shadow-md); position: relative; z-index: 10; }
.feature-box { flex: 1; padding: 2.5rem; border-right: 1px solid var(--border-color); text-align: left; }
.feature-box:last-child { border-right: none; }
.feature-icon { font-size: 2.5rem; color: var(--brand-magenta); margin-bottom: 1rem; }
.feature-box h3 { font-size: 1.4rem; margin-bottom: 0.5rem; }
.feature-box p { font-size: 0.95rem; color: #666; margin-bottom: 1.5rem; }

/* ================= 新增页面样式 ================= */
.page-section { padding: 4rem 2rem; min-height: 60vh; }
.container { max-width: 1200px; margin: 0 auto; }
.section-header { text-align: center; margin-bottom: 3rem; }
.section-header h2 { font-size: 2.5rem; color: var(--brand-magenta); margin-bottom: 10px;}
.bg-light { background-color: var(--bg-light); }

/* --- 注册/登录 (Auth Page) --- */
.auth-page { display: flex; justify-content: center; align-items: center; min-height: 80vh; background: var(--bg-light); padding: 2rem; }
.auth-container { display: flex; background: white; border-radius: 12px; overflow: hidden; box-shadow: var(--shadow-md); max-width: 900px; width: 100%; }
.auth-image { flex: 1; background: #eee; }
.auth-image img { width: 100%; height: 100%; object-fit: cover; }
.auth-form-box { flex: 1; padding: 3rem; display: flex; flex-direction: column; justify-content: center; }
.auth-form-box h2 { font-size: 2rem; color: var(--brand-magenta); margin-bottom: 5px; }
.auth-sub { color: #666; margin-bottom: 25px; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-weight: 600; margin-bottom: 8px; font-size: 0.9rem; }
.input-field { width: 100%; padding: 12px 15px; border: 1px solid #ccc; border-radius: 4px; font-size: 1rem; transition: border-color 0.3s; }
.input-field:focus { border-color: var(--brand-magenta); outline: none; }
.auth-submit { width: 100%; background: var(--brand-magenta); color: white; border: none; padding: 14px; font-size: 1.1rem; font-weight: 700; border-radius: 4px; cursor: pointer; margin-top: 10px; }
.auth-switch { margin-top: 20px; text-align: center; font-size: 0.9rem; }
.auth-switch a { color: var(--brand-magenta); font-weight: 700; text-decoration: underline; }

/* --- 日历 (Calendar) ABRSM风格 --- */
.calendar-ui { background: white; border: 1px solid var(--border-color); border-radius: 8px; overflow: hidden; box-shadow: var(--shadow-sm); }
.calendar-header { display: flex; justify-content: space-between; align-items: center; padding: 20px; background: #f9f9f9; border-bottom: 1px solid #eee; }
.calendar-header h3 { font-size: 1.5rem; color: var(--text-dark); }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.day-name { text-align: center; font-weight: 700; padding: 15px 0; border-bottom: 2px solid var(--brand-magenta); background: white; }
.day { min-height: 100px; padding: 10px; border-right: 1px solid #eee; border-bottom: 1px solid #eee; position: relative; font-weight: 600; }
.day.empty { color: #ccc; background: #fafafa; }
.event-day { background: #fdf5f9; }
.event-dot { display: inline-block; width: 8px; height: 8px; background: var(--brand-magenta); border-radius: 50%; margin-left: 5px; }
.project-due { background: rgba(255, 59, 48, 0.1); }
.due-tag { display: block; background: #ff3b30; color: white; font-size: 0.7rem; padding: 3px 6px; border-radius: 4px; margin-top: 5px; width: fit-content; }

/* --- 课程与资源列表 (List Grid) --- */
.list-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 30px; }
.list-card { background: white; border: 1px solid var(--border-color); border-radius: 8px; overflow: hidden; transition: transform 0.3s; }
.list-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.card-img {
    height: 180px;
    background-size: cover;      /* 🚨 核心：图片自动拉伸铺满 */
    background-position: center; /* 🚨 核心：居中显示 */
    background-repeat: no-repeat;
    position: relative;
    background-color: #eee;      /* 如果没图，显示灰色底 */
}
.card-img .tag { position: absolute; top: 15px; left: 15px; background: var(--brand-magenta); color: white; font-size: 0.75rem; font-weight: 700; padding: 5px 10px; border-radius: 4px; }
.card-body { padding: 20px; }
.card-body h4 { font-size: 1.1rem; margin-bottom: 10px; }
.card-body .duration { color: #666; font-size: 0.9rem; margin-bottom: 15px; }
.outline-btn { width: 100%; background: transparent; border: 2px solid var(--brand-magenta); color: var(--brand-magenta); font-weight: 700; padding: 10px; border-radius: 4px; cursor: pointer; transition: 0.3s; }
.outline-btn:hover { background: var(--brand-magenta); color: white; }

/* --- Bookstore Grid (沿用之前) --- */
.book-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 30px; }
.book-card { background: white; border: 1px solid var(--border-color); border-radius: 8px; overflow: hidden; transition: all 0.3s; display: flex; flex-direction: column; }
.book-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.book-img-wrapper { background: #eef2f5; padding: 20px; display: flex; justify-content: center; }
.book-img-wrapper img { height: 200px; object-fit: cover; box-shadow: 2px 4px 10px rgba(0,0,0,0.1);}
.book-info { padding: 20px; display: flex; flex-direction: column; flex-grow: 1; }
.category { font-size: 0.75rem; font-weight: 700; color: #888; letter-spacing: 1px; margin-bottom: 5px;}
.price { font-size: 1.2rem; font-weight: 800; color: var(--brand-magenta); margin-bottom: 15px; }
.add-cart-btn { margin-top: auto; width: 100%; padding: 12px; background: white; border: 2px solid var(--brand-magenta); color: var(--brand-magenta); font-weight: 700; border-radius: 4px; cursor: pointer; transition: 0.3s; }
.add-cart-btn:hover { background: var(--brand-magenta); color: white; }

/* --- 购物车、Footer、动画 --- */
.cart-sidebar { position: fixed; top: 0; right: 0; width: 350px; height: 100vh; background: white; z-index: 1000; box-shadow: -5px 0 15px rgba(0,0,0,0.1); display: flex; flex-direction: column; }
.cart-header { padding: 20px; background: var(--brand-magenta); color: white; display: flex; justify-content: space-between; align-items: center; }
.close-btn { background: none; border: none; color: white; font-size: 1.5rem; cursor: pointer;}
.cart-items { flex-grow: 1; overflow-y: auto; padding: 20px; }
.cart-item { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #eee; padding: 15px 0; }
.remove-btn { background: none; border: none; color: #ff3b30; cursor: pointer; }
.cart-footer { padding: 20px; border-top: 1px solid #eee; }
.cart-total { font-size: 1.2rem; font-weight: 800; margin-bottom: 15px; text-align: right; }
.checkout-btn { width: 100%; padding: 15px; background: #000; color: white; font-weight: 700; cursor: pointer; border: none;}
.overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 999; }
.footer { background: var(--brand-magenta-dark); color: white; padding: 4rem 2rem; }
.footer-grid { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }

/* Vue 路由切换动画 */
.page-fade-enter-active, .page-fade-leave-active { transition: opacity 0.3s ease, transform 0.3s ease; }
.page-fade-enter-from { opacity: 0; transform: translateY(10px); }
.page-fade-leave-to { opacity: 0; transform: translateY(-10px); }
.slide-enter-active, .slide-leave-active { transition: transform 0.4s cubic-bezier(0.82, 0.085, 0.395, 0.895); }
.slide-enter-from, .slide-leave-to { transform: translateX(100%); }

/* --- 新闻页面特有样式 --- */
.news-date { color: var(--brand-magenta); font-weight: 800; font-size: 0.85rem; margin-bottom: 8px; letter-spacing: 1px;}
.news-excerpt { color: #555; font-size: 0.95rem; margin-bottom: 20px; line-height: 1.5; }
.text-btn { background: none; border: none; color: var(--brand-magenta); font-weight: 700; font-size: 0.9rem; cursor: pointer; padding: 0; display: flex; align-items: center; gap: 5px; transition: transform 0.3s;}
.text-btn:hover { transform: translateX(5px); }

/* --- Policy & Privacy 纯文本阅读页面的高级排版 (窄版心设计) --- */
.text-page-container {
    max-width: 800px; /* 故意变窄，符合人眼最佳阅读宽度 */
    margin: 0 auto;
    background: white;
    padding: 3rem 4rem; /* 增加大留白 */
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}
@media (max-width: 768px) {
    .text-page-container { padding: 2rem; }
}
.text-page-title { font-size: 2.2rem; color: #111; margin-bottom: 5px; }
.last-updated { color: #888; font-size: 0.9rem; font-style: italic; margin-bottom: 20px; }
.divider { border: none; border-top: 1px solid #eee; margin-bottom: 30px; }
.text-page-container h3 { font-size: 1.4rem; color: var(--brand-magenta); margin-top: 30px; margin-bottom: 15px; }
.text-page-container p { color: #444; margin-bottom: 15px; font-size: 1.05rem; line-height: 1.7; }
.text-page-container ul { margin-left: 20px; margin-bottom: 20px; color: #444; list-style-type: disc; }
.text-page-container ul li { margin-bottom: 8px; line-height: 1.6; }

/* --- 修复 footer 社媒图标 a 标签的默认样式 --- */
.social-icons a { color: white; text-decoration: none; transition: opacity 0.3s; }
.social-icons a:hover { opacity: 0.7; }
/* --- 修复社媒图标拥挤的问题 (加宽 gap 并增大图标) --- */
.social-icons { 
    display: flex; 
    gap: 25px; /* 这里控制图标之间的距离，越大越开 */
    font-size: 1.8rem; /* 图标变大一点更美观 */
    margin-top: 10px;
}

/* --- 新闻详情页 返回按钮样式 --- */
.back-btn {
    background: transparent;
    border: 1px solid var(--brand-magenta);
    color: var(--brand-magenta);
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}
.back-btn:hover {
    background: var(--brand-magenta);
    color: white;
}
/* --- 管理员面板和表格 --- */
.admin-panel { background: white; border-radius: 8px; box-shadow: var(--shadow-md); padding: 20px; border: 1px solid var(--border-color); overflow-x: auto; }
.admin-panel h3 { margin-bottom: 20px; color: #333; }
.admin-table { width: 100%; border-collapse: collapse; text-align: left; }
.admin-table th { background: #f0f0f0; padding: 12px 15px; font-weight: 700; color: #444; border-bottom: 2px solid #ddd; }
.admin-table td { padding: 12px 15px; border-bottom: 1px solid #eee; vertical-align: middle; }
.admin-table tr:hover { background-color: #fafafa; }

/* 运输方式标签 */
.ship-badge { padding: 5px 10px; border-radius: 20px; font-size: 0.8rem; font-weight: 700; display: inline-flex; align-items: center; gap: 5px; }
.badge-ship { background: #e3f2fd; color: #1976d2; }
.badge-plane { background: #fff3e0; color: #f57c00; }

/* Admin 编辑/删除按钮 */
.admin-action-btn { background: #000; color: white; border: none; padding: 8px 15px; border-radius: 4px; font-weight: 600; cursor: pointer; font-size: 0.9rem; margin-top: 10px;}
.admin-delete-btn { width: 100%; background: #ff3b30; color: white; border: none; padding: 10px; font-weight: 700; border-radius: 4px; cursor: pointer; margin-top: 5px;}

/* 结账弹窗 */
.checkout-modal-wrapper { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); z-index: 1100; display: flex; justify-content: center; align-items: center; }
.checkout-modal { 
    background: white; 
    width: 90%; 
    max-width: 500px; 
    padding: 30px; 
    border-radius: 12px; 
    box-shadow: var(--shadow-md); 
    /* 🚨 核心修复：限制弹窗最高只能占屏幕的 90%，超出部分出现下拉滚动条 */
    max-height: 90vh; 
    overflow-y: auto; 
}
select.input-field { appearance: auto; cursor: pointer; }

/* 支付方式网格布局 */
.payment-options {
    display: grid;
    grid-template-columns: 1fr 1fr; /* 两列显示 */
    gap: 10px;
}

.payment-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.85rem;
    font-weight: 700;
}

.payment-btn:hover {
    border-color: var(--brand-magenta);
    background-color: #fdf5f9;
}

.payment-btn img {
    height: 25px; /* 统一 Logo 高度 */
    width: auto;
}

/* 二维码容器样式 */
.qr-code {
    width: 250px;
    height: auto;
    border: 1px solid #eee;
    padding: 10px;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}
/* 支付方式按钮组布局 */
.payment-options {
    display: grid;
    grid-template-columns: 1fr; /* 垂直排列，更好看 */
    gap: 12px;
}

/* 支付方式按钮样式 */
.payment-item-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 15px;
    background-color: white;
    border: 2px solid #eee;
    border-radius: 8px;
    color: #333;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.payment-item-btn i {
    font-size: 1.2rem;
    color: var(--brand-magenta); /* 图标使用主题色 */
}

.payment-item-btn:hover {
    border-color: var(--brand-magenta);
    background-color: #fdf5f9;
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

/* 针对选中的按钮可以加一个激活态（可选） */
.payment-item-btn:active {
    transform: scale(0.98);
}
/* --- 全局搜索弹窗样式 --- */
.search-modal-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1200;
    display: flex;
    justify-content: center;
    align-items: flex-start; /* 从顶部出现 */
    padding-top: 10vh;
}

.search-modal-content {
    background: white;
    width: 90%;
    max-width: 700px;
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    position: relative;
}

.search-results-list {
    max-height: 40vh;
    overflow-y: auto;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background-color 0.3s;
}

.search-result-item:hover {
    background-color: #f9f9f9;
}

.search-result-item img {
    width: 100px;
    height: 70px;
    object-fit: cover;
    border-radius: 4px;
}

.result-info h4 {
    margin-bottom: 5px;
    font-size: 1.1rem;
}

.result-type-badge {
    font-size: 0.75rem;
    font-weight: bold;
    padding: 3px 8px;
    border-radius: 10px;
    color: white;
}
.result-type-badge.book { background-color: #007bff; }
.result-type-badge.course { background-color: #28a745; }
.result-type-badge.resource { background-color: #ffc107; color: #333; }

.not-found-msg {
    text-align: center;
    padding: 30px;
    color: #888;
}
.not-found-msg i {
    font-size: 2rem;
    margin-bottom: 10px;
}
/* --- 全局搜索弹窗样式 (完美对齐增强版) --- */
.search-modal-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6); /* 背景深一点，更有质感 */
    z-index: 1200;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 10vh;
    backdrop-filter: blur(5px); /* 增加背景模糊，高级感 */
}

.search-modal-content {
    background: white;
    width: 90%;
    max-width: 700px;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    position: relative;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from { transform: translateY(-20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* 🚨 核心修复：确保搜索栏完美对齐 */
.search-bar {
    display: flex;
    gap: 0; /* 设为0，我们要让框和按钮连在一起 */
    margin-bottom: 25px;
    width: 100%;
}

.search-bar .input-field {
    flex: 1; /* 自动撑满剩余空间 */
    border-radius: 8px 0 0 8px; /* 左边圆角 */
    border-right: none; /* 去掉中间的边框 */
    height: 50px; /* 统一高度 */
    font-size: 1.1rem;
}

.search-bar .submit-btn {
    border-radius: 0 8px 8px 0; /* 右边圆角 */
    height: 50px;
    padding: 0 30px;
    background: var(--brand-magenta);
    color: white;
    border: none;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.3s;
}

.search-bar .submit-btn:hover {
    background: var(--brand-magenta-dark);
}

/* 过滤按钮组的间距优化 */
.search-modal-content .filter-group {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 25px;
}
/* --- 搜索弹窗内的过滤器按钮美化 --- */
.search-modal-content .filter-group {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 25px;
    padding: 5px;
}

/* 按钮基础样式：胶囊形状 */
.search-modal-content .filter-btn {
    background-color: #f1f1f1; /* 默认浅灰色背景 */
    color: #555;
    border: 2px solid transparent; /* 隐藏边框 */
    padding: 8px 20px;
    border-radius: 30px; /* 胶囊圆角 */
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); /* 丝滑动画 */
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* 悬停效果：稍微加深一点点 */
.search-modal-content .filter-btn:hover {
    background-color: #e2e2e2;
    transform: translateY(-1px); /* 悬浮感 */
}

/* 🚨 核心重点：激活状态（点中后）的样式 */
.search-modal-content .filter-btn.active {
    background-color: var(--brand-magenta); /* 变成品牌洋红色 */
    color: white; /* 文字变白 */
    box-shadow: 0 4px 12px rgba(158, 0, 93, 0.3); /* 增加一点洋红色的发光阴影 */
    transform: scale(1.05); /* 稍微变大一点点点 */
}

/* 搜索结果项的微调 */
.search-result-item {
    border-radius: 12px;
    margin-bottom: 10px;
    border: 1px solid transparent;
}

.search-result-item:hover {
    border-color: #eee;
    background-color: #fcfcfc;
}

/* 给结果里的 Badge 也美化一下 */
.result-type-badge {
    padding: 4px 12px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
/* --- "My Learning" 页面专属样式 --- */
.learning-links { display: flex; flex-direction: column; gap: 10px; margin-top: 15px; }
.link-btn { display: block; text-align: center; padding: 10px; border-radius: 5px; font-weight: 600; text-decoration: none; transition: all 0.3s; }
.link-btn:hover { transform: scale(1.05); }
.link-btn.video { background: #c4302b; color: white; }
.link-btn.pdf { background: #007bff; color: white; }
.link-btn.quiz { background: #28a745; color: white; }
.quiz-submit-form { margin-top: 15px; display: flex; gap: 5px; }
.quiz-submit-form input { flex: 1; border: 1px solid #ccc; padding: 8px; border-radius: 4px; }
.quiz-submit-form button { background: #333; color: white; border: none; padding: 0 15px; border-radius: 4px; cursor: pointer; }
/* --- Admin 弹窗的 Tab 样式 --- */
/* --- Admin 弹窗的 Tab 样式 --- */
.admin-tabs { display: flex; border-bottom: 2px solid #eee; margin-bottom: 20px; }
.admin-tabs button { flex: 1; background: none; border: none; padding: 12px 15px; font-size: 0.95rem; font-weight: 700; color: #888; cursor: pointer; position: relative; border-bottom: 3px solid transparent; transition: color 0.3s; }
.admin-tabs button:hover { color: var(--brand-magenta); }
.admin-tabs button.active { color: var(--brand-magenta); border-bottom-color: var(--brand-magenta); }
.admin-tab-content { min-height: 250px; }
/* 学位等级标签 */
.level-badge {
    font-size: 0.8rem;
    color: #007bff;
    background: #e6f2ff;
    padding: 3px 8px;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 10px;
    font-weight: 700;
}
/* ========================================================= */
/* 📱 手机端极致适配 (Mobile Responsiveness) 
/* 请务必放在 style.css 的最底部，以覆盖上面的样式 
/* ========================================================= */

@media (max-width: 768px) {
    /* 1. 导航栏自适应：从左右排列变成上下堆叠，防溢出 */
    .nav-container { flex-direction: column; height: auto; padding: 15px 0; gap: 15px; }
    .nav-links { flex-wrap: wrap; justify-content: center; gap: 12px; font-size: 0.9rem; margin-bottom: 5px; }
    .nav-actions { justify-content: center; width: 100%; gap: 1rem; }

    /* 2. 首页大图区：文字居中，图片跑到下方 */
    .hero-section { flex-direction: column; text-align: center; padding: 3rem 1rem; }
    .hero-content { margin-left: 0; margin-bottom: 2rem; max-width: 100%; }
    .hero-title { font-size: 2.2rem; }
    .hero-image { width: 100%; }
    .hero-image img { width: 100%; }

    /* 3. 首页三个特点框 (Features)：从并排变成上下排列 */
    .features-section { flex-direction: column; margin: -20px 15px 40px; }
    .feature-box { border-right: none; border-bottom: 1px solid var(--border-color); padding: 1.5rem; text-align: center; }
    .feature-box:last-child { border-bottom: none; }

    /* 4. 登录/注册页面：图片在上方，表单在下方 */
    .auth-container { flex-direction: column; margin: 10px; }
    .auth-image { height: 180px; } /* 手机上图片压缩高度 */
    .auth-form-box { padding: 2rem 1.5rem; }

    /* 5. 购物车和弹窗：在手机上充分利用屏幕宽度 */
    .cart-sidebar { width: 100%; }
    .checkout-modal { width: 95%; padding: 20px; }

    /* 6. Admin 仪表盘表格优化：允许横向滚动，防止表格撑破屏幕 */
    .admin-panel { overflow-x: auto; padding: 15px; }
    .admin-table { font-size: 0.85rem; }
    .admin-table th, .admin-table td { padding: 10px 8px; white-space: nowrap; }

    /* 7. 日历格子优化 */
    .day { min-height: 70px; padding: 5px; font-size: 0.9rem; }
    .due-tag { font-size: 0.65rem; padding: 2px 4px; }
}