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

.footer {
  margin-top: 30px;
  text-align: center;
}


.login-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background-color: #f5f5f5;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

.login-card {
  background: #ffffff;
  padding: 2.5rem;
  border-radius: 16px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 400px;
}

.login-header {
  text-align: center;
  margin-bottom: 20px;
}

.login-header h1{
  font-size: 1.5rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 0.5rem;
}
.subtitle{
  font-size: 0.9rem;
  color: #64748b;
  margin-bottom: 10px;
}

.login-footer{
  text-align: left;
  margin-top: 15px;
  font-size: 0.85rem;
  color: #64748b;
}


.signup-container{
  display:flex;
  justify-content: center;
  align-items: center;
  min-height: 80vh;
  background: #f7f7fa;
}

.signup-card{
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
  padding: 40px 32px 32px 32px;
  width: 100%;
}
.signup-card h1{
  text-align: center;
  margin-bottom: 28px;
  color: #333;
  font-size: 2rem;
  letter-spacing: 0.05em;
}

.signup-footer{
  margin-top: 28px;
  text-align: center;
  color: #666;
}

.signup-footer .btn-secondary{
  margin-top: 10px;
}


body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: #f5f5f5;
  color: #333;
}

.navbar {
  background-color: #4CAF50;
  padding: 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
}

.nav-link {
  color: white;
  text-decoration: none;
  padding: 8px 16px;
  margin-right: 10px;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.nav-link:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 15px;
}

.user-name {
  color: white;
  font-weight: 500;
}

.btn-logout {
  background-color: rgba(255, 255, 255, 0.2);
  color: white;
  border: 1px solid white;
  padding: 6px 16px;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.btn-logout:hover {
  background-color: rgba(255, 255, 255, 0.3);
}

.flash-messages {
  max-width: 1200px;
  margin: 20px auto;
  padding: 0 20px;
}

.flash {
  padding: 12px 20px;
  margin-bottom: 10px;
  border-radius: 4px;
}

.flash.notice {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.flash.alert {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.container {
  max-width: 1200px;
  margin: 40px auto;
  background: #fff;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
  padding: 32px 40px;
}

@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position:  200% center; }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-6px); }
}

.recommendation-card {
  position: relative;
  margin-bottom: 36px;
  padding: 36px 40px;
  border-radius: 20px;
  text-align: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 40%, #f093fb 100%);
  box-shadow: 0 8px 32px rgba(102, 126, 234, 0.45), 0 2px 8px rgba(0,0,0,0.12);
  color: white;
  overflow: hidden;
  animation: float 4s ease-in-out infinite;
}

.recommendation-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
    rgba(255,255,255,0) 0%,
    rgba(255,255,255,0.18) 50%,
    rgba(255,255,255,0) 100%);
  background-size: 200% auto;
  animation: shimmer 3s linear infinite;
  border-radius: 20px;
  pointer-events: none;
}

.recommendation-card__badge {
  display: inline-block;
  background: rgba(255,255,255,0.25);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,0.4);
  border-radius: 999px;
  padding: 4px 16px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  margin-bottom: 14px;
  text-transform: uppercase;
}

.recommendation-card__title {
  font-size: 1rem;
  font-weight: 500;
  opacity: 0.85;
  margin-bottom: 10px;
  letter-spacing: 0.08em;
}

.recommendation-card__word {
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-shadow: 0 2px 12px rgba(0,0,0,0.25);
  margin-bottom: 20px;
  line-height: 1.1;
}

.recommendation-card__details {
  display: flex;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
}

.recommendation-card__details p {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.recommendation-card__label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.7;
}

.recommendation-card__value {
  font-size: 1.05rem;
  font-weight: 600;
}

.container h1 {
  font-size: 28px;
  margin-bottom: 30px;
  color: #333;
}

.menu-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.menu-item {
  background: white;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  text-decoration: none;
  color: #333;
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
}

.menu-item:not(.disabled):hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.menu-item.disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.menu-item h2 {
  font-size: 20px;
  margin-bottom: 10px;
  color: #4CAF50;
}

.menu-item p {
  font-size: 14px;
  color: #666;
  line-height: 1.5;
}

.badge {
  position: absolute;
  top: 15px;
  right: 15px;
  background-color: #FF9800;
  color: white;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s;
  border: none;
  cursor: pointer;
}

.btn-primary {
  background-color: #4CAF50;
  color: white;
}

.btn-primary:hover {
  background-color: #45a049;
}

.btn-secondary {
  background-color: #6c757d;
  color: white;
}

.btn-secondary:hover {
  background-color: #5a6268;
}

.btn-danger {
  background-color: #f44336;
  color: white;
}

.btn-danger:hover {
  background-color: #d32f2f;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
  color: #333;
}

.form-control {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
}

.form-control:focus {
  outline: none;
  border-color: #4CAF50;
}

.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.error-box {
  background-color: #f8d7da;
  border: 1px solid #f5c6cb;
  color: #721c24;
  padding: 15px;
  border-radius: 4px;
  margin-bottom: 20px;
}

.error-box h3 {
  margin-bottom: 10px;
  font-size: 16px;
}

.error-box ul {
  margin-left: 20px;
}

.pagination-wrapper {
  display: flex;
  justify-content: center;
  margin: 24px 0;
}

.pagination {
  display: flex;
  list-style: none;
  padding: 0;
  gap: 6px;
}


@media (max-width: 768px) {
  .nav-container {
    flex-direction: column;
    gap: 10px;
  }

  .menu-list {
    grid-template-columns: 1fr;
  }
}


.page-header {

  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid #e0e0e0;
}

.page-header h1 {
  font-size: 24px;
  margin: 0;
}

.header-actions {
  display: flex;
  gap: 10px;
}
.search-row {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;  
}
.search-row .form-group {
  flex: 1;
  min-width: 200px;
}
.search-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.search-box {
  background: white;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 30px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.search-box form {
  display: flex;
  gap: 10px;
}

.search-box .form-control {
  flex: 1;
}

.tags-section {
  margin-bottom: 40px;
}

.tags-section h2 {
  font-size: 18px;
  margin-bottom: 15px;
  color: #333;
}

.tags-table {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th {
  background-color: #f5f5f5;
  padding: 12px;
  text-align: left;
  font-weight: 600;
  border-bottom: 2px solid #e0e0e0;
}

td {
  padding: 12px;
  border-bottom: 1px solid #e0e0e0;
}

tr:last-child td {
  border-bottom: none;
}

tr:hover {
  background-color: #f9f9f9;
}

.tag-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 4px;
  color: white;
  font-weight: 500;
  font-size: 14px;
  margin-bottom: 5px;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 13px;
}

small.form-text {
  color: #888;
  margin-top: 4px;
  display: block;
}
.empty-message {
  text-align: center;
  padding: 40px;
  color: #666;
  background: white;
  border-radius: 8px;
}

.inactive-word {
  background-color: #f0f0f0;
  text-decoration: line-through
}

@media (max-width: 768px) {
  .page-header {
    flex-direction: column;
    gap: 15px;
  }

  .header-actions {
    width: 100%;
  }

  .header-actions .btn {
    flex: 1;
  }

  table {
    font-size: 14px;
  }

  th,
  td {
    padding: 8px;
  }
}

.word-thumbnail {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid #ddd;
}


.no-image {
  color: #999;
  font-size: 14px;
}

.word-japanese {
  font-weight: 600;
  font-size: 16px;
  color: #333;
}

.tags-list,
.synonyms-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.synonym-item {
  background-color: #f0f0f0;
  padding: 3px 10px;
  border-radius: 3px;
  font-size: 13px;
  color: #555;
}

.text-muted {
  color: #999;
  font-size: 14px;
}

.words-count {
  margin: 20px 0;
  font-size: 14px;
  color: #666;
  font-weight: 500;
}
.form-section h2 {
  font-size: 20px;
  margin-top : 10px;
  margin-bottom: 15px;
  color: #333;
}
.form-row {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 15px;
  margin-bottom: 0;
}

.tags-checkboxes {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
}

.tag-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tag-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.tag-checkbox label {
  cursor: pointer;
  margin: 0;
  display: flex;
  align-items: center;
}

#synonyms-fields {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 15px;
}

.synonym-field {
  display: flex;
  align-items: center;
  gap: 10px;
}

.synonym-field .form-control {
  flex: 1;
}

.synonym-delete {
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.synonym-destroy-checkbox {
  width: 18px;
  height: 18px;
}

.current-image {
  margin-bottom: 15px;
  padding: 15px;
  background: #f9f9f9;
  border-radius: 4px;
  border: 1px solid #e0e0e0;
}

.current-image img {
  display: block;
  margin-bottom: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.image-delete {
  display: flex;
  align-items: center;
  gap: 5px;
}

.image-delete input[type="checkbox"] {
  width: 18px;
  height: 18px;
}

.btn-large {
  padding: 12px 30px;
  font-size: 16px;
  font-weight: 600;
}

.btn-success {
  background-color: #28a745;
  color: white;
  border: none;
}

.btn-success:hover {
  background-color: #218838;
}

.quiz-menu-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 20px;
}

.quiz-menu-container h1 {
  font-size: 28px;
  margin-bottom: 30px;
  text-align: center;
}

.quiz-actions {
  display: flex;
  gap: 15px;
  margin: 30px 0;
  justify-content: center;
  flex-wrap: wrap;
}

.quiz-actions .btn {
  flex: 1;
  min-width: 200px;
  text-align: center;
}

.completed-quizzes {
  background: white;
  padding: 30px;
  border-radius: 8px;
  margin-top: 40px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.completed-quizzes h2 {
  font-size: 20px;
  margin-bottom: 20px;
  color: #333;
}

.menu-link {
  text-align: center;
  margin-top: 30px;
}

.quiz-index {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  font-family: Arial, sans-serif;
}


.quiz-container {
  max-width: 700px;
  margin: 40px auto;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
  padding: 32px 28px 28px 28px;
}

.quiz-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}

.quiz-header h1 {
  font-size: 2rem;
  color: #333;
  margin: 0;
}

.btn.btn-primary {
  background: #007bff;
  color: #fff;
  border-radius: 6px;
  padding: 10px 24px;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}

.btn.btn-secondary{
  background: #6c757d;
  color: #fff;
  border-radius: 6px;
  padding: 10px 24px;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}


.btn.btn-primary:hover {
  background: #0056b3;
}

.session-section {
  margin-bottom: 36px;
}

.session-section h2 {
  font-size: 1.2rem;
  color: #555;
  margin-bottom: 18px;
}

.session-card {
  background: #f8f9fa;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  padding: 18px 22px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.session-card.in-progress {
  border-left: 5px solid #007bff;
}

.session-card.completed {
  border-left: 5px solid #28a745;
}

.session-meta {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 18px;
}

.session-progress, .session-score {
  font-weight: bold;
  color: #007bff;
  font-size: 1.1rem;
  min-width: 80px;
}

.session-card.completed .session-score {
  color: #28a745;
}

.session-date {
  color: #888;
  font-size: 0.95rem;
  min-width: 120px;
}

.progress-bar {
  width: 120px;
  height: 10px;
  background: #e9ecef;
  border-radius: 5px;
  overflow: hidden;
  margin: 0 10px;
}

.progress-fill {
  height: 100%;
  background: #007bff;
  transition: width 0.3s;
}

.session-actions {
  display: flex;
  gap: 10px;
}

.btn.btn-secondary {
  background: #6c757d;
  color: #fff;
  border-radius: 6px;
  padding: 8px 18px;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}
.btn.btn-secondary:hover {
  background: #495057;
}

.btn.btn-sm {
  padding: 6px 14px;
  font-size: 0.95rem;
  border-radius: 5px;
}

.btn.btn-sm.btn-primary {
  background: #007bff;
}
.btn.btn-sm.btn-primary:hover {
  background: #0056b3;
}

.btn.btn-sm.btn-warning {
  background: #ffc107;
  color: #333;
}
.btn.btn-sm.btn-warning:hover {
  background: #e0a800;
}

.empty-state {
  color: #aaa;
  text-align: center;
  margin: 18px 0;
  font-size: 1.05rem;
}
/* 

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

.quiz-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 15px;
  border-bottom: 2px solid #e0e0e0;
}

.quiz-header h1 {
  color: #333;
  margin-bottom: 20px;
}


.quiz-header h2 {
  font-size: 24px;
  margin: 0;
}

.progress-info {
  font-size: 18px;
  font-weight: 600;
  color: #4CAF50;
}

.quiz-content {
  border: 3px solid #FF9800;
  padding: 40px;
  margin: 20px 0;
  border-radius: 8px;
  background-color: white;
  min-height: 400px;
}

.quiz-footer {
  text-align: center;
  margin-top: 30px;
}

 */




/* Question Card */
/* .question-card {
  text-align: center;
}

.word-display {
  margin-bottom: 40px;
}

.word-display h3 {
  color: #666;
  margin-bottom: 20px;
  font-size: 18px;
}

.word-text {
  font-size: 42px;
  font-weight: bold;
  color: #333;
  padding: 30px;
  background-color: #f8f9fa;
  border-radius: 8px;
}

.choices-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 30px;
}

.choice-btn {
  padding: 20px;
  border: 2px solid #ddd;
  border-radius: 8px;
  background-color: white;
  cursor: pointer;
  font-size: 16px;
  text-align: left;
  transition: all 0.3s;
  width: 100%;
}

.choice-btn:hover:not(.selected) {
  border-color: #4CAF50;
  background-color: #f0f8ff;
}

.choice-btn.selected {
  border-color: #4CAF50;
  background-color: #e7f3ff;
  font-weight: bold;
}

.answer-feedback {
  margin-top: 30px;
  padding: 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 16px;
}

.answer-feedback.correct {
  background-color: #d4edda;
  color: #155724;
  border: 2px solid #c3e6cb;
}

.answer-feedback.incorrect {
  background-color: #f8d7da;
  color: #721c24;
  border: 2px solid #f5c6cb;
}
 */

.quiz-play {
  max-width: 520px;
  margin: 40px auto;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
  padding: 32px 24px 24px 24px;
  font-family: 'Noto Sans JP', Arial, sans-serif;
}

.quiz-topbar {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}


.progress-bar {

  position: relative;
  width: 100%;
  height: 16px;
  background: #eee;
  border-radius: 8px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0;
  background: #4CAF50;
  border-radius: 8px;
  transition: width 0.3s;
  position: absolute;
  left: 0;
  top: 0;
}

.progress-text {
  display: inline-block;
  vertical-align: middle;
  font-weight: bold;
  margin-left: 8px;
  margin-bottom: 12px;
}


.btn-pause {
  background: #ffc107;
  color: #333;
  border: none;
   border-radius: 6px;
  padding: 10px 32px;
  font-size: 1.1rem;
  cursor: pointer;
  margin-top: 18px;
  transition: background 0.2s;
}
.btn-pause:hover {
  background: #e0a800;
}

.quiz-body {
  margin-top: 18px;
}

#loading-state, #question-state, #feedback-state {
  text-align: center;
  margin-bottom: 18px;
}

.quiz-label {
  font-size: 1.1rem;
  color: #555;
  margin-bottom: 12px;
}

.japanese-word {
  font-size: 2rem;
  font-weight: bold;
  color: #222;
  margin: 18px 0 22px 0;
  letter-spacing: 0.1em;
}

.choices {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 18px;
  align-items: center;
}

.choice-btn {
  background: #f1f3fa;
  border: 1px solid #bfc9d1;
  border-radius: 6px;
  padding: 10px 28px;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background 0.2s, border 0.2s;
  min-width: 120px;
}

.choice-btn.selected,
.choice-btn:hover {
  background: #007bff;
  color: #fff;
  border-color: #007bff;
}

.btn-submit, .btn-next , .btn-back {
  background: #28a745;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 10px 32px;
  font-size: 1.1rem;
  cursor: pointer;
  margin-top: 18px;
  transition: background 0.2s;
}



.quiz-result {
  max-width: 600px;
  margin: 40px auto;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
  padding: 32px 28px 28px 28px;
}

.result-header {
  text-align: center;
  margin-bottom: 32px;
}

.result-header h1 {
  font-size: 2rem;
  color: #333;
  margin-bottom: 18px;
}

.result-score {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  font-size: 2.2rem;
  font-weight: bold;
  margin-bottom: 8px;
}

.score-number {
  color: #007bff;
  font-size: 2.4rem;
}

.score-divider, .score-total, .score-label {
  color: #888;
  font-size: 1.3rem;
}

.result-date {
  color: #888;
  font-size: 1rem;
  margin-bottom: 12px;
}

.answer-list {
  margin-bottom: 32px;
}

.answer-row {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 12px 0;
  border-bottom: 1px solid #f1f3fa;
}

.answer-row.correct {
  background: #eafaf1;
}

.answer-row.incorrect {
  background: #faeaea;
}

.answer-index {
  font-size: 1.1rem;
  color: #888;
  min-width: 32px;
  text-align: center;
}

.answer-word .japanese {
  font-size: 1.2rem;
  font-weight: bold;
  color: #222;
}

.answer-detail {
  display: flex;
  align-items: center;
  gap: 10px;
}

.correct-answer {
  color: #28a745;
  font-size: 1.1rem;
  font-weight: bold;
}

.selected-answer.wrong {
  color: #dc3545;
  font-size: 1.1rem;
  font-weight: bold;
}

.selected-answer.unanswered {
  color: #888;
  font-size: 1.1rem;
  font-style: italic;
}

.answer-mark {
  font-size: 1.5rem;
  font-weight: bold;
  margin-left: auto;
  min-width: 32px;
  text-align: center;
  color: #007bff;
}

.answer-row.incorrect .answer-mark {
  color: #dc3545;
}

.result-actions {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-top: 24px;
}








.badge-success {
  background-color: #28a745;
  color: white;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 500;
}

.badge-danger {
  background-color: #dc3545;
  color: white;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 500;
}






/* Past Quizzes */
.past-quizzes-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

.past-quizzes-container h1 {
  margin-bottom: 30px;
}

.back-link {
  margin-top: 30px;
  text-align: center;
}

.progress {
  height: 25px;
  background-color: #e9ecef;
  border-radius: 4px;
  overflow: hidden;
}

.progress-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  height: 100%;
  transition: width 0.3s;
}

.bg-success {
  background-color: #28a745;
}

.bg-warning {
  background-color: #ffc107;
  color: #333;
}



.session-section {
  margin-bottom: 30px;
}

.session-section h2 {
  color: #555;
  margin-bottom: 15px;
}

.session-card {
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 15px;
  background-color: #f9f9f9;
}

.in-progress {
  border-left: 5px solid #28a745;
}

.session-meta {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.session-progress,
.session-date {
  font-size: 14px;
  color: #666;
}

.progress-bar {
  width: 100%;
  height: 10px;
  background-color: #e9ecef;
  border-radius: 5px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background-color: #28a745;
  transition: width 0.3s;
}

.empty-state {
  text-align: center;
  color: #888;
  font-style: italic;
  padding: 20px;
}



/* Responsive */
@media (max-width: 768px) {
  .quiz-actions {
    flex-direction: column;
  }

  .quiz-actions .btn {
    width: 100%;
    min-width: auto;
  }

  .quiz-content {
    padding: 20px;
  }

  .word-text {
    font-size: 32px;
    padding: 20px;
  }

  .choice-btn {
    padding: 15px;
    font-size: 14px;
  }

  .score-number {
    font-size: 40px;
  }

  .score-card {
    padding: 30px;
  }

  .result-actions {
    flex-direction: column;
  }

  .result-actions .btn {
    width: 100%;
  }
}


@media (max-width: 1024px) {
  .search-grid {
    grid-template-columns: 1fr 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .search-grid {
    grid-template-columns: 1fr;
  }

  .header-actions {
    flex-direction: column;
    width: 100%;
  }

  .header-actions .btn {
    width: 100%;
  }

  .words-table table {
    font-size: 13px;
  }

  .word-thumbnail {
    width: 40px;
    height: 40px;
  }

  .tags-list,
  .synonyms-list {
    flex-direction: column;
  }

  .tags-checkboxes {
    flex-direction: column;
  }

  .synonym-field {
    flex-direction: column;
    align-items: stretch;
  }
}


.current-user-row {
  background-color: #ffe6e6;
  border-left: 4px solid #dc3545;
  font-weight: 600;
}

.current-user-row:hover {
  background-color: #ffd4d4;
}

.ranking-info {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 20px 25px;
  border-radius: 10px;
  margin: 25px 0;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.12);
  text-align: center;
}

.ranking-info p {
  margin: 8px 0;
  font-size: 16px;
  line-height: 1.5;
}

.ranking-info p:first-child {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 10px;
}

.ranking-info strong {
  font-size: 19px;
  font-weight: 700;
  color: #ffd700;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.ranking-table .score-column {
  width: 250px;
  text-align: center;
}

@media (max-width: 768px) {
  .mini-progress {
    min-width: 100px;
    max-width: 150px;
  }

  .mini-progress-bar {
    font-size: 12px;
  }

  .ranking-table .score-column {
    width: auto;
  }
}