* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  padding: 20px;
}
.container {
  max-width: 900px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  backdrop-filter: blur(10px);
}
.header {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  color: white;
  padding: 30px;
  text-align: center;
}
.header h1 {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.header p {
  opacity: 0.9;
  font-size: 1.1rem;
}
.controls {
  padding: 25px 30px;
  background: #f8f9fa;
  border-bottom: 1px solid #e9ecef;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
  justify-content: center;
}
.mode-switch {
  display: flex;
  background: white;
  border-radius: 12px;
  padding: 4px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}
.mode-button {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  background: transparent;
  color: #6c757d;
}
.mode-button.active {
  background: linear-gradient(135deg, #4facfe, #00f2fe);
  color: white;
  box-shadow: 0 2px 8px rgba(79, 172, 254, 0.3);
}
.difficulty-control {
  display: flex;
  align-items: center;
  gap: 15px;
  background: white;
  padding: 12px 20px;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}
.difficulty-slider {
  width: 200px;
  height: 6px;
  border-radius: 3px;
  background: #e9ecef;
  outline: none;
  appearance: none;
}
.difficulty-slider::-webkit-slider-thumb {
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4facfe, #00f2fe);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(79, 172, 254, 0.3);
}
.difficulty-value {
  background: #4facfe;
  color: white;
  padding: 6px 12px;
  border-radius: 20px;
  font-weight: 600;
  min-width: 50px;
  text-align: center;
  font-size: 14px;
}
.content {
  padding: 30px;
}
.progress-section {
  margin-bottom: 25px;
}
.sentence-counter {
  text-align: center;
  margin-bottom: 15px;
  color: #64748b;
  font-weight: 500;
  font-size: 16px;
}
.progress-bar {
  width: 100%;
  height: 8px;
  background: #e9ecef;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 20px;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #4facfe, #00f2fe);
  transition: width 0.3s ease;
  border-radius: 4px;
}
.stats {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-bottom: 25px;
  flex-wrap: wrap;
}
.stat-item {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  padding: 12px 16px;
  border-radius: 10px;
  text-align: center;
  min-width: 100px;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
}
.stat-value {
  font-size: 1.4rem;
  font-weight: 700;
  display: block;
}
.stat-label {
  font-size: 0.8rem;
  opacity: 0.9;
}
/* Translation Mode Styles */
.translation-mode {
  display: none;
}
.translation-mode.active {
  display: block;
}
.english-sentence {
  background: white;
  padding: 25px;
  border-radius: 12px;
  margin-bottom: 20px;
  border-left: 4px solid #4facfe;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}
.english-sentence h3 {
  color: #1e293b;
  margin-bottom: 10px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.english-sentence p {
  color: #475569;
  font-size: 16px;
  line-height: 1.6;
}
.input-area {
  margin-bottom: 20px;
}
.input-area label {
  display: block;
  margin-bottom: 10px;
  color: #374151;
  font-weight: 600;
}
textarea {
  width: 100%;
  padding: 15px;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  font-size: 16px;
  line-height: 1.5;
  resize: vertical;
  min-height: 100px;
  font-family: inherit;
  transition: all 0.3s ease;
}
textarea:focus {
  outline: none;
  border-color: #4facfe;
  box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.1);
}
.check-button {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}
.check-button:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}
.check-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}
.result {
  margin-top: 20px;
  padding: 20px;
  border-radius: 12px;
  animation: slideIn 0.3s ease;
  display: none;
}
.result.correct {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
}
.result.incorrect {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  color: #1e293b;
  border: 1px solid #cbd5e1;
}

/* Word comparison styles */
.word-comparison {
  margin-top: 15px;
}
.word-comparison h5 {
  margin-bottom: 10px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #374151;
}
.comparison-container {
  background: #f8fafc;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 10px;
  border: 1px solid #e2e8f0;
}
.comparison-row {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin-bottom: 8px;
  align-items: flex-start;
}
.word {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 14px;
  line-height: 1.4;
  margin: 1px;
}
.word.correct {
  background: #e0f2fe;
  color: #0277bd;
  border: 1px solid #b3e5fc;
}
.word.incorrect {
  background: #fff3e0;
  color: #e65100;
  text-decoration: line-through;
  border: 1px solid #ffcc02;
}
.word.missing {
  background: #ffebee;
  color: #c62828;
  border: 2px dashed #ef5350;
}
.word.extra {
  background: #fce4ec;
  color: #ad1457;
  border: 2px solid #f06292;
}
.errors-summary {
  margin-top: 15px;
  background: #f8fafc;
  padding: 12px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
}
.error-type {
  margin-bottom: 8px;
  font-size: 13px;
  color: #475569;
}
.error-count {
  font-weight: bold;
  color: #dc2626;
}

/* Fill-in-blank Mode Styles */
.fillblank-mode {
  display: none;
}
.fillblank-mode.active {
  display: block;
}
.paragraph {
  background: #ffffff;
  border: 1px solid #e9ecef;
  border-radius: 12px;
  padding: 25px;
  margin-bottom: 20px;
  line-height: 1.8;
  font-size: 1.1rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}
.paragraph:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}
.blank-input {
  display: inline-block;
  background: #fff3cd;
  border: 2px solid #ffc107;
  border-radius: 6px;
  padding: 4px 10px;
  margin: 0 2px;
  font-size: inherit;
  font-family: inherit;
  min-width: 60px;
  text-align: center;
  transition: all 0.3s ease;
}
.blank-input:focus {
  outline: none;
  background: #ffffff;
  border-color: #4facfe;
  box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.2);
}
.blank-input.correct {
  background: #d4edda;
  border-color: #28a745;
  color: #155724;
}
.blank-input.incorrect {
  background: #f8d7da;
  border-color: #dc3545;
  animation: shake 0.5s ease-in-out;
}
.blank-input.revealed {
  background: #e2e3e5;
  border-color: #6c757d;
  color: #495057;
  font-style: italic;
}
.hint-button {
  background: none;
  border: none;
  color: #6c757d;
  font-size: 12px;
  cursor: pointer;
  margin-left: 5px;
  padding: 2px 6px;
  border-radius: 4px;
  transition: all 0.3s ease;
}
.hint-button:hover {
  background: #f8f9fa;
  color: #495057;
}
.reveal-all-button {
  background: linear-gradient(135deg, #ff6b6b, #feca57);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-bottom: 20px;
}
.reveal-all-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
}
/* Navigation */
.navigation {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  margin-top: 30px;
}
.nav-button {
  background: linear-gradient(135deg, #4facfe, #00f2fe);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  flex: 1;
  max-width: 200px;
}
.nav-button:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(79, 172, 254, 0.4);
}
.nav-button:disabled {
  background: #6c757d;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-5px);
  }
  75% {
    transform: translateX(5px);
  }
}
.french-accent-keyboard {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 8px;
  background: #ffffff;
  border: 2px solid #4facfe;
  border-radius: 8px;
  margin: 8px 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}
.accent-btn {
  background: #f0f9ff;
  border: 1px solid #4facfe;
  border-radius: 4px;
  padding: 6px 10px;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #0369a1;
  font-weight: 500;
}
.accent-btn:hover {
  background: #e0f2fe;
  border-color: #0284c7;
  color: #0284c7;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.accent-btn:active {
  transform: translateY(1px);
  background: #bae6fd;
}

@media (max-width: 768px) {
  .container {
    margin: 10px;
    border-radius: 15px;
  }
  .header h1 {
    font-size: 1.8rem;
  }
  .controls {
    flex-direction: column;
    align-items: stretch;
  }
  .mode-switch,
  .difficulty-control {
    width: 100%;
    justify-content: center;
  }
  .stats {
    flex-direction: column;
    align-items: center;
  }
  .navigation {
    flex-direction: column;
  }
  .nav-button {
    max-width: none;
  }
  .floating-keyboard {
    position: static;
    margin-top: 10px;
    display: block;
  }
}
.toggle-section {
  text-align: right;
  margin-bottom: 10px;
}

.toggle-button {
  background: #2563eb;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.3s ease;
}

.toggle-button:hover {
  background: #1d4ed8;
}
