/* Reset & Base Styles */
* { 
  margin: 0; 
  padding: 0; 
  box-sizing: border-box; 
}

body { 
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; 
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); 
  min-height: 100vh; 
}

/* Header */
.header {
  background: linear-gradient(135deg, #ff6b6b, #ffa500);
  color: white;
  padding: 15px 20px;
  display: flex;
  align-items: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.header-spacer {
  flex: 1;
}

.hamburger {
  background: none;
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  padding: 5px 10px;
  margin-right: 15px;
}

.hamburger:hover {
  background: rgba(255,255,255,0.1);
  border-radius: 5px;
}

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

/* Icon Button in Header */
.icon-btn-header {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  padding: 8px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 10px;
}

.icon-btn-header:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

.icon-btn-header svg {
  display: block;
}

/* Ko-fi Support Button */
.kofi-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
  margin-right: 15px;
}

.kofi-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.kofi-btn svg {
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

/* Mobile: Hide Ko-fi text, show only icon */
@media (max-width: 768px) {
  .kofi-btn span {
    display: none;
  }
  .kofi-btn {
    padding: 8px 12px;
    margin-right: 10px;
  }
}

/* GitHub Button */
.github-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
  margin-right: 15px;
}

.github-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.github-btn svg {
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

/* Mobile: Hide GitHub text, show only icon */
@media (max-width: 768px) {
  .github-btn span {
    display: none;
  }
  .github-btn {
    padding: 8px 12px;
    margin-right: 10px;
  }
}

/* Sidebar */
.sidebar { 
  position: fixed; 
  left: -280px; 
  top: 0; 
  width: 280px; 
  height: 100vh; 
  background: white; 
  box-shadow: 2px 0 10px rgba(0,0,0,0.1); 
  transition: left 0.3s ease; 
  z-index: 1000; 
  overflow-y: auto; 
}

.sidebar.open { 
  left: 0; 
}

.sidebar-header { 
  padding: 20px; 
  border-bottom: 1px solid #e0e0e0; 
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
}

.sidebar-close { 
  background: none; 
  border: none; 
  font-size: 24px; 
  cursor: pointer; 
  color: #666; 
}

.sidebar-section { 
  padding: 15px 20px; 
  border-bottom: 1px solid #f0f0f0; 
}

.sidebar-section h3 { 
  font-size: 14px; 
  color: #666; 
  margin-bottom: 10px; 
  text-transform: uppercase; 
}

.sidebar-item { 
  padding: 10px; 
  margin: 5px 0; 
  border-radius: 8px; 
  cursor: pointer; 
  transition: background 0.2s; 
  display: flex; 
  align-items: center; 
  gap: 10px; 
}

.sidebar-item:hover { 
  background: #f5f5f5; 
}

.sidebar-item-icon { 
  font-size: 20px; 
}

.sidebar-item-text { 
  flex: 1; 
  overflow: hidden; 
  text-overflow: ellipsis; 
  white-space: nowrap; 
}

.sidebar-item-delete { 
  background: none; 
  border: none; 
  color: #dc3545; 
  cursor: pointer; 
  padding: 5px; 
  font-size: 18px; 
  opacity: 0; 
  transition: opacity 0.2s; 
}

.sidebar-item:hover .sidebar-item-delete { 
  opacity: 1; 
}

.sidebar-item-delete:hover { 
  color: #c82333; 
}

/* Overlay */
.overlay { 
  position: fixed; 
  top: 0; 
  left: 0; 
  width: 100%; 
  height: 100%; 
  background: rgba(0,0,0,0.5); 
  display: none; 
  z-index: 999; 
}

.overlay.show {
  display: block;
}

/* Loading Overlay for Analysis */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  backdrop-filter: blur(5px);
}

.loading-overlay.show {
  display: flex;
}

.loading-spinner {
  text-align: center;
  color: white;
}

.spinner {
  width: 60px;
  height: 60px;
  margin: 0 auto 20px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top: 4px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading-spinner p {
  font-size: 18px;
  font-weight: 500;
  margin: 10px 0;
}

.loading-subtext {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 400 !important;
}

.progress-container {
  width: 300px;
  height: 8px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  margin: 20px auto 10px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #667eea, #764ba2);
  border-radius: 10px;
  transition: width 0.3s ease;
}

.progress-text {
  font-size: 16px;
  font-weight: 600;
  color: white;
  margin: 5px 0 0;
}

/* Main Content */
.main-content { 
  padding: 20px; 
  max-width: 1400px; 
  margin: 0 auto; 
}

/* Input Section */
.input-section { 
  background: white; 
  border-radius: 15px; 
  padding: 20px; 
  margin-bottom: 20px; 
  box-shadow: 0 2px 10px rgba(0,0,0,0.1); 
}

.input-section.collapsed { 
  padding: 15px; 
  cursor: pointer; 
}

.input-section.collapsed:hover { 
  background: #f9f9f9; 
}

.input-section.collapsed .input-content { 
  display: none; 
}

.input-section.collapsed .input-placeholder { 
  display: block; 
}

.input-placeholder { 
  display: none; 
  color: #999; 
  font-size: 16px; 
}

.input-content textarea { 
  width: 100%; 
  height: 200px; 
  padding: 15px; 
  border: 2px solid #e0e0e0; 
  border-radius: 10px; 
  font-size: 16px; 
  font-family: 'Microsoft YaHei', 'SimHei', sans-serif; 
  resize: vertical; 
  margin-bottom: 15px; 
}

/* Buttons */
.btn { 
  background: linear-gradient(135deg, #667eea, #764ba2); 
  color: white; 
  border: none; 
  padding: 12px 24px; 
  border-radius: 25px; 
  cursor: pointer; 
  font-size: 16px; 
  margin: 5px 5px 5px 0; 
  transition: all 0.3s; 
}

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

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

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

/* Results Section */
.results-section { 
  background: white; 
  border-radius: 15px; 
  box-shadow: 0 2px 10px rgba(0,0,0,0.1); 
  display: none; 
}

.results-section.show { 
  display: flex; 
  gap: 20px; 
}

/* Text Panel */
.text-panel { 
  flex: 1; 
  padding: 20px; 
  overflow-y: auto; 
  max-height: calc(100vh - 140px);  /* Volle Viewport-Höhe minus Header */
  display: flex;
  flex-direction: column;
}

.text-panel-header { 
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
  margin-bottom: 15px; 
}

.save-text-btn {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s;
}

.save-text-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.save-text-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.edit-text-btn {
  background: linear-gradient(135deg, #f39c12, #e67e22);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s;
  margin-right: 10px;
}

.edit-text-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* Info Panel */
.info-panel { 
  width: 40%; 
  padding: 20px; 
  border-left: 2px solid #f0f0f0; 
  overflow-y: auto; 
  max-height: calc(100vh - 140px); 
  display: flex; 
  flex-direction: column; 
  gap: 15px; 
}

/* Reading Text */
.reading-text {
  flex: 1;
  overflow-y: auto;
  line-height: 2.5; 
  font-size: 24px; 
  font-family: 'Microsoft YaHei', 'SimHei', sans-serif; 
  background: #f8f9fa; 
  padding: 0 20px 20px 20px;  /* Kein padding-top, nur sides und bottom */
  border-radius: 10px;
  max-height: calc(100vh - 300px);
  position: relative;  /* Für sticky child positioning */
}

/* Info Panels */
.word-info-panel, 
.sentence-info-panel, 
.stats-panel { 
  background: #f8f9fa; 
  padding: 15px; 
  border-radius: 10px; 
  border-left: 4px solid #667eea; 
}

.sentence-info-panel { 
  background: #e8f5e8; 
  border-left-color: #4CAF50; 
  display: none; 
}

.stats-panel { 
  background: #fff3e0; 
  border-left-color: #ff9800; 
}

/* List View Section */
.list-view-section { 
  background: white; 
  border-radius: 15px; 
  padding: 20px; 
  box-shadow: 0 2px 10px rgba(0,0,0,0.1); 
}

.list-view-section.hidden { 
  display: none; 
}

.list-view-header { 
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
  margin-bottom: 20px; 
  padding-bottom: 15px; 
  border-bottom: 2px solid #f0f0f0; 
}

.section-container { 
  margin-bottom: 15px; 
  border: 1px solid #e0e0e0; 
  border-radius: 8px; 
  overflow: hidden; 
}

.section-header { 
  padding: 15px; 
  background: #f8f9fa; 
  cursor: pointer; 
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
  transition: background 0.2s; 
}

.section-header:hover { 
  background: #e9ecef; 
}

.section-header.active { 
  background: #667eea; 
  color: white; 
}

.section-content { 
  display: none; 
  padding: 15px; 
}

.section-content.show { 
  display: block; 
}

/* Word Table */
.word-table { 
  width: 100%; 
  border-collapse: collapse; 
}

.word-table th { 
  background: #f8f9fa; 
  padding: 10px; 
  text-align: left; 
  font-weight: bold; 
  border-bottom: 2px solid #e0e0e0; 
}

.word-table td { 
  padding: 10px; 
  border-bottom: 1px solid #f0f0f0; 
}

.word-table tr:hover { 
  background: #f8f9fa; 
}

.word-table .hanzi { 
  font-size: 20px; 
  font-family: 'Microsoft YaHei', 'SimHei', sans-serif; 
}

/* HSK Word Styling */
.hsk-word { 
  display: inline-block; 
  margin: 1px; 
  padding: 3px 6px; 
  cursor: pointer; 
  border-radius: 4px; 
  transition: all 0.2s; 
  position: relative; 
}

.hsk-word:hover { 
  transform: scale(1.05); 
  box-shadow: 0 2px 8px rgba(0,0,0,0.2); 
}

.pinyin-above::before { 
  content: attr(data-pinyin); 
  position: absolute; 
  top: 3px; 
  left: 50%; 
  transform: translateX(-50%); 
  font-size: 10px; 
  color: #555; 
  white-space: nowrap; 
  pointer-events: none; 
  font-weight: normal; 
  z-index: 1; 
}

/* TTS Button */
.tts-btn { 
  background: linear-gradient(135deg, #4CAF50, #45a049); 
  color: white; 
  border: none; 
  padding: 6px 12px; 
  border-radius: 15px; 
  cursor: pointer; 
  font-size: 14px; 
  transition: all 0.3s; 
}

.tts-btn:hover { 
  transform: scale(1.05); 
  box-shadow: 0 2px 8px rgba(0,0,0,0.2); 
}

/* HSK Level Colors */
.new-1, .new1 { background-color: #e8f5e8; border-bottom: 2px solid #4caf50; }
.new-2, .new2 { background-color: #e3f2fd; border-bottom: 2px solid #2196f3; }
.new-3, .new3 { background-color: #fff3e0; border-bottom: 2px solid #ff9800; }
.new-4, .new4 { background-color: #fce4ec; border-bottom: 2px solid #e91e63; }
.new-5, .new5 { background-color: #f3e5f5; border-bottom: 2px solid #9c27b0; }
.new-6, .new6 { background-color: #ffebee; border-bottom: 2px solid #f44336; }
.new-7, .new7, .new7plus { background-color: #f1f8e9; border-bottom: 2px solid #689f38; }
.new-8, .new8, .new8plus { background-color: #e0f2f1; border-bottom: 2px solid #00695c; }
.new-9, .new9, .new9plus { background-color: #fafafa; border-bottom: 2px solid #424242; }

/* Old HSK Levels (Pre-2021) */
.old-1, .old1 { background-color: #e8f5e8; border-bottom: 2px solid #4caf50; }
.old-2, .old2 { background-color: #e3f2fd; border-bottom: 2px solid #2196f3; }
.old-3, .old3 { background-color: #fff3e0; border-bottom: 2px solid #ff9800; }
.old-4, .old4 { background-color: #fce4ec; border-bottom: 2px solid #e91e63; }
.old-5, .old5 { background-color: #f3e5f5; border-bottom: 2px solid #9c27b0; }
.old-6, .old6 { background-color: #ffebee; border-bottom: 2px solid #f44336; }

.unknown { background-color: #f5f5f5; border-bottom: 2px solid #9e9e9e; }

/* Stats Box */
.stats { 
  background: #f8f9fa; 
  padding: 15px; 
  border-radius: 10px; 
  margin: 10px 0; 
}

/* Sentence Wrapper */
.sentence-wrapper { 
  cursor: pointer; 
  transition: background-color 0.2s; 
  display: inline-block; 
  padding: 2px 0; 
  border-radius: 4px; 
}

.sentence-wrapper:hover { 
  background-color: #fff3cd; 
}

/* Loading State */
.loading { 
  text-align: center; 
  padding: 40px; 
  color: #666; 
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .results-section.show { 
    flex-direction: column; 
  }
  
  .text-panel { 
    max-height: 50vh; 
    width: 100%;
  }
  
  .info-panel { 
    width: 100%; 
    border-left: none; 
    border-top: 2px solid #f0f0f0;
    padding: 15px;
    max-height: none; /* Remove height constraint on mobile */
  }
  
  /* Ensure all panels inside info-panel use full width */
  .word-info-panel,
  .sentence-info-panel,
  .stats-panel {
    width: 100%;
    box-sizing: border-box;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }
  
  /* Ensure translation content is readable */
  .word-info-panel p,
  .sentence-info-panel p {
    width: 100%;
    margin: 0;
    padding: 5px 0;
  }
}
/* Card layout that works on all screen sizes */
.saved-texts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 15px;
  padding: 10px;
}

.saved-text-card {
  background: #f8f9fa;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  padding: 15px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  transition: transform 0.2s, box-shadow 0.2s;
}

.saved-text-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.saved-text-card .card-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 10px;
}

.saved-text-card h4 {
  margin: 0;
  font-size: 16px;
  color: #333;
  flex: 1;
  word-wrap: break-word;
}

.saved-text-card .text-date {
  font-size: 12px;
  color: #666;
  white-space: nowrap;
  margin-left: 10px;
}

.saved-text-card .text-tags {
  margin-bottom: 12px;
  min-height: 24px;
}

.saved-text-card .text-tag {
  display: inline-block;
  background: #667eea;
  color: white;
  padding: 3px 8px;
  border-radius: 10px;
  font-size: 11px;
  margin-right: 5px;
  margin-bottom: 5px;
}

.saved-text-card .text-tag.no-tag {
  background: #ccc;
  color: #666;
}

.saved-text-card .text-actions {
  display: flex;
  gap: 10px;
}

.saved-text-card .text-actions button {
  flex: 1;
  padding: 8px 12px;
  font-size: 14px;
}

/* On mobile, make it single column */
@media (max-width: 768px) {
  .saved-texts-grid {
      grid-template-columns: 1fr;
      padding: 5px;
  }
  
  .saved-text-card {
      padding: 12px;
  }
}

/* On very large screens, limit the number of columns */
@media (min-width: 1400px) {
  .saved-texts-grid {
      grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  }
}

/* Legacy Modal Styles (for login/password) */
.legacy-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  justify-content: center;
  align-items: center;
  z-index: 2000;
}

.legacy-modal-content {
  background: white;
  padding: 30px;
  border-radius: 15px;
  max-width: 400px;
  width: 90%;
}

.legacy-modal-content h3 {
  margin-bottom: 20px;
}

.legacy-modal-content input {
  width: 100%;
  padding: 10px;
  margin-bottom: 15px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 16px;
}

.modal-buttons {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* User Menu */
.user-menu {
  display: none;
  align-items: center;
  gap: 10px;
  position: relative;
}

.user-menu-btn {
  background: rgba(255,255,255,0.2);
  border: none;
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 14px;
}

.user-menu-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  margin-top: 10px;
  min-width: 150px;
}

.user-menu-dropdown.show {
  display: block;
}

.user-menu-item {
  padding: 12px 20px;
  cursor: pointer;
  color: #333;
  border-bottom: 1px solid #f0f0f0;
}

.user-menu-item:hover {
  background: #f5f5f5;
}

.user-menu-item:last-child {
  border-bottom: none;
}
/* Modal Styles */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.modal-overlay.show {
  display: flex;
}

.modal {
  background: white;
  border-radius: 12px;
  padding: 24px;
  min-width: 400px;
  max-width: 90%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

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

.modal-header h3 {
  margin: 0;
  font-size: 20px;
  color: #333;
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: #999;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.modal-close:hover {
  background: #f0f0f0;
  color: #333;
}

.modal-body {
  margin-bottom: 20px;
}

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

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

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #667eea;
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.btn-secondary {
  background: #e0e0e0;
  color: #555;
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-secondary:hover {
  background: #d0d0d0;
}

.btn-primary {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* Icon Buttons for Lists/Sections/Words */
.icon-btn {
  background: none;
  border: none;
  color: #999;
  font-size: 16px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s;
  opacity: 0;
}

.sidebar-item:hover .icon-btn,
.section-header:hover .icon-btn,
.word-item:hover .icon-btn {
  opacity: 1;
}

.icon-btn:hover {
  background: #f0f0f0;
  color: #333;
}

.icon-btn.delete:hover {
  background: #fee;
  color: #e74c3c;
}

.icon-btn.edit:hover {
  background: #e3f2fd;
  color: #2196f3;
}

/* Add Buttons */
.add-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  margin: 8px 0;
}

.add-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.add-btn.secondary {
  background: white;
  color: #667eea;
  border: 2px solid #667eea;
}

.add-btn.secondary:hover {
  background: #f5f7ff;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

/* Inline Editing */
.inline-edit {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  cursor: text;
  transition: background 0.2s;
}

.inline-edit:hover {
  background: #f5f5f5;
}

.inline-edit input {
  border: 2px solid #667eea;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: inherit;
  font-weight: inherit;
  font-family: inherit;
  width: auto;
  min-width: 150px;
}

.inline-edit input:focus {
  outline: none;
}

/* Word Item Styles */
.word-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-bottom: 1px solid #f0f0f0;
  transition: background 0.2s;
}

.word-item:hover {
  background: #fafafa;
}

.word-info {
  display: flex;
  gap: 12px;
  align-items: center;
  flex: 1;
}

.word-hanzi {
  font-weight: 600;
  font-size: 16px;
  min-width: 60px;
}

.word-pinyin {
  color: #667eea;
  min-width: 100px;
}

.word-meaning {
  color: #666;
  flex: 1;
}

.word-level {
  color: #999;
  font-size: 12px;
  min-width: 60px;
  text-align: right;
}

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