/* Offcanvas Sidebar */
.offcanvas {
  position: fixed;
  top: 0;
  left: -300px;
  width: 300px;
  height: 100vh;
  background: white;
  box-shadow: 2px 0 10px rgba(0,0,0,0.1);
  transition: left 0.3s ease;
  z-index: 2000;
  padding: 1rem;
  overflow-y: auto;
}

.offcanvas.active {
  left: 0;
}

.offcanvas-header {
  font-size: 1.2rem;
  font-weight: bold;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #a8e6cf;
  color: #2d5016;
}

.offcanvas a {
  display: block;
  padding: 0.8rem 1rem;
  margin: 0.5rem 0;
  background: #f8f9fa;
  border-radius: 8px;
  text-decoration: none;
  color: #2d5016;
  transition: all 0.3s ease;
}

.offcanvas a:hover {
  background: #a8e6cf;
  transform: translateX(5px);
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 1999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Progress Section */
.progress-section {
  background: rgba(255,255,255,0.3);
  backdrop-filter: blur(10px);
  padding: 1.5rem;
  border-radius: 12px;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.progress-bar-container {
  margin-bottom: 1rem;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: rgba(255,255,255,0.5);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #4CAF50, #45a049);
  border-radius: 4px;
  transition: width 0.3s ease;
}

.progress-text {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  color: #2d5016;
}

.progress-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  text-align: center;
}

.stat-item {
  padding: 0.5rem;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: bold;
  color: #2d5016;
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 0.8rem;
  color: #666;
}

/* Audio Player Section */
.audio-player-section {
  background: rgba(255,255,255,0.3);
  backdrop-filter: blur(10px);
  padding: 1.5rem;
  border-radius: 12px;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.sentence-display {
  text-align: center;
  margin-bottom: 1.5rem;
}

.native-sentence {
  font-size: 1.4rem;
  font-weight: bold;
  color: #2d5016;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.learning-sentence {
  font-size: 1.2rem;
  color: #555;
  line-height: 1.4;
}

.audio-controls-main {
  text-align: center;
}

.main-audio-player {
  width: 100%;
  margin-bottom: 1rem;
  border-radius: 8px;
}

.audio-buttons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

.audio-btn {
  padding: 0.8rem 0.5rem;
  border: none;
  border-radius: 8px;
  background: #4CAF50;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
}

.audio-btn:hover:not(:disabled) {
  background: #45a049;
  transform: translateY(-2px);
}

.audio-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
  opacity: 0.6;
}

.audio-btn.secondary {
  background: #2196F3;
}

.audio-btn.secondary:hover:not(:disabled) {
  background: #1976D2;
}

.audio-btn.warning {
  background: #FF9800;
}

.audio-btn.warning:hover:not(:disabled) {
  background: #F57C00;
}

/* Navigation Controls */
.navigation-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.nav-btn {
  padding: 1rem;
  border: none;
  border-radius: 8px;
  background: #4CAF50;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 1rem;
}

.nav-btn:hover:not(:disabled) {
  background: #45a049;
  transform: translateY(-2px);
}

.nav-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
  opacity: 0.6;
}

.nav-btn.secondary {
  background: #6c757d;
}

.nav-btn.secondary:hover:not(:disabled) {
  background: #5a6268;
}

/* Difficulty Rating */
.difficulty-section {
  background: rgba(255,255,255,0.3);
  backdrop-filter: blur(10px);
  padding: 1.5rem;
  border-radius: 12px;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.difficulty-section h3 {
  text-align: center;
  margin-bottom: 1.5rem;
  color: #2d5016;
}

.rating-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
}

.rating-card {
  padding: 1rem 0.5rem;
  border: none;
  border-radius: 8px;
  background: white;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
}

.rating-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.rating-card.difficult:hover { background: #ffebee; }
.rating-card.medium:hover { background: #fff3e0; }
.rating-card.easy:hover { background: #e8f5e8; }
.rating-card.mastered:hover { background: #e3f2fd; }

.rating-emoji {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

/* Sentence List */
.sentence-list-section {
  background: rgba(255,255,255,0.3);
  backdrop-filter: blur(10px);
  padding: 1.5rem;
  border-radius: 12px;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.sentence-list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.sentence-list-title {
  color: #2d5016;
  margin: 0;
}

.sentence-count {
  background: #4CAF50;
  color: white;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.9rem;
}

.sentence-items {
  max-height: 400px;
  overflow-y: auto;
}

.sentence-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  margin: 0.5rem 0;
  background: white;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  border-left: 4px solid transparent;
}

.sentence-item:hover {
  transform: translateX(5px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.sentence-item.active {
  border-left-color: #4CAF50;
  background: #f1f8e9;
}

.sentence-content {
  flex: 1;
}

.sentence-native {
  font-weight: bold;
  color: #2d5016;
  margin-bottom: 0.25rem;
}

.sentence-learning {
  color: #666;
  font-size: 0.9rem;
}

.status-indicator {
  font-size: 1.2rem;
  margin-left: 1rem;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 3rem 2rem;
  background: rgba(255,255,255,0.3);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.empty-emoji {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.empty-title {
  color: #2d5016;
  margin-bottom: 1rem;
}

.empty-state p {
  color: #666;
  line-height: 1.6;
  max-width: 400px;
  margin: 0 auto;
}

/* Completion Screen */
.completion-screen {
  text-align: center;
  padding: 3rem 2rem;
  background: rgba(255,255,255,0.3);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  margin-bottom: 1.5rem;
}

.completion-emoji {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.completion-title {
  color: #2d5016;
  margin-bottom: 1rem;
  font-size: 2rem;
}

.completion-screen p {
  color: #666;
  line-height: 1.6;
  max-width: 500px;
  margin: 0 auto 2rem;
}

.completion-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 2rem 0;
  text-align: center;
}

.completion-actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 300px;
  margin: 0 auto;
}

.action-btn {
  padding: 1rem 1.5rem;
  border: none;
  border-radius: 8px;
  background: #4CAF50;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1rem;
  text-decoration: none;
}

.action-btn:hover {
  background: #45a049;
  transform: translateY(-2px);
}

.action-btn.secondary {
  background: #6c757d;
}

.action-btn.secondary:hover {
  background: #5a6268;
}

/* Feedback Toast */
.feedback-toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #4CAF50;
  color: white;
  padding: 1rem 2rem;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  z-index: 3000;
  opacity: 0;
  transition: all 0.3s ease;
}

.feedback-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    padding: 4rem 1rem 1rem 1rem;
  }
  
  .navbar h1 {
    font-size: 1.2rem;
  }
  
  .audio-buttons {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
  
  .rating-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }
  
  .navigation-controls {
    grid-template-columns: 1fr;
  }
  
  .progress-stats {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
  
  .completion-stats {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
  
  .completion-actions {
    flex-direction: column;
  }
  
  .offcanvas {
    width: 280px;
    left: -280px;
  }
}

@media (max-width: 480px) {
  .navbar h1 {
    font-size: 1.1rem;
  }
  
  .native-sentence {
    font-size: 1.2rem;
  }
  
  .learning-sentence {
    font-size: 1rem;
  }
  
  .sentence-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .status-indicator {
    margin-left: 0;
    align-self: flex-end;
  }
}