/* =========================================================
   爱学吧 - 旗舰版 (全站统一胶囊形圆弧按钮 + 搜索框)
   ========================================================= */

:root {
    --primary: #1890ff;
    --primary-hover: #096dd9;
    --text-main: #2c3e50;
    --text-desc: #64748b;
    --zoom-level: 1; 
}

body {
    margin: 0;
    font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background-color: #e6ebf5;
    background-image: 
        url("data:image/svg+xml,%3Csvg width='240' height='240' xmlns='http://www.w3.org/2000/svg'%3E%3Ctext x='50%25' y='50%25' font-size='20' fill='rgba(0,0,0,0.07)' font-family='Arial Black' font-weight='900' text-anchor='middle' transform='rotate(-35 120 120)'%3ECAI PRODUCTION%3C/text%3E%3C/svg%3E"), 
        linear-gradient(135deg, #f0f4f8 0%, #e2e8f0 100%);
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

.top-header { height: 110px; background: #ffffff; width: 100%; display: flex; align-items: center; justify-content: space-between; padding: 0 40px; box-sizing: border-box; box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05); z-index: 100; }
.header-left { flex: 1; display: flex; align-items: center; gap: 15px; }

/* 🌟 首页按钮：完美的胶囊圆弧角 (50px) */
.btn-home {
    background: #eff6ff; color: var(--primary); border: 2px solid #bfdbfe;
    padding: 12px 22px; border-radius: 50px; /* ✨ 修改为胶囊形 */
    font-size: calc(15px * var(--zoom-level)); font-weight: 800; 
    cursor: pointer; transition: 0.3s; display: flex; align-items: center; gap: 6px;
    box-shadow: 0 4px 10px rgba(24,144,255,0.1);
}
.btn-home:hover { background: var(--primary); color: white; transform: translateY(-2px); }

/* 🌟 申请账号按钮：完美的胶囊圆弧角 (50px) */
.btn-apply { 
    background: #f6ffed; color: #52c41a; border: 2px solid #b7eb8f; 
    padding: 12px 22px; border-radius: 50px; /* ✨ 修改为胶囊形 */
    font-size: calc(15px * var(--zoom-level)); font-weight: bold; cursor: pointer; transition: 0.3s; 
}
.btn-apply:hover { background: #d9f7be; transform: translateY(-2px); }

.header-center-title { position: absolute; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 18px; }
.brand-text { font-size: calc(64px * var(--zoom-level)); font-weight: 900; font-family: 'Arial Black', 'Microsoft YaHei UI', sans-serif; letter-spacing: 4px; background: linear-gradient(135deg, #1890ff 0%, #003a8c 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; transition: font-size 0.2s; }
.sub-title { font-size: calc(36px * var(--zoom-level)); color: #595959; font-weight: 800; letter-spacing: 2px; border-left: 4px solid #e8e8e8; padding-left: 20px; margin-right: 6px; transition: font-size 0.2s; }
.cai-badge-new { background: linear-gradient(135deg, #ff7a45 0%, #ff4d4f 100%); color: #ffffff; padding: 6px 14px; border-radius: 12px; font-size: calc(18px * var(--zoom-level)); font-weight: 900; letter-spacing: 2px; box-shadow: 0 4px 10px rgba(255, 77, 79, 0.3); transition: font-size 0.2s; }

.header-right { flex: 1; display: flex; justify-content: flex-end; }

/* 🌟 用户登录按钮：完美的胶囊圆弧角 (50px) */
.login-btn { 
    background: var(--primary); color: white; border: none; padding: 12px 28px; 
    border-radius: 50px; /* ✨ 修改为胶囊形 */
    font-weight: bold; font-size: calc(15px * var(--zoom-level)); cursor: pointer; transition: 0.3s; box-shadow: 0 4px 12px rgba(24,144,255,0.2); 
}
.login-btn:hover { background: var(--primary-hover); transform: translateY(-2px); }
.login-btn.logged-in { background: #52c41a; box-shadow: 0 4px 12px rgba(82, 196, 26, 0.3); }

.main-container { display: flex; flex: 1; overflow: hidden; }
.sidebar { width: 280px; background: rgba(248, 250, 252, 0.9); border-right: 1px solid #dbe4f0; box-shadow: 2px 0 10px rgba(0, 0, 0, 0.03); overflow-y: auto; padding: 20px 0; backdrop-filter: blur(5px); }
.menu-group { margin-bottom: 8px; }
.menu-title { padding: 16px 24px; font-size: calc(17px * var(--zoom-level)); font-weight: 800; color: var(--text-main); cursor: pointer; display: flex; justify-content: space-between; align-items: center; border-left: 5px solid transparent; background: #ffffff; margin: 0 10px; border-radius: 12px; transition: font-size 0.2s, background 0.2s;}
.menu-title:hover, .menu-title.active { background: #e6f0ff; color: var(--primary); border-left-color: var(--primary); }
.menu-title::after { content: '▼'; font-size: 12px; color: #a0aec0; transition: transform 0.3s; }
.menu-title.open::after { transform: rotate(180deg); }
.submenu { max-height: 0; overflow: hidden; transition: max-height 0.3s ease-out; }
.submenu.open { max-height: 600px; }
.submenu-item { display: block; padding: 14px 20px 14px 45px; color: #595959; font-size: calc(15px * var(--zoom-level)); font-weight: 600; cursor: pointer; transition: font-size 0.2s; margin: 2px 10px; border-radius: 8px;}
.submenu-item:hover { color: var(--primary); background: #e6f0ff; }

.content-area { flex: 1; padding: 20px 50px 120px 50px; overflow-y: auto; scroll-behavior: smooth; }

/* 🌟 搜索框：完美的胶囊圆弧角 (50px) */
.search-container { display: flex; justify-content: center; margin: 40px auto 60px auto; }
.search-box { position: relative; width: 100%; max-width: 700px; }
.search-icon { position: absolute; left: 25px; top: 50%; transform: translateY(-50%); font-size: calc(22px * var(--zoom-level)); color: var(--primary); transition: 0.2s; pointer-events: none; }
.search-input {
    width: 100%; padding: 20px 24px 20px 65px; 
    font-size: calc(17px * var(--zoom-level)); font-weight: bold; color: var(--text-main);
    border: 2px solid #dbe4f0; 
    border-radius: 50px; /* ✨ 修改为胶囊形，和申请账号完全一致 */
    background: #ffffff; box-shadow: 0 6px 20px rgba(0,0,0,0.03); outline: none; box-sizing: border-box; transition: all 0.3s ease;
}
.search-input::placeholder { color: #a0aec0; font-weight: normal; }
.search-input:focus { border-color: var(--primary); box-shadow: 0 8px 25px rgba(24,144,255,0.15); }

.section-wrap { margin-bottom: 60px; }
.section-header { font-size: calc(24px * var(--zoom-level)); font-weight: 900; color: var(--text-main); margin: 0 0 25px 0; display: flex; align-items: center; gap: 12px; transition: font-size 0.2s;}
.section-header::before { content: ''; display: block; width: 6px; height: calc(24px * var(--zoom-level)); background: var(--primary); border-radius: 3px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 30px; }

.card { background: rgba(255,255,255,0.95); border-radius: 16px; overflow: hidden; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.05); transition: all 0.3s ease; cursor: pointer; position: relative; display: flex; flex-direction: column; backdrop-filter: blur(10px); }
.card:hover { transform: translateY(-8px); box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1); }
.card-cover { height: 160px; display: flex; align-items: center; justify-content: center; font-size: 80px; position: relative; }
.cover-math { background: linear-gradient(135deg, #d3caff 0%, #a4c8ff 100%); }
.cover-geo { background: linear-gradient(135deg, #ffd384 0%, #ff9a76 100%); }
.cover-exam { background: linear-gradient(135deg, #a8ff78 0%, #78ffd6 100%); }
.cover-tool { background: linear-gradient(135deg, #c2e59c 0%, #64b3f4 100%); }
.cover-plugin { background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%); }

.card-badge { position: absolute; top: 18px; left: 18px; background: rgba(255, 255, 255, 0.95); padding: 6px 16px; border-radius: 12px; font-size: calc(16px * var(--zoom-level)); font-weight: 900; color: #475569; box-shadow: 0 2px 10px rgba(0,0,0,0.1); transition: font-size 0.2s; }
.card-info { padding: 25px 28px; background: transparent; flex: 1; }
.card-title { margin: 0 0 12px 0; font-size: calc(22px * var(--zoom-level)); color: var(--text-main); font-weight: 900; transition: font-size 0.2s; }
.card-desc { margin: 0; font-size: calc(16px * var(--zoom-level)); color: var(--text-desc); line-height: 1.7; transition: font-size 0.2s; }

.card-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 160px; background: rgba(24, 144, 255, 0.7); display: flex; align-items: center; justify-content: center; opacity: 0; transition: 0.3s; backdrop-filter: blur(2px); }
.card:hover .card-overlay { opacity: 1; }
.overlay-btn { background: #ffffff; color: var(--primary); padding: 10px 24px; border-radius: 25px; font-weight: 900; font-size: calc(16px * var(--zoom-level)); }

.global-zoom-controls { position: fixed; bottom: 25px; left: 50%; transform: translateX(-50%); background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(8px); padding: 10px 25px; border-radius: 50px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15); display: flex; justify-content: center; align-items: center; gap: 20px; z-index: 9999; border: 1px solid #e2e8f0; }
.zoom-btn { background: #f0f5ff; border: 2px solid #b3d8ff; border-radius: 50%; width: 44px; height: 44px; font-size: 20px; font-weight: 900; color: var(--primary); cursor: pointer; transition: 0.2s; display: flex; align-items: center; justify-content: center; }
.zoom-btn:hover { background: var(--primary); color: white; transform: scale(1.1); box-shadow: 0 4px 10px rgba(24,144,255,0.3); }
.zoom-label { font-size: 16px; color: #475569; font-weight: 900; letter-spacing: 1px;}

.modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.6); align-items: center; justify-content: center; backdrop-filter: blur(4px); z-index: 10000; }
.modal-content { background: #ffffff; padding: 35px; border-radius: 16px; width: 340px; text-align: center; position: relative; }
.close-btn { position: absolute; top: 15px; right: 20px; font-size: 26px; color: #bfbfbf; cursor: pointer; }
.close-btn:hover { color: #333; }
.modal h2 { margin: 0 0 20px 0; color: var(--text-main); font-weight: 900;}
.input-box { margin-bottom: 15px; }
.input-box input { width: 100%; padding: 15px; border: 2px solid #e2e8f0; border-radius: 10px; font-size: 15px; outline: none; box-sizing: border-box; }
.input-box input:focus { border-color: var(--primary); }
.submit-btn { width: 100%; background: var(--primary); color: white; border: none; padding: 14px; border-radius: 10px; font-size: 16px; font-weight: bold; cursor: pointer; margin-top: 10px; transition: 0.2s; }