/* Navigation Styles */
.mobile-header {
  display: none;
  align-items: center;
  padding: 1rem;
  background: #0050ef;
  border-bottom: 1px solid #e9ecef;
  position: sticky;
  top: 0;
  z-index: 100;
}

.mobile-header .app-title {
  margin: 0;
  color: white;
  font-size: 2rem;
  font-weight: 700;
  margin-left: 1rem;
}

.menu-toggle, .close-sidebar {
  background: none;
  border: none;
  cursor: pointer;
  color: white;
  padding: 1rem;
  border-radius: 6px;
  transition: background-color 0.3s ease;
  
}

.menu-toggle:hover, .close-sidebar:hover {
  background: rgba(0, 80, 239, 0.1);
}

/* Sidebar Navigation */
.sidebar-menu {
  position: fixed;
  left: 0;
  top: 0;
  width: 280px;
  height: 100vh;
  background: #0050ef;
  border-right: 1px solid #e9ecef;
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  transform: translateX(0);
  transition: transform 0.3s ease;
}

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

.sidebar-header h2 {
  margin: 0;
  color: white;
  font-size: 2rem;
  font-weight: 700;
}

.close-sidebar {
  display: none;
}

.sidebar-nav {
  padding: 1rem 0;
}

.sidebar-nav .nav-link {
  display: flex;
  align-items: center;
  padding: 1rem 1.5rem;
  color: white;
  text-decoration: none;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
}

.sidebar-nav .nav-link:hover {
  background: #0050ef;
  color: white;
  border-left-color: white;
}

.sidebar-nav .nav-link.active {
  background: white;
  color: #0050ef;
  border-left-color: white;
  font-weight: 600;
}

.sidebar-nav .nav-link i {
  width: 24px;
  height: 24px;
  margin-right: 1rem;
  stroke: currentColor;
}

.sidebar-nav .nav-link span {
  font-size: 1.5rem;
  font-weight: 500;
}

/* Sidebar Overlay */
.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  display: none;
  backdrop-filter: blur(2px);
}

/* Main Content */
.content {
  margin-left: 280px;
  min-height: 100vh;
  transition: margin-left 0.3s ease;
}

/* Bottom Navigation - Mobile */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  border-top: 1px solid #e9ecef;
  display: none;
  z-index: 1000;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  padding: 0.5rem 0;
}

.bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.5rem;
  color: #666;
  text-decoration: none;
  transition: all 0.3s ease;
  border-radius: 8px;
  margin: 0 0.25rem;
}

.bottom-nav-item:hover {
  background: #f8f9fa;
  color: #0050ef;
}

.bottom-nav-item.active {
  color: #0050ef;
  background: rgba(0, 80, 239, 0.1);
}

.bottom-nav-item i {
  width: 20px;
  height: 20px;
  margin-bottom: 0.25rem;
  stroke: currentColor;
}

.bottom-nav-item span {
  font-size: 0.7rem;
  font-weight: 500;
  text-align: center;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .sidebar-menu {
    transform: translateX(-100%);
  }
  
  .sidebar-menu.mobile-open {
    transform: translateX(0);
  }
  
  .close-sidebar {
    display: block;
  }
  
  .mobile-header {
    display: flex;
  }
  
  .content {
    margin-left: 0;
    padding-bottom: 80px; /* Space for bottom nav */
  }
  
  .bottom-nav {
    display: flex;
    justify-content: space-around;
  }
  
  .sidebar-overlay.active {
    display: block;
  }
}

@media (max-width: 480px) {
  .sidebar-menu {
    width: 100%;
  }
  
  .bottom-nav-item span {
    font-size: 0.65rem;
  }
  
  .bottom-nav-item i {
    width: 18px;
    height: 18px;
  }
  .lucide {
  width: 100%;
  height: 100%;
}
}

.app-title{
  font-size: 46px;
}

/* Ensure Lucide icons are properly styled */
.lucide {
  width: 50%;
  height: 50%;
}

button {
  background-color: #2563eb;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  min-width: 50px;
}

button:hover {
  background-color: #1e40af;
}




/* Loading and Error States */
.loading-container, .error-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem;
  text-align: center;
}

/* Skeleton Loading */
.skeleton-loading {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  width: 100%;
}

.skeleton-card {
  background: white;
  border-radius: 10px;
  padding: 1rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  border: 1px solid #e9ecef;
  animation: pulse 1.5s ease-in-out infinite;
}

.skeleton-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.skeleton-word {
  width: 120px;
  height: 24px;
  background: #e9ecef;
  border-radius: 4px;
}

.skeleton-icon {
  width: 24px;
  height: 24px;
  background: #e9ecef;
  border-radius: 50%;
}

.skeleton-english {
  width: 180px;
  height: 18px;
  background: #e9ecef;
  border-radius: 4px;
  margin-bottom: 0.5rem;
}

.skeleton-tags {
  display: flex;
  gap: 0.3rem;
  margin-top: 0.5rem;
}

.skeleton-tag {
  width: 60px;
  height: 20px;
  background: #e9ecef;
  border-radius: 12px;
}

@keyframes pulse {
  0% { opacity: 1; }
  50% { opacity: 0.5; }
  100% { opacity: 1; }
}

/* Error States - FIXED HEIGHT */
.error-container {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  margin: 1rem auto;
  max-width: 500px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border: 1px solid #e9ecef;
  min-height: auto; /* Remove any fixed min-height */
  height: auto; /* Allow natural height */
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.error-icon {
  width: 64px;
  height: 64px;
  color: #ff6b6b;
  margin-bottom: 1.5rem;
  flex-shrink: 0;
}

.error-title {
  color: #333;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.3;
}

.error-message {
  color: #666;
  font-size: 1rem;
  line-height: 1.5;
  margin-bottom: 2rem;
  flex: 1;
}

.retry-button {
  background: #0050ef;
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  justify-content: center;
  flex-shrink: 0;
  width: fit-content;
  align-self: center;
}

.retry-button:hover {
  background: #0040c7;
  transform: translateY(-2px);
}

.retry-button i {
  width: 20px;
  height: 20px;
}

/* Ensure the content area handles errors properly */
.content .error-container {
  max-height: none;
  overflow: visible;
}

/* Loading container fix */
.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start; /* Changed from center */
  padding: 2rem 1rem;
  min-height: auto;
  height: auto;
}

/* For very small screens */
@media (max-width: 480px) {
  .error-container {
    margin: 0.5rem;
    padding: 1.5rem 1rem;
    max-width: none;
  }
  
  .error-title {
    font-size: 1.3rem;
  }
  
  .error-message {
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
  }
  
  .retry-button {
    width: 100%;
    max-width: 200px;
  }
}

/* Ensure the main content area doesn't restrict height */
.content {
  min-height: calc(100vh - 140px); /* Adjust based on your header/footer */
  overflow-y: auto;
}

/* Complete mobile error reset */
@media (max-width: 768px) {
  .error-container {
    all: unset;
    background: white;
    border-radius: 12px;
    padding: 1.5rem 1rem;
    margin: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
    display: block;
    text-align: center;
    height: auto;
    min-height: auto;
    max-height: none;
    box-sizing: border-box;
  }
  
  .content {
    display: block;
    height: auto;
    min-height: auto;
    padding-bottom: 80px;
  }
}