.app-dictionary {
  max-width: 1200px;
}

.dictionary-main {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.dictionary-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin-bottom: 10px;
}

.stat-card {
  background: linear-gradient(135deg, #1e293b, #0f172a);
  border-radius: 12px;
  padding: 20px;
  border: 1px solid rgba(30, 64, 175, 0.4);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transition: transform 0.2s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  border-color: rgba(37, 99, 235, 0.6);
}

.stat-label {
  font-size: 14px;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-value {
  font-size: 32px;
  font-weight: 700;
  color: #e5e7eb;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  padding: 15px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(30, 64, 175, 0.3);
}

.action-btn {
  padding: 10px 20px;
  border-radius: 999px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border: none;
  color: white;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.action-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(37, 99, 235, 0.5);
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
}

.action-btn:active {
  transform: translateY(0);
}

.action-btn.secondary {
  background: linear-gradient(135deg, #475569, #334155);
  box-shadow: 0 4px 15px rgba(71, 85, 105, 0.3);
}

.action-btn.secondary:hover {
  background: linear-gradient(135deg, #334155, #1e293b);
  box-shadow: 0 8px 25px rgba(71, 85, 105, 0.5);
}

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

.file-actions {
  display: flex;
  gap: 10px;
  margin-left: auto;
}

.search-container {
  position: relative;
  margin: 10px 0;
}

.search-input {
  width: 100%;
  padding: 12px 20px 12px 45px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  background: rgba(15, 23, 42, 0.9);
  color: #f9fafb;
  font-size: 15px;
  outline: none;
  transition: all 0.2s ease;
}

.search-input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.3);
  background: rgba(15, 23, 42, 1);
}

.search-input::before {
  content: "🔍";
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
}

.clear-search-btn {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 20px;
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.clear-search-btn:hover {
  background: rgba(148, 163, 184, 0.2);
  color: #f9fafb;
}

.words-table-container {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid rgba(30, 64, 175, 0.3);
  background: rgba(15, 23, 42, 0.7);
}

.words-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 800px;
}

.words-table th {
  background: linear-gradient(135deg, #1e293b, #0f172a);
  padding: 16px;
  text-align: left;
  color: #e5e7eb;
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid rgba(30, 64, 175, 0.5);
}

.words-table th.col-check {
  width: 50px;
  text-align: center;
}

.words-table th.col-word {
  width: 25%;
}

.words-table th.col-translation {
  width: 25%;
}

.words-table th.col-status {
  width: 15%;
}

.words-table th.col-score {
  width: 10%;
}

.words-table th.col-progress {
  width: 15%;
}

.words-table th.col-actions {
  width: 10%;
}

.words-table td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  color: #e5e7eb;
  font-size: 15px;
}

.words-table tbody tr {
  transition: background-color 0.2s ease;
}

.words-table tbody tr:hover {
  background: rgba(30, 64, 175, 0.1);
}

.words-table tbody tr.study-row {
  background: linear-gradient(90deg, rgba(34, 197, 94, 0.1), transparent);
}

.words-table tbody tr.learned-row {
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.1), transparent);
}

.word-checkbox {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #3b82f6;
}

.word-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
}

.word-status.study {
  background: rgba(34, 197, 94, 0.2);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.4);
}

.word-status.learned {
  background: rgba(59, 130, 246, 0.2);
  color: #3b82f6;
  border: 1px solid rgba(59, 130, 246, 0.4);
}

.word-status.none {
  background: rgba(148, 163, 184, 0.2);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.4);
}

.score-display {
  font-size: 20px;
  font-weight: 700;
  text-align: center;
  min-width: 40px;
}

.score-1 { color: #ef4444; }
.score-2 { color: #f97316; }
.score-3 { color: #f59e0b; }
.score-4 { color: #eab308; }
.score-5 { color: #84cc16; }
.score-6 { color: #22c55e; }
.score-7 { color: #10b981; }
.score-8 { color: #14b8a6; }
.score-9 { color: #06b6d4; }
.score-10 { color: #3b82f6; }

.score-controls {
  display: flex;
  gap: 8px;
  align-items: center;
}

.score-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: rgba(30, 64, 175, 0.3);
  color: #e5e7eb;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.score-btn:hover {
  background: rgba(30, 64, 175, 0.6);
  transform: scale(1.1);
}

.score-btn:active {
  transform: scale(0.95);
}

.score-btn.disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.score-btn.disabled:hover {
  background: rgba(30, 64, 175, 0.3);
  transform: none;
}

.progress-bar {
  height: 8px;
  background: rgba(15, 23, 42, 0.7);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 4px;
}

.progress-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.3s ease;
}

.progress-fill.score-1-3 { background: linear-gradient(to right, #ef4444, #f97316); }
.progress-fill.score-4-6 { background: linear-gradient(to right, #f59e0b, #22c55e); }
.progress-fill.score-7-10 { background: linear-gradient(to right, #10b981, #3b82f6); }

.word-actions {
  display: flex;
  gap: 8px;
}

.word-action-btn {
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(30, 64, 175, 0.2);
  color: #e5e7eb;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.word-action-btn:hover {
  background: rgba(30, 64, 175, 0.4);
  border-color: #3b82f6;
}

.bulk-actions {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(30, 64, 175, 0.4);
  margin-top: 10px;
}

#selected-count {
  font-size: 14px;
  color: #94a3b8;
  font-weight: 500;
}

.progress-info {
  padding: 20px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(30, 64, 175, 0.3);
  margin-top: 20px;
}

.progress-info h3 {
  color: #e5e7eb;
  margin-bottom: 15px;
  font-size: 18px;
}

.score-levels {
  display: flex;
  gap: 30px;
  margin-bottom: 15px;
  flex-wrap: wrap;
}

.score-level {
  display: flex;
  align-items: center;
  gap: 10px;
}

.score-badge {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: white;
  font-size: 14px;
}

.score-1 { background: linear-gradient(135deg, #ef4444, #dc2626); }
.score-5 { background: linear-gradient(135deg, #84cc16, #65a30d); }
.score-10 { background: linear-gradient(135deg, #3b82f6, #1d4ed8); }

.score-label {
  color: #e5e7eb;
  font-size: 14px;
}

.info-text {
  color: #94a3b8;
  font-size: 14px;
  line-height: 1.5;
  margin: 0;
}

@media (max-width: 768px) {
  .dictionary-stats {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .file-actions {
    margin-left: 0;
    justify-content: center;
  }

  .score-levels {
    flex-direction: column;
    gap: 15px;
  }
}