/* 朗朗英语朗读系统 · 全站样式 */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", Arial, sans-serif; background: #fdf7ef; color: #333; }
a { color: #1f6feb; text-decoration: none; }
.wrap { max-width: 900px; margin: 0 auto; padding: 12px 14px 40px; }

/* 顶栏 */
.app-head { background: linear-gradient(135deg, #ff6b35, #ffa41b); color: #fff; border-radius: 16px; padding: 18px 20px; margin-bottom: 12px; }
.app-head h1 { font-size: 22px; }
.app-head p { font-size: 13px; opacity: .92; margin-top: 4px; }

/* 单元标签 */
#unitTabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.tab-btn { border: none; cursor: pointer; padding: 8px 14px; border-radius: 10px; font-size: 14px; font-weight: 700; background: #fff; color: #555; box-shadow: 0 2px 6px rgba(0,0,0,.06); transition: all .15s; }
.tab-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 10px rgba(0,0,0,.12); }
.tab-btn.active { background: #ff6b35; color: #fff; box-shadow: 0 4px 12px rgba(255,107,53,.4); }

/* 控制条 */
#controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; position: sticky; top: 6px; z-index: 50; background: rgba(255,255,255,.96); padding: 8px 10px; border-radius: 12px; box-shadow: 0 2px 8px rgba(0,0,0,.08); margin-bottom: 12px; }
.ctl-btn { border: none; cursor: pointer; padding: 9px 16px; border-radius: 10px; font-size: 14px; font-weight: 700; color: #fff; background: #2f9e5f; box-shadow: 0 3px 8px rgba(47,158,95,.3); transition: all .15s; }
.ctl-btn:hover { transform: translateY(-1px); }
.ctl-btn.pause { background: #ffa41b; box-shadow: 0 3px 8px rgba(255,164,27,.3); }
.ctl-btn.stop { background: #e85d5d; box-shadow: 0 3px 8px rgba(232,93,93,.3); }
.ctl-btn.zh { background: #7a5fd0; box-shadow: 0 3px 8px rgba(122,95,208,.3); }
.ctl-btn.zh.off { background: #9aa3ad; box-shadow: none; }
.rate-box { display: flex; align-items: center; gap: 6px; margin-left: auto; font-size: 13px; color: #555; }
.rate-box input[type=range] { width: 120px; accent-color: #ff6b35; }
.rate-val { min-width: 40px; font-weight: 700; color: #ff6b35; }

/* 卡片 */
.card { background: #fff; border-radius: 14px; padding: 16px; margin-bottom: 14px; box-shadow: 0 2px 10px rgba(0,0,0,.05); }
.card h2 { font-size: 17px; margin-bottom: 10px; color: #444; }
.card h2 small { font-size: 12px; color: #999; font-weight: 400; }
.hint { font-size: 12px; color: #999; margin-bottom: 10px; line-height: 1.6; }

/* 句子 */
.sec-title { font-size: 15px; color: #ff6b35; margin: 14px 0 6px; }
.sent { display: flex; align-items: flex-start; gap: 8px; padding: 8px 10px; border-radius: 10px; cursor: pointer; transition: background .15s; }
.sent:hover { background: #fff6e8; }
.sent.active { background: #fff3e0; box-shadow: inset 0 0 0 2px #ff6b35; }
.sent .no { font-size: 12px; color: #bbb; font-weight: 700; min-width: 20px; padding-top: 3px; }
.sent .content { flex: 1; }
.sent .txt { font-size: 17px; font-weight: 600; font-family: "Segoe UI", Arial, sans-serif; }
.sent .zh { display: block; font-size: 13px; color: #8a8a8a; margin-top: 2px; }
.sent .spk { font-size: 14px; opacity: .4; padding-top: 2px; }

/* 词卡 */
.word-cards { display: flex; flex-wrap: wrap; gap: 8px; padding: 6px 0 2px; }
.word-card { border: 1px solid #ffe0b2; background: #fffaf2; border-radius: 12px; padding: 8px 12px; cursor: pointer; min-width: 120px; transition: all .15s; }
.word-card:hover { background: #fff6e8; border-color: #ffb300; }
.word-card.active { background: #fff3e0; border-color: #ff6b35; box-shadow: 0 2px 8px rgba(255,107,53,.25); }
.word-card .en { display: block; font-weight: 700; color: #1f6feb; font-size: 15px; }
.word-card .ipa { display: block; color: #b3541e; font-size: 12px; margin-top: 1px; }
.word-card .zh { display: block; color: #8a8a8a; font-size: 12px; margin-top: 2px; }

/* 单词表 */
.word-table { width: 100%; border-collapse: collapse; }
.word-table th, .word-table td { padding: 8px 10px; text-align: left; border-bottom: 1px solid #f0e6da; font-size: 14px; }
.word-table th { color: #999; font-weight: 600; font-size: 13px; }
.word-table tbody tr { cursor: pointer; transition: background .15s; }
.word-table tbody tr:hover { background: #fff6e8; }
.word-table tbody tr.active { background: #fff3e0; }
.word-table td.en { font-weight: 700; color: #1f6feb; }
.word-table td.ipa { color: #b3541e; }
.word-table td.zh { color: #555; }

/* 句型 */
.key-sent { padding: 10px 12px; border-radius: 10px; cursor: pointer; transition: background .15s; border: 1px solid #eee; margin-bottom: 8px; }
.key-sent:hover { background: #fff6e8; }
.key-sent.active { background: #fff3e0; border-color: #ff6b35; }
.key-sent .txt { font-size: 16px; font-weight: 600; }
.key-sent .zh { display: block; font-size: 13px; color: #8a8a8a; margin-top: 2px; }

footer { text-align: center; font-size: 12px; color: #aaa; margin-top: 24px; }
.muted { font-size: 12px; color: #999; line-height: 1.6; }

/* 通用按钮/表单 */
.btn { display: inline-block; border: none; cursor: pointer; padding: 8px 16px; border-radius: 10px; font-size: 14px; font-weight: 600; background: #fff; color: #1f6feb; box-shadow: 0 2px 6px rgba(0,0,0,.06); }
.btn.primary { background: #ff6b35; color: #fff; box-shadow: 0 3px 8px rgba(255,107,53,.3); }
.btn.green { background: #2f9e5f; color: #fff; }
input[type=text], input[type=email], input[type=password], input[type=number], textarea { border: 1px solid #ddd; border-radius: 8px; padding: 9px 12px; font-size: 14px; font-family: inherit; }
input:focus, textarea:focus { outline: none; border-color: #ff6b35; }
.inline-form { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; align-items: center; }
.form-row { margin-bottom: 10px; }
.form-row label { display: block; font-size: 13px; color: #666; margin-bottom: 4px; }

/* 提示 */
.alert { background: #fff3e0; color: #b3541e; padding: 10px 14px; border-radius: 10px; font-size: 14px; margin-bottom: 12px; }
.alert.ok { background: #e8f7ef; color: #1e7d46; }

/* 课本卡片 */
.tb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.tb-card { background: #fff; border-radius: 14px; padding: 16px; box-shadow: 0 2px 10px rgba(0,0,0,.06); cursor: pointer; transition: all .15s; }
.tb-card:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,.1); }
.tb-card h3 { font-size: 16px; color: #1f6feb; margin-bottom: 6px; }
.tb-card .meta { font-size: 12px; color: #999; }
.tb-card .tag { display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 6px; background: #e8f7ef; color: #1e7d46; margin-top: 8px; }

/* 管理后台 */
.admin-nav { background: #2b3a55; color: #fff; padding: 12px 20px; display: flex; gap: 16px; align-items: center; }
.admin-nav a { color: #fff; font-size: 14px; }
.admin-nav a.right { margin-left: auto; }
.admin-main { max-width: 1100px; margin: 0 auto; padding: 20px 16px; }
.table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 10px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,.05); margin-top: 12px; }
.table th, .table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid #f0ece6; font-size: 13px; }
.table th { background: #faf6f0; color: #666; }
.tag { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 12px; }
.tag.green { background: #e8f7ef; color: #1e7d46; }
.tag.red { background: #fdecec; color: #c0392b; }
.tag.gray { background: #f0f0f0; color: #888; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin: 16px 0; }
.stat-card { background: #fff; border-radius: 12px; padding: 16px; text-align: center; box-shadow: 0 2px 8px rgba(0,0,0,.05); }
.stat-card b { font-size: 26px; color: #ff6b35; display: block; }
.stat-card span { font-size: 13px; color: #888; }
.admin-login-body { background: #2b3a55; min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.admin-login { background: #fff; border-radius: 16px; padding: 32px; width: 360px; box-shadow: 0 8px 30px rgba(0,0,0,.2); }
.admin-login h1 { font-size: 20px; margin-bottom: 20px; color: #2b3a55; }
.admin-login input { width: 100%; margin-bottom: 12px; }
.admin-login .btn { width: 100%; }

/* 登录/注册/充值页 */
.auth-wrap { max-width: 420px; margin: 40px auto; padding: 24px; background: #fff; border-radius: 16px; box-shadow: 0 4px 20px rgba(0,0,0,.08); }
.auth-wrap h1 { font-size: 20px; margin-bottom: 16px; }
.auth-wrap .form-row { margin-bottom: 14px; }
.auth-wrap .code-row { display: flex; gap: 8px; }
.auth-wrap .code-row input { flex: 1; }
.auth-wrap .code-row .btn { white-space: nowrap; }
.tabs { display: flex; gap: 0; border-bottom: 2px solid #f0e6da; margin-bottom: 18px; }
.tabs a { padding: 10px 16px; font-size: 14px; color: #888; border-bottom: 2px solid transparent; margin-bottom: -2px; }
.tabs a.active { color: #ff6b35; border-bottom-color: #ff6b35; font-weight: 700; }

/* 解锁/推广提示 */
.lock-note { background: #f0f6ff; border: 1px dashed #1f6feb; border-radius: 10px; padding: 14px; font-size: 13px; color: #2b3a55; margin: 12px 0; line-height: 1.8; }
.refer-link { background: #fff8f0; border: 1px dashed #ffa41b; border-radius: 10px; padding: 10px 12px; font-size: 13px; word-break: break-all; }
@media (max-width: 640px) { .sent .txt { font-size: 16px; } .ctl-btn { padding: 8px 12px; font-size: 13px; } .rate-box { width: 100%; margin-left: 0; } }
