* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Inter', -apple-system, sans-serif;
  background: #f5f5f5;
  color: #1a1a1a;
  line-height: 1.6;
}

/* Nav */
.nav {
  background: #fff;
  border-bottom: 1px solid #e0e0e0;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav h1 { font-size: 18px; font-weight: 700; }
.nav h1 span { color: #2563eb; }
.nav-links { display: flex; gap: 8px; }
.nav-links a {
  padding: 6px 16px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  color: #666;
  transition: all 0.2s;
}
.nav-links a:hover { background: #f0f0f0; color: #1a1a1a; }
.nav-links a.active {
  background: #2563eb;
  color: #fff;
}

/* Container */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 24px 16px;
}

/* Card */
.card {
  background: #fff;
  border-radius: 10px;
  border: 1px solid #e5e5e5;
  margin-bottom: 20px;
  overflow: hidden;
}
.card-header {
  padding: 14px 20px;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-header h2 {
  font-size: 15px;
  font-weight: 600;
}
.card-header .tag {
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 20px;
  background: #eff6ff;
  color: #2563eb;
  font-weight: 600;
}
.card-body { padding: 20px; }

/* Pictures page */
.card-body.pic-layout {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.pic-img {
  max-width: 260px;
  min-width: 200px;
  max-height: 180px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid #eee;
  flex-shrink: 0;
}
.sample-answer {
  background: #f8fafc;
  border-left: 3px solid #2563eb;
  padding: 14px 16px;
  border-radius: 0 8px 8px 0;
  font-size: 14px;
  line-height: 1.7;
  color: #334155;
  flex: 1;
}
.sample-answer strong { color: #1e40af; }

/* Read Aloud page */
.text-block {
  font-size: 15px;
  line-height: 1.8;
  color: #1a1a1a;
  margin-bottom: 16px;
}
.vocab-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.vocab-table th {
  text-align: left;
  padding: 8px 12px;
  background: #f8fafc;
  border-bottom: 2px solid #e5e5e5;
  font-weight: 600;
  color: #64748b;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.vocab-table td {
  padding: 8px 12px;
  border-bottom: 1px solid #f0f0f0;
}
.vocab-table tr:last-child td { border-bottom: none; }
.vocab-table .word { font-weight: 600; color: #1e40af; }
.vocab-table .ipa { font-family: monospace; color: #666; font-size: 12px; }
.vocab-table .vn { color: #059669; font-weight: 500; }

/* Tip box */
.tip {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 14px 16px;
  font-size: 13px;
  margin-bottom: 20px;
  color: #92400e;
}
.tip strong { color: #78350f; }

/* Footer */
.footer {
  text-align: center;
  padding: 40px 16px;
  color: #999;
  font-size: 12px;
}

@media (max-width: 768px) {
  .nav { padding: 10px 12px; flex-wrap: wrap; gap: 8px; }
  .nav h1 { font-size: 15px; }
  .nav-links a { padding: 5px 10px; font-size: 13px; }
  .container { padding: 12px 8px; }
  .card-body { padding: 14px; }
  .card-header { padding: 10px 14px; flex-wrap: wrap; gap: 6px; }
  .card-header h2 { font-size: 13px; }
  .pic-img { max-height: 280px; }
  .card-body.pic-layout { flex-direction: column; }
  .pic-img { min-width: unset; max-width: 100%; }
  .sample-answer { font-size: 13px; padding: 10px 12px; }
  .text-block { font-size: 14px; }
  .vocab-table { font-size: 12px; }
  .vocab-table th, .vocab-table td { padding: 6px 8px; }
  .tip { font-size: 12px; padding: 10px 12px; }
}

@media (max-width: 480px) {
  .nav h1 { font-size: 14px; }
  .nav-links { gap: 4px; }
  .nav-links a { padding: 4px 8px; font-size: 12px; }
  .container { padding: 8px 4px; }
  .card-body { padding: 10px; }
  .pic-img { max-height: 220px; border-radius: 6px; }
  .sample-answer { font-size: 12px; line-height: 1.6; }
  .vocab-table .ipa { font-size: 11px; }
  .card-header h2 { font-size: 12px; }
  .card-header .tag { font-size: 10px; padding: 2px 8px; }
}
