* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; color: #1f2937; background: #f4f6fb; }

body.centered { min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.auth-card { background: #fff; padding: 32px 28px; border-radius: 12px; box-shadow: 0 6px 24px rgba(0,0,0,.08); width: 320px; display: flex; flex-direction: column; gap: 12px; }
.auth-card h1 { margin: 0 0 12px; font-size: 22px; text-align: center; }
.auth-card input { padding: 10px 12px; border: 1px solid #d1d5db; border-radius: 8px; font-size: 14px; }
.auth-card button { padding: 10px; border: 0; border-radius: 8px; background: #2563eb; color: #fff; font-size: 15px; cursor: pointer; }
.auth-card button:hover { background: #1d4ed8; }
.auth-card .btn-link { text-align: center; color: #2563eb; text-decoration: none; font-size: 13px; }
.hint { color: #6b7280; font-size: 13px; margin: 0; text-align: center; }
.msg { color: #dc2626; font-size: 13px; min-height: 18px; text-align: center; }
.msg.ok { color: #059669; }

#app { max-width: 880px; margin: 0 auto; padding: 20px 16px 60px; }
.topbar { display: flex; justify-content: space-between; align-items: center; padding-bottom: 12px; border-bottom: 1px solid #e5e7eb; margin-bottom: 20px; }
.topbar h1 { font-size: 22px; margin: 0; }
.user-area { display: flex; gap: 12px; align-items: center; font-size: 14px; }
.btn-link { background: none; border: 0; color: #2563eb; cursor: pointer; font-size: 14px; padding: 0; text-decoration: none; }
.btn-link:hover { text-decoration: underline; }

.add-box { background: #fff; padding: 16px; border-radius: 12px; box-shadow: 0 2px 8px rgba(0,0,0,.04); margin-bottom: 14px; }
.add-box form { display: flex; gap: 8px; flex-wrap: wrap; }
.add-box input { flex: 1; min-width: 160px; padding: 10px 12px; border: 1px solid #d1d5db; border-radius: 8px; font-size: 14px; }
.add-box button { padding: 10px 18px; border: 0; border-radius: 8px; background: #2563eb; color: #fff; font-size: 14px; cursor: pointer; }
.add-box button:disabled { background: #93c5fd; cursor: progress; }
.add-box button:hover:not(:disabled) { background: #1d4ed8; }

.search-box { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; padding: 0 4px; }
.search-box input { flex: 1; padding: 8px 12px; border: 1px solid #d1d5db; border-radius: 8px; font-size: 14px; background: #fff; }
.count { color: #6b7280; font-size: 13px; }

#word-list { display: flex; flex-direction: column; gap: 12px; }
.card { background: #fff; padding: 14px 16px; border-radius: 12px; box-shadow: 0 2px 8px rgba(0,0,0,.04); }
.card-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.card-head .word { margin: 0; font-size: 22px; color: #111827; }
.phonetics { display: flex; align-items: center; gap: 10px; flex: 1; }
.ph { color: #6b7280; font-size: 14px; }
.ph:empty { display: none; }
.ph-uk::before { content: "英 "; color: #9ca3af; }
.ph-us::before { content: "美 "; color: #9ca3af; }
.btn-audio { background: #eef2ff; border: 0; border-radius: 50%; width: 32px; height: 32px; cursor: pointer; font-size: 14px; }
.btn-audio:hover { background: #c7d2fe; }
.btn-audio:disabled { opacity: .4; cursor: not-allowed; }
.card-actions { display: flex; gap: 6px; }
.card-actions button { background: transparent; border: 0; cursor: pointer; padding: 4px 8px; border-radius: 6px; font-size: 14px; color: #6b7280; }
.card-actions button:hover { background: #f3f4f6; color: #111827; }
.translation { margin-top: 8px; color: #0f766e; font-size: 15px; font-weight: 500; line-height: 1.6; white-space: pre-line; }
.translation:empty { display: none; }
.examples { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.examples:empty { display: none; }
.example-item { padding: 8px 10px; background: #f9fafb; border-left: 3px solid #c7d2fe; border-radius: 4px; }
.ex-en { color: #1f2937; font-size: 14px; line-height: 1.5; }
.ex-zh { color: #6b7280; font-size: 13px; line-height: 1.5; margin-top: 2px; }
.note { margin-top: 8px; padding: 6px 10px; background: #fef9c3; border-radius: 6px; font-size: 13px; color: #713f12; }
.note:empty { display: none; }
.created { margin-top: 6px; color: #9ca3af; font-size: 12px; }
.empty { text-align: center; color: #9ca3af; padding: 60px 0; }
