/* Word List Page Styles */
.summary-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  padding: 1.2rem 1rem 1.2rem 1rem;
  background: #f8fafc;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

.summary-left {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}

.memorized-count {
  color: #555;
  font-size: 0.9rem;
}

.filters {
  margin: 0.5rem 0 0.5rem 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  align-items: center;
  margin-bottom: 1.2rem;
}

.filters label {
  font-size: 1rem;
  margin-right: 0.3rem;
}

/* Make dropdowns and buttons more accessible */
.filters select, .filters input, .summary-bar button {
  font-size: 1rem;
  padding: 0.3rem 0.7rem;
  border-radius: 5px;
  border: 1px solid #d1d5db;
  margin-right: 0.5rem;
}

/* Word Detail Page Styles */
.feed-container {
  max-width: 800px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.page-title {
  font-size: 2.5rem;
  color: #2c3e50;
  margin-bottom: 2rem;
  text-align: center;
  font-weight: 700;
}

.vocab-card {
  min-height: 270px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  padding: 2rem;
  margin-bottom: 2rem;
  transition: transform 0.2s ease;
}

.vocab-card:hover {
  transform: translateY(-2px);
}

.vocab-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #f0f0f0;
}

.vocab-term {
  font-size: clamp(1.2rem, 2.5vw, 2.5rem);
  font-weight: 700;
  color: #2c3e50;
  word-break: break-word;
  line-height: 1.1;
  max-width: 90%;
  display: inline-block;
}

.vocab-card p {
  margin: 1rem 0;
  font-size: 1.1rem;
  line-height: 1.6;
  color: #4a5568;
}

.vocab-card strong {
  color: #2d3748;
  font-weight: 600;
}

.vocab-example {
  margin: 1.5rem 0;
  padding: 1.25rem;
  background: #f8fafc;
  border-left: 4px solid #4299e1;
  color: #4a5568;
  font-size: 1.1rem;
  line-height: 1.6;
  border-radius: 0 8px 8px 0;
}

.vocab-card-content {
  flex: 1 1 auto;
}

.vocab-actions {
  display: flex;
  gap: 1.2rem;
  margin-top: 2.5rem;
  justify-content: center;
  padding-bottom: 0.5rem;
}

/* Equal width and improved style for vocab card buttons */
.vocab-actions .btn.small {
  min-width: 130px;
  max-width: 160px;
  width: 140px;
  text-align: center;
  padding: 0.7rem 0;
  font-size: 1.08rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  border-radius: 8px;
  margin: 0;
}

.btn.small:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn.small.green {
  background-color: #48bb78;
}

.btn.small.green:hover {
  background-color: #38a169;
}

.btn.small.yellow {
  background-color: #ecc94b;
  color: #2d3748;
}

.btn.small.yellow:hover {
  background-color: #d69e2e;
}

.back-link {
  text-align: center;
  margin-top: 2rem;
}

.back-link a {
  color: #4a5568;
  text-decoration: none;
  font-size: 1.1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: color 0.2s ease;
}

.back-link a:hover {
  color: #2d3748;
}

/* Audio Button */
.audio-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.2em;
  padding: 5px;
  transition: transform 0.2s;
}

.audio-btn:hover {
  transform: scale(1.1);
}

.audio-btn:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

/* Responsive Design */
@media (max-width: 640px) {
  .page-title {
    font-size: 2rem;
  }

  .vocab-card {
    min-height: 220px;
    padding: 1.5rem;
  }

  .vocab-term {
    font-size: clamp(1rem, 5vw, 1.75rem);
  }

  .vocab-card p {
    font-size: 1rem;
  }

  .vocab-example {
    font-size: 1rem;
    padding: 1rem;
  }

  .vocab-actions {
    flex-direction: column;
    align-items: stretch;
    margin-top: 1.2rem;
    margin-bottom: 0.2rem;
    padding-bottom: 0.2rem;
  }

  .vocab-actions .btn.small {
    width: 100%;
    min-width: 0;
    max-width: none;
    margin-bottom: 0.5rem;
  }

  .vocab-actions {
    gap: 0.7rem;
  }
}

/* Responsive: stack controls on small screens */
@media (max-width: 800px) {
  .summary-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 1.5rem;
    padding: 1rem 0.5rem;
  }
  .summary-left {
    flex-direction: column;
    align-items: stretch;
    gap: 0.7rem;
  }
  .filters {
    flex-direction: column;
    align-items: stretch;
    gap: 1.2rem;
    margin-bottom: 1.5rem;
  }
}

html, body {
  min-height: 100vh;
  height: auto;
  overflow-y: auto;
}

/* Translation line larger and more prominent */
.vocab-translation {
  font-size: 1.35rem;
  font-weight: 600;
  color: #34495e;
  margin: 1.1rem 0 0.7rem 0;
}

/* Type line smaller and less prominent */
.vocab-type {
  font-size: 1.05rem;
  font-weight: 500;
  color: #4a5568;
  margin-bottom: 0.7rem;
}

/* Pagination Styles */
.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  justify-content: center;
  align-items: center;
  margin: 2rem 0 1.5rem 0;
  font-size: 1.1rem;
  flex-shrink: 0;
  flex-grow: 0;
}
.pagination a, .pagination span.current {
  display: inline-block;
  min-width: 2.1em;
  padding: 0.4em 0.7em;
  margin: 0 0.1em;
  border-radius: 6px;
  text-align: center;
  text-decoration: none;
  color: #1976d2;
  background: #f0f4fa;
  transition: background 0.2s, color 0.2s;
  font-weight: 500;
}
.pagination a:hover {
  background: #1976d2;
  color: #fff;
}
.pagination span.current {
  background: #1976d2;
  color: #fff;
  font-weight: bold;
  cursor: default;
}
.pagination .ellipsis {
  padding: 0 0.5em;
  color: #888;
  font-size: 1.2em;
  user-select: none;
}

@media (max-width: 600px) {
  .pagination {
    flex-wrap: wrap;
    font-size: 1rem;
    gap: 0.15rem;
  }
  .pagination a, .pagination span.current {
    min-width: 1.7em;
    padding: 0.3em 0.5em;
    font-size: 1rem;
    margin: 0 0.05em;
  }
}

@media (max-width: 400px) {
  .pagination {
    font-size: 0.95rem;
  }
  .pagination a, .pagination span.current {
    min-width: 1.3em;
    padding: 0.2em 0.3em;
    font-size: 0.95rem;
  }
}
