* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #0f1729;
  color: #e2e8f0;
  min-height: 100vh;
  line-height: 1.6;
}
a { color: #60a5fa; text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 960px; margin: 0 auto; padding: 0 20px; }

nav {
  background: #1e293b;
  border-bottom: 1px solid #334155;
  padding: 0 20px;
  display: flex;
  gap: 4px;
  overflow-x: auto;
}
nav a {
  color: #94a3b8;
  padding: 14px 14px;
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
nav a:hover, nav a.active { color: #e2e8f0; text-decoration: none; border-bottom-color: #3b82f6; }

header { padding: 40px 0 20px; text-align: center; }
header h1 { font-size: 2.2rem; font-weight: 700; background: linear-gradient(135deg, #60a5fa, #a78bfa); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
header p { color: #64748b; font-size: 1rem; margin-top: 8px; }

.card {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 20px;
}
.card.content h2 {
  font-size: 1.4rem;
  font-weight: 600;
  color: #60a5fa;
  margin-bottom: 16px;
  margin-top: 32px;
}
.card.content h2:first-child { margin-top: 0; }
.card.content h3 { font-size: 1.1rem; color: #a78bfa; margin: 20px 0 10px; }
.card.content p { color: #cbd5e1; margin-bottom: 14px; line-height: 1.7; }
.card.content ul { color: #cbd5e1; margin: 0 0 14px 20px; }
.card.content ul li { margin-bottom: 6px; }

.section-title { font-size: 1.3rem; font-weight: 600; color: #60a5fa; margin-bottom: 16px; }

.translator label { font-size: 0.9rem; color: #94a3b8; margin-bottom: 8px; display: block; }
#word-input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid #334155;
  border-radius: 8px;
  background: #0f1729;
  color: #e2e8f0;
  font-size: 1.1rem;
  outline: none;
  transition: border-color 0.2s;
}
#word-input:focus { border-color: #3b82f6; }

.controls-row {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-top: 10px;
  flex-wrap: wrap;
}
.controls-row label { font-size: 0.8rem; color: #94a3b8; display: flex; align-items: center; gap: 6px; cursor: pointer; }
.count { margin-left: auto; font-size: 0.8rem; color: #64748b; }

.table-wrap { overflow-x: auto; margin-top: 12px; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; padding: 10px 12px; font-size: 0.8rem; color: #64748b; border-bottom: 1px solid #334155; }
td { padding: 10px 12px; border-bottom: 1px solid #1e293b; font-size: 0.9rem; }
tr:nth-child(even) td { background: #1a2536; }
.col-char { font-size: 1.4rem; font-weight: 700; width: 60px; }
.col-word { font-weight: 600; }
.col-pron { color: #94a3b8; font-size: 0.85rem; }
.col-play { text-align: center; width: 40px; }
.play-btn {
  background: none; border: 1px solid #334155; border-radius: 6px;
  color: #60a5fa; font-size: 0.8rem; cursor: pointer; padding: 4px 10px;
  transition: border-color 0.2s;
}
.play-btn:hover { border-color: #60a5fa; }

.print-cards { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.print-card {
  background: #0f1729; border: 1px solid #334155; border-radius: 8px;
  padding: 8px 12px; text-align: center; min-width: 70px;
}
.print-card .pc-char { font-size: 1.5rem; font-weight: 700; }
.print-card .pc-word { font-size: 0.75rem; color: #94a3b8; }
.print-card .pc-pron { font-size: 0.65rem; color: #64748b; }

.btn-group { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 18px; border: 1px solid #334155; border-radius: 8px;
  background: #1e293b; color: #e2e8f0; font-size: 0.85rem;
  font-family: inherit; cursor: pointer; transition: border-color 0.2s;
}
.btn:hover { border-color: #3b82f6; }
.btn-primary { background: linear-gradient(135deg, #3b82f6, #6366f1); border: none; color: #fff; }
.btn-primary:hover { opacity: 0.9; }

.quiz-area { text-align: center; padding: 10px 0; }
.quiz-letter { font-size: 5rem; line-height: 1.2; margin-bottom: 10px; }
.quiz-input {
  padding: 10px 16px; border: 1px solid #334155; border-radius: 8px;
  background: #0f1729; color: #e2e8f0; font-size: 1.2rem;
  text-align: center; outline: none; width: 200px; font-family: inherit;
}
.quiz-input:focus { border-color: #3b82f6; }
.quiz-result { font-size: 1rem; margin-top: 8px; min-height: 1.5rem; }
.quiz-score { font-size: 0.85rem; color: #94a3b8; margin-top: 6px; }
.quiz-controls { display: flex; gap: 8px; justify-content: center; margin-top: 10px; }

.mem-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.mem-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; background: #0f1729; border-radius: 8px;
}
.mem-item .m-char { font-size: 1.3rem; font-weight: 700; width: 30px; text-align: center; }
.mem-item .m-word { font-weight: 600; font-size: 0.85rem; min-width: 60px; }
.mem-item .m-pron { font-size: 0.75rem; color: #94a3b8; min-width: 50px; }
.mem-item .m-tip { font-size: 0.75rem; color: #64748b; }

.hero-subtitle { font-size: 1.1rem; color: #94a3b8; max-width: 600px; margin: 0 auto 8px; line-height: 1.6; }

.faq-item { border-bottom: 1px solid #334155; padding: 12px 0; }
.faq-item:last-child { border-bottom: none; }
.faq-q { font-weight: 600; cursor: pointer; color: #e2e8f0; }
.faq-q:hover { color: #60a5fa; }
.faq-a { color: #94a3b8; font-size: 0.9rem; margin-top: 8px; line-height: 1.6; display: none; }
.faq-a.open { display: block; }

.playback-bar { margin-top: 12px; display: flex; gap: 8px; align-items: center; }

.blog-card {
  background: #1e293b; border: 1px solid #334155; border-radius: 12px;
  padding: 24px; margin-bottom: 16px;
}
.blog-card h3 { font-size: 1.2rem; margin-bottom: 6px; }
.blog-card h3 a { color: #e2e8f0; }
.blog-card h3 a:hover { color: #60a5fa; }
.blog-meta { font-size: 0.8rem; color: #64748b; margin-bottom: 8px; }
.blog-card p { color: #94a3b8; font-size: 0.9rem; line-height: 1.6; }

.example-card {
  background: #1e293b; border: 1px solid #334155; border-radius: 12px;
  padding: 24px; margin-bottom: 20px;
}
.example-card h3 { font-size: 1.15rem; color: #60a5fa; margin-bottom: 8px; }
.example-card .example-label { font-size: 0.75rem; color: #64748b; text-transform: uppercase; letter-spacing: 0.05em; }
.example-dialogue { background: #0f1729; border-radius: 8px; padding: 16px; margin: 12px 0; font-family: monospace; font-size: 0.9rem; line-height: 1.7; color: #cbd5e1; }
.example-dialogue .speaker { color: #a78bfa; font-weight: 600; }
.example-dialogue .phonetic { color: #60a5fa; font-weight: 600; }

footer { text-align: center; padding: 32px 0; color: #475569; font-size: 0.85rem; border-top: 1px solid #1e293b; margin-top: 40px; }

.separator { font-size: 0.8rem; color: #64748b; text-align: center; padding: 12px 0; border-bottom: 1px solid #334155; margin-bottom: 10px; }

@media (max-width: 600px) {
  header h1 { font-size: 1.6rem; }
  nav { gap: 0; }
  nav a { font-size: 0.75rem; padding: 10px 8px; }
  .mem-list { grid-template-columns: 1fr; }
  .controls-row { flex-direction: column; align-items: flex-start; }
  .count { margin-left: 0; }
}

@media print {
  body { background: #fff; color: #000; font-size: 11pt; }
  nav, .btn, .play-btn, .btn-group, .playback-bar, .controls-row, #word-input { display: none !important; }
  .card { background: #fff; border: 1px solid #ccc; break-inside: avoid; }
  .container { max-width: 100%; padding: 0; }
  table { font-size: 10pt; }
  .col-char { font-size: 14pt; }
  td, th { padding: 6px 8px; }
  .print-card { background: #f5f5f5; border: 1px solid #ccc; }
  .print-card .pc-char { font-size: 14pt; }
  header h1 { font-size: 18pt; }
}
