* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

:root {
    --primary: #e07a5f;
    --primary-hover: #c96a52;
    --primary-soft: rgba(224,122,95,0.1);
    --accent: #81b29a;
    --accent-soft: rgba(129,178,154,0.1);
    --bg: #faf7f5;
    --bg-elevated: #ffffff;
    --text-primary: #2d3436;
    --text-secondary: #636e72;
    --text-tertiary: #b2bec3;
    --border: #ede8e4;
    --border-light: #f5f0ec;
    --success: #81b29a;
    --success-soft: rgba(129,178,154,0.12);
    --warning: #f2cc8f;
    --warning-soft: rgba(242,204,143,0.15);
    --danger: #e07a5f;
    --danger-soft: rgba(224,122,95,0.1);
    --shadow-sm: 0 1px 3px rgba(45,52,54,0.04);
    --shadow: 0 2px 10px rgba(45,52,54,0.06);
    --shadow-lg: 0 8px 30px rgba(45,52,54,0.1);
    --radius: 16px;
    --radius-sm: 12px;
    --radius-xs: 8px;
    --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
    --bg: #1a1a2e;
    --bg-elevated: #222244;
    --text-primary: #f5f0ec;
    --text-secondary: #a0a0b8;
    --text-tertiary: #5a5a7a;
    --border: #2e2e4a;
    --border-light: #252545;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
    --shadow: 0 2px 10px rgba(0,0,0,0.4);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.5);
    --primary-soft: rgba(224,122,95,0.18);
    --accent-soft: rgba(129,178,154,0.18);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Noto Sans SC", sans-serif;
    background: var(--bg); color: var(--text-primary);
    min-height: 100vh; overflow: hidden;
    -webkit-font-smoothing: antialiased;
}

#app { max-width: 430px; margin: 0 auto; height: 100vh; height: 100dvh; display: flex; flex-direction: column; }

/* ===== Login ===== */
.login-page { height: 100vh; height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 24px; position: relative; overflow: hidden; }
.login-bg { position: absolute; inset: 0; background: linear-gradient(150deg, #3d405b 0%, #e07a5f 50%, #f2cc8f 100%); animation: gradBg 10s ease infinite; background-size: 200% 200%; }
@keyframes gradBg { 0%{background-position:0% 50%} 50%{background-position:100% 50%} 100%{background-position:0% 50%} }
.login-bg::before { content:''; position: absolute; inset: 0; background: radial-gradient(circle at 30% 70%, rgba(129,178,154,0.3), transparent 60%), radial-gradient(circle at 80% 20%, rgba(242,204,143,0.3), transparent 50%); }

.login-container { position: relative; background: rgba(255,255,255,0.96); border-radius: 28px; padding: 44px 30px 36px; width: 100%; max-width: 360px; text-align: center; box-shadow: 0 30px 60px rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,255,255,0.5); backdrop-filter: blur(20px); }
[data-theme="dark"] .login-container { background: rgba(34,34,68,0.95); }
.login-avatar { width: 80px; height: 80px; border-radius: 50%; overflow: hidden; margin: 0 auto 16px; box-shadow: 0 4px 20px rgba(224,122,95,0.3); border: 3px solid rgba(255,255,255,0.8); }
.login-avatar img { width: 100%; height: 100%; object-fit: cover; }
.login-container h1 { font-size: 24px; font-weight: 800; letter-spacing: -0.5px; background: linear-gradient(135deg, #3d405b, #e07a5f); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.login-subtitle { font-size: 13px; color: var(--text-tertiary); margin: 6px 0 28px; }
.login-form { display: flex; flex-direction: column; gap: 12px; }
.login-form input { padding: 14px 18px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); font-size: 15px; outline: none; background: var(--bg); color: var(--text-primary); transition: var(--transition); }
.login-form input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.login-tip { margin-top: 12px; font-size: 12px; color: var(--danger); min-height: 18px; }

.btn-primary { padding: 14px; border: none; border-radius: var(--radius-sm); background: linear-gradient(135deg, var(--primary), #c96a52); color: #fff; font-size: 15px; font-weight: 600; cursor: pointer; transition: var(--transition); box-shadow: 0 4px 12px rgba(224,122,95,0.3); }
.btn-primary:active { transform: scale(0.97); }
.btn-ghost { padding: 12px; border: none; background: none; color: var(--text-tertiary); font-size: 13px; cursor: pointer; }
.btn-danger { padding: 14px; border: none; border-radius: var(--radius-sm); background: var(--danger); color: #fff; font-size: 14px; cursor: pointer; width: 100%; }

/* ===== Tab Bar ===== */
.main-app { height: 100vh; height: 100dvh; display: flex; flex-direction: column; }
.page { display: none; flex: 1; flex-direction: column; overflow: hidden; padding-bottom: 58px; position: relative; }
.page.active { display: flex; }

.tab-bar { display: flex; background: var(--bg-elevated); border-top: 1px solid var(--border); padding: 8px 12px 4px; position: fixed; bottom: 0; left: 0; right: 0; max-width: 430px; margin: 0 auto; z-index: 100; }
.tab-item { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; border: none; background: none; color: var(--text-tertiary); font-size: 10px; font-weight: 500; padding: 4px; cursor: pointer; transition: var(--transition); position: relative; }
.tab-item.active { color: var(--primary); }
.tab-item.active::before { content:''; position: absolute; top: -8px; left: 50%; transform: translateX(-50%); width: 24px; height: 3px; background: linear-gradient(90deg, var(--primary), var(--accent)); border-radius: 2px; }

/* ===== Chat ===== */
.chat-top { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; background: var(--bg-elevated); border-bottom: 1px solid var(--border); }
.chat-top-left, .chat-top-right { display: flex; align-items: center; gap: 8px; }
.chat-top select { padding: 7px 28px 7px 12px; border: 1.5px solid var(--primary); border-radius: 20px; font-size: 12px; font-weight: 600; background: var(--primary-soft); color: var(--primary); outline: none; cursor: pointer; appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23e07a5f' fill='none' stroke-width='1.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
.icon-btn { width: 34px; height: 34px; border: none; background: none; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--text-secondary); transition: var(--transition); }
.icon-btn:hover { background: var(--primary-soft); color: var(--primary); }

.welcome-card { text-align: center; padding: 44px 20px 28px; }
.welcome-avatar { width: 60px; height: 60px; border-radius: 50%; margin-bottom: 14px; box-shadow: 0 4px 16px rgba(224,122,95,0.2); border: 2px solid var(--border); }
.welcome-card h2 { font-size: 20px; font-weight: 700; margin-bottom: 6px; }
.welcome-card > p { font-size: 13px; color: var(--text-secondary); margin-bottom: 24px; line-height: 1.5; }
.quick-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.quick-actions button { padding: 8px 14px; border: 1.5px solid var(--border); border-radius: 20px; background: var(--bg-elevated); font-size: 12px; cursor: pointer; color: var(--text-secondary); transition: var(--transition); font-weight: 500; }
.quick-actions button:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); transform: translateY(-1px); }

.chat-messages { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 14px; scroll-behavior: smooth; }
.message { display: flex; gap: 10px; max-width: 86%; animation: msgIn 0.3s ease; }
@keyframes msgIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.message.bot { align-self: flex-start; }
.message.user { align-self: flex-end; flex-direction: row-reverse; }
.avatar { width: 30px; height: 30px; border-radius: 50%; overflow: hidden; display: flex; align-items: center; justify-content: center; font-size: 13px; flex-shrink: 0; background: var(--bg); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.bubble { padding: 12px 16px; border-radius: 20px; font-size: 14px; line-height: 1.7; word-break: break-word; }
.message.bot .bubble { background: var(--bg-elevated); box-shadow: var(--shadow-sm); border-bottom-left-radius: 6px; }
.message.user .bubble { background: linear-gradient(135deg, var(--primary), #d4654d); color: #fff; border-bottom-right-radius: 6px; }

/* Markdown */
.bubble h1,.bubble h2,.bubble h3 { font-size: 14px; font-weight: 700; margin: 8px 0 4px; }
.bubble p { margin: 3px 0; }
.bubble ul,.bubble ol { margin: 4px 0; padding-left: 18px; }
.bubble code { background: var(--primary-soft); padding: 2px 6px; border-radius: 4px; font-size: 12px; font-family: 'SF Mono','Fira Code',monospace; }
.bubble pre { background: #2d3436; color: #dfe6e9; padding: 14px; border-radius: var(--radius-xs); overflow-x: auto; margin: 8px 0; }
.bubble pre code { background: none; padding: 0; color: inherit; font-size: 12px; }
.bubble blockquote { border-left: 3px solid var(--accent); padding-left: 12px; margin: 8px 0; color: var(--text-secondary); }
.bubble table { border-collapse: collapse; margin: 8px 0; font-size: 12px; width: 100%; }
.bubble th,.bubble td { border: 1px solid var(--border); padding: 6px 10px; }

/* Image & Input */
.image-preview { display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: var(--bg-elevated); border-top: 1px solid var(--border); }
.image-preview img { max-height: 48px; border-radius: var(--radius-xs); }
.image-preview button { width: 22px; height: 22px; border: none; background: var(--danger); color: white; border-radius: 50%; cursor: pointer; font-size: 11px; }

.chat-toolbar { display: flex; gap: 6px; padding: 8px 14px; background: var(--bg-elevated); border-top: 1px solid var(--border); overflow-x: auto; -webkit-overflow-scrolling: touch; }
.chat-toolbar::-webkit-scrollbar { display: none; }
.chat-toolbar button { padding: 6px 12px; border: 1.5px solid var(--border); border-radius: 16px; background: var(--bg); font-size: 11px; cursor: pointer; color: var(--text-secondary); white-space: nowrap; transition: var(--transition); }
.chat-toolbar button:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }

.chat-input-area { display: flex; gap: 8px; padding: 10px 14px 12px; background: var(--bg-elevated); border-top: 1px solid var(--border); align-items: center; }
.attach-btn { width: 34px; height: 34px; background: var(--bg); border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--text-tertiary); flex-shrink: 0; transition: var(--transition); border: none; }
.attach-btn:hover { background: var(--accent-soft); color: var(--accent); }
.chat-input-area input[type="text"] { flex: 1; padding: 11px 16px; border: 1.5px solid var(--border); border-radius: 24px; font-size: 14px; outline: none; background: var(--bg); color: var(--text-primary); transition: var(--transition); }
.chat-input-area input[type="text"]:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
#sendBtn { width: 36px; height: 36px; border-radius: 50%; border: none; background: linear-gradient(135deg, var(--primary), #d4654d); color: white; display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; box-shadow: 0 3px 10px rgba(224,122,95,0.3); }
#sendBtn:active { transform: scale(0.9); }

/* Chat list */
.chat-list-panel { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: var(--bg); z-index: 50; display: flex; flex-direction: column; animation: slideIn 0.25s ease; }
@keyframes slideIn { from { transform: translateX(-100%); } to { transform: translateX(0); } }
.panel-header { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; background: var(--bg-elevated); border-bottom: 1px solid var(--border); }
.panel-header h3 { font-size: 16px; font-weight: 700; }
.chat-list { flex: 1; overflow-y: auto; padding: 10px 12px; }
.chat-list-item { display: flex; align-items: center; gap: 12px; padding: 13px 14px; background: var(--bg-elevated); border-radius: var(--radius-sm); margin-bottom: 6px; box-shadow: var(--shadow-sm); cursor: pointer; transition: var(--transition); border: 1.5px solid transparent; }
.chat-list-item.active { border-color: var(--primary); background: var(--primary-soft); }
.chat-list-title { flex: 1; font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-list-time { font-size: 11px; color: var(--text-tertiary); }
.chat-list-delete { width: 22px; height: 22px; border: none; background: none; color: var(--text-tertiary); cursor: pointer; font-size: 15px; border-radius: 50%; }

/* ===== Life Page ===== */
.page-header { padding: 18px 20px 14px; background: var(--bg-elevated); border-bottom: 1px solid var(--border); }
.page-header h1 { font-size: 20px; font-weight: 800; }
.life-tabs { display: flex; margin-top: 14px; background: var(--bg); border-radius: var(--radius-xs); padding: 3px; }
.life-tab { flex: 1; padding: 9px 0; border: none; border-radius: 7px; background: none; font-size: 13px; font-weight: 600; cursor: pointer; color: var(--text-tertiary); transition: var(--transition); }
.life-tab.active { background: var(--bg-elevated); color: var(--text-primary); box-shadow: var(--shadow-sm); }

.life-content { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.todo-input-area, .habit-add-area { display: flex; gap: 8px; padding: 12px 16px; background: var(--bg-elevated); border-bottom: 1px solid var(--border); align-items: center; }
.todo-input-area input, .habit-add-area input { flex: 1; padding: 11px 14px; border: 1.5px solid var(--border); border-radius: var(--radius-xs); font-size: 14px; outline: none; background: var(--bg); color: var(--text-primary); }
.todo-input-area input:focus, .habit-add-area input:focus { border-color: var(--primary); }
.todo-input-area select { padding: 9px 10px; border: 1.5px solid var(--border); border-radius: var(--radius-xs); font-size: 12px; background: var(--bg); color: var(--text-primary); }
.todo-input-area button, .habit-add-area button { width: 36px; height: 36px; border: none; border-radius: 50%; background: linear-gradient(135deg, var(--primary), #d4654d); color: white; font-size: 20px; cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
#habitIcon { width: 44px; text-align: center; }

.todo-filters { display: flex; gap: 6px; padding: 12px 16px 8px; }
.filter-btn { padding: 6px 14px; border: 1.5px solid var(--border); border-radius: 18px; background: var(--bg-elevated); font-size: 12px; font-weight: 500; cursor: pointer; color: var(--text-secondary); transition: var(--transition); }
.filter-btn.active { background: var(--primary); color: white; border-color: var(--primary); }

.todo-list, .habit-list { flex: 1; overflow-y: auto; padding: 8px 14px; }
.todo-item { display: flex; align-items: center; gap: 12px; padding: 13px 14px; background: var(--bg-elevated); border-radius: var(--radius-sm); margin-bottom: 6px; box-shadow: var(--shadow-sm); }
.todo-item.completed { opacity: 0.5; }
.todo-item.completed .todo-text { text-decoration: line-through; }
.todo-checkbox { width: 20px; height: 20px; border: 2px solid var(--border); border-radius: 6px; cursor: pointer; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.todo-item.completed .todo-checkbox { background: var(--success); border-color: var(--success); }
.todo-item.completed .todo-checkbox::after { content: "✓"; color: white; font-size: 11px; font-weight: 700; }
.todo-text { flex: 1; font-size: 14px; }
.todo-priority { font-size: 10px; padding: 3px 8px; border-radius: 6px; font-weight: 700; }
.todo-priority.important { background: var(--warning-soft); color: var(--warning); }
.todo-priority.urgent { background: var(--danger-soft); color: var(--danger); }
.todo-delete, .habit-delete { width: 22px; height: 22px; border: none; background: none; color: var(--text-tertiary); cursor: pointer; font-size: 15px; border-radius: 50%; }
.section-stats { padding: 10px 16px; text-align: center; font-size: 12px; color: var(--text-tertiary); }

.habit-item { display: flex; align-items: center; gap: 12px; padding: 14px; background: var(--bg-elevated); border-radius: var(--radius-sm); margin-bottom: 6px; box-shadow: var(--shadow-sm); }
.habit-icon { font-size: 20px; width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; background: var(--bg); border-radius: var(--radius-xs); }
.habit-info { flex: 1; }
.habit-name { font-size: 14px; font-weight: 550; }
.habit-streak { font-size: 11px; color: var(--text-tertiary); margin-top: 2px; }
.habit-check { width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--border); display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 13px; transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); }
.habit-check.checked { background: var(--success); border-color: var(--success); color: white; transform: scale(1.15); }

/* ===== Stats ===== */
.stats-scroll { flex: 1; overflow-y: auto; padding: 16px; }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.stat-card { border-radius: var(--radius); padding: 18px 10px; text-align: center; color: white; position: relative; overflow: hidden; }
.stat-card::after { content:''; position: absolute; top: -20px; right: -20px; width: 60px; height: 60px; background: rgba(255,255,255,0.12); border-radius: 50%; }
.gradient-coral { background: linear-gradient(135deg, #e07a5f, #d4654d); }
.gradient-teal { background: linear-gradient(135deg, #81b29a, #3d9970); }
.gradient-violet { background: linear-gradient(135deg, #3d405b, #6c5ce7); }
.stat-icon { font-size: 18px; margin-bottom: 6px; }
.stat-number { font-size: 22px; font-weight: 800; }
.stat-label { font-size: 10px; opacity: 0.8; margin-top: 3px; }

.card { background: var(--bg-elevated); border-radius: var(--radius); padding: 18px; margin-bottom: 12px; box-shadow: var(--shadow-sm); border: 1px solid var(--border-light); }
.card h3 { font-size: 14px; font-weight: 700; margin-bottom: 12px; }
.card-desc { font-size: 12px; color: var(--text-tertiary); margin-bottom: 12px; }
.model-rank { display: flex; flex-direction: column; gap: 10px; }
.rank-item { display: flex; align-items: center; gap: 10px; }
.rank-name { font-size: 12px; width: 68px; color: var(--text-secondary); }
.rank-bar { flex: 1; height: 6px; background: var(--bg); border-radius: 3px; overflow: hidden; }
.rank-bar div { height: 100%; background: linear-gradient(90deg, var(--primary), var(--accent)); border-radius: 3px; }
.rank-count { font-size: 11px; color: var(--text-tertiary); width: 36px; text-align: right; }
.chart { display: flex; align-items: flex-end; gap: 4px; height: 90px; }
.chart-bar { display: flex; flex-direction: column; align-items: center; flex: 1; gap: 4px; }
.chart-bar .bar { width: 100%; background: linear-gradient(180deg, var(--primary), rgba(224,122,95,0.3)); border-radius: 3px 3px 0 0; min-height: 3px; }
.chart-bar span { font-size: 9px; color: var(--text-tertiary); }
.summary-result { background: var(--bg); padding: 14px; border-radius: var(--radius-xs); margin-top: 8px; font-size: 13px; line-height: 1.7; }

/* ===== Settings ===== */
.settings-scroll { flex: 1; overflow-y: auto; padding: 16px; }
.form-stack { display: flex; flex-direction: column; gap: 10px; }
.form-stack input { padding: 12px 14px; border: 1.5px solid var(--border); border-radius: var(--radius-xs); font-size: 14px; outline: none; background: var(--bg); color: var(--text-primary); }
.form-stack input:focus { border-color: var(--primary); }
.theme-switch { display: flex; gap: 8px; }
.theme-btn { flex: 1; padding: 12px; border: 2px solid var(--border); border-radius: var(--radius-xs); background: var(--bg); cursor: pointer; font-size: 13px; text-align: center; color: var(--text-secondary); transition: var(--transition); }
.theme-btn.active { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }

.memory-input { display: flex; gap: 8px; margin-bottom: 10px; }
.memory-input input { flex: 1; padding: 10px 14px; border: 1.5px solid var(--border); border-radius: var(--radius-xs); font-size: 13px; outline: none; background: var(--bg); color: var(--text-primary); }
.memory-input button { padding: 8px 16px; border: none; border-radius: var(--radius-xs); background: var(--primary); color: white; font-size: 13px; cursor: pointer; }
.memory-list { display: flex; flex-direction: column; gap: 6px; max-height: 200px; overflow-y: auto; }
.memory-item { display: flex; align-items: center; gap: 6px; padding: 9px 12px; background: var(--bg); border-radius: var(--radius-xs); font-size: 12px; }
.memory-tag { font-size: 10px; padding: 2px 6px; border-radius: 4px; background: var(--primary-soft); color: var(--primary); font-weight: 600; white-space: nowrap; }
.memory-cat { font-size: 10px; padding: 2px 6px; border-radius: 4px; background: var(--accent-soft); color: var(--accent); font-weight: 600; white-space: nowrap; }
.memory-text { flex: 1; min-width: 0; color: var(--text-secondary); }
.memory-item button { width: 18px; height: 18px; border: none; background: none; color: var(--text-tertiary); cursor: pointer; font-size: 13px; }
.empty-hint { font-size: 12px; color: var(--text-tertiary); text-align: center; padding: 16px 0; }

/* Debate */
.debate-scroll { flex: 1; overflow-y: auto; padding: 16px; }
.debate-models { display: flex; flex-wrap: wrap; gap: 8px; }
.model-check { display: flex; align-items: center; gap: 6px; padding: 8px 14px; border: 1.5px solid var(--border); border-radius: 20px; font-size: 13px; cursor: pointer; transition: var(--transition); }
.model-check input { display: none; }
.model-check:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.model-check span { pointer-events: none; }
#debateInput { width: 100%; padding: 12px 14px; border: 1.5px solid var(--border); border-radius: var(--radius-xs); font-size: 14px; outline: none; background: var(--bg); color: var(--text-primary); resize: none; font-family: inherit; }
#debateInput:focus { border-color: var(--primary); }
.debate-answer { margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.debate-answer:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.debate-model-name { font-size: 12px; font-weight: 700; color: var(--primary); margin-bottom: 6px; padding: 3px 10px; background: var(--primary-soft); border-radius: 12px; display: inline-block; }
.debate-content { font-size: 13px; line-height: 1.7; color: var(--text-primary); }
.debate-content p { margin: 4px 0; }
.debate-review { font-size: 13px; line-height: 1.7; }
.debate-review h2 { font-size: 14px; margin: 12px 0 6px; color: var(--primary); }
.debate-review ul { padding-left: 16px; }

/* Words */
.words-header { padding: 20px 16px 12px; text-align: center; }
.words-header h3 { font-size: 16px; font-weight: 700; }
.words-header p { font-size: 12px; color: var(--text-tertiary); margin-top: 4px; }
.word-list { flex: 1; overflow-y: auto; padding: 8px 16px; }
.word-card { background: var(--bg-elevated); border-radius: var(--radius-sm); padding: 16px; margin-bottom: 10px; box-shadow: var(--shadow-sm); border-left: 3px solid var(--primary); transition: var(--transition); }
.word-card.learned { border-left-color: var(--success); opacity: 0.7; }
.word-main { display: flex; align-items: baseline; gap: 10px; margin-bottom: 6px; }
.word-en { font-size: 18px; font-weight: 700; color: var(--primary); }
.word-phonetic { font-size: 12px; color: var(--text-tertiary); }
.word-meaning { font-size: 13px; color: var(--text-primary); margin-bottom: 4px; }
.word-example { font-size: 12px; color: var(--text-secondary); font-style: italic; }
.words-footer { padding: 12px 16px; }

.typing-indicator { display: flex; gap: 5px; padding: 8px 0; }
.typing-indicator span { width: 7px; height: 7px; background: var(--primary); border-radius: 50%; animation: typing 1.4s infinite; opacity: 0.4; }
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing { 0%,60%,100%{transform:translateY(0);opacity:0.3} 30%{transform:translateY(-5px);opacity:1} }

::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
.icp-footer { position: fixed; bottom: 0; left: 0; right: 0; text-align: center; padding: 2px; font-size: 9px; z-index: 0; }
.icp-footer a { color: var(--text-tertiary); text-decoration: none; }
@media (max-width: 430px) { #app { max-width: 100%; } .tab-bar { max-width: 100%; } }
