body {
  padding-bottom: 160px;
  font-family: 'Inter', sans-serif;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes ripple {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* Sticky Footer */
.sticky-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 10;
  pointer-events: auto;
}

/* Navbar */
nav {
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

/* Spinner */
.spinner {
  border: 4px solid rgba(255, 255, 255, 0.1);
  animation: spin 1s linear infinite;
}

/* News Card Styles */
.news-card {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.85));
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(229, 231, 235, 0.5);
  position: relative;
  z-index: 0;
}

.news-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
}

.news-card img {
  object-fit: cover;
  height: 200px;
  width: 100%;
  transition: transform 0.4s ease;
}

.news-card:hover img {
  transform: scale(1.05);
}

.news-card-content {
  padding: 1.25rem;
  position: relative;
  z-index: 1;
}

.news-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 50%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.3), transparent);
  z-index: 0;
}

/* Category Button Styles */
.category-btn {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.category-btn.active {
  background: linear-gradient(to right, #3b82f6, #8b5cf6);
  color: white;
}

.category-btn:hover::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.2);
  top: 0;
  left: 0;
  animation: ripple 0.6s ease-out;
}

/* Modal Styles */
#news-modal {
  transition: opacity 0.3s ease, transform 0.3s ease;
  transform: scale(0.95);
  z-index: 50;
}

#news-modal:not(.hidden) {
  transform: scale(1);
}

#news-modal img {
  max-height: 300px;
  object-fit: cover;
  width: 100%;
  border-radius: 8px;
}

/* Responsive Adjustments */
@media (max-width: 640px) {
  body {
    padding-bottom: 180px;
  }
  .news-card img {
    height: 160px;
  }
  .news-card-content {
    padding: 1rem;
  }
  .news-card-content h3 {
    font-size: 1rem;
  }
  .news-card-content p {
    font-size: 0.875rem;
  }
  .read-more {
    font-size: 0.875rem;
  }
  #news-modal {
    padding: 0.75rem;
  }
  #modal-content h2 {
    font-size: 1.5rem;
  }
  #modal-content p {
    font-size: 0.875rem;
  }
}

@media (min-width: 640px) {
  .news-card img {
    height: 220px;
  }
  .news-card-content {
    padding: 1.5rem;
  }
  #news-modal img {
    max-height: 350px;
  }
}

@media (min-width: 1024px) {
  .news-card img {
    height: 240px;
  }
  .news-card-content {
    padding: 1.75rem;
  }
  #news-modal img {
    max-height: 400px;
  }
}

/* Dark Mode */
.dark nav {
    background: #000000;
    box-shadow: 0 1px 15px #334155;
}

.dark body {
    background: #000000;
}

.dark footer {
    background: #000000;
}

.dark .news-card {
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.95), rgba(30, 41, 59, 0.85));
  border-color: rgba(71, 85, 105, 0.5);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
}

.dark .category-btn {
  background: #334155;
  color: #e2e8f0;
}

.dark .category-btn:hover {
  background: #334155;
}

.dark .news-card-content h3 {
  color: #f1f5f9;
}

.dark .news-card-content p {
  color: #d1d5db;
}

.dark .read-more {
  color: #60a5fa;
}

.dark .read-more:hover {
  color: #93c5fd;
}

.dark #modal-content h2 {
  color: #f1f5f9;
}

.dark #modal-content p {
  color: #d1d5db;
}

.dark #modal-content a {
  color: #60a5fa;
}

.dark #modal-content a:hover {
  color: #93c5fd;
}

.dark input {
  background: #1e293b;
  border-color: #475569;
  color: #e2e8f0;
}

.dark input::placeholder {
  color: #94a3b8;
}

.dark button[type="submit"] {
  background: #3b82f6;
}

.dark button[type="submit"]:hover {
  background: #60a5fa;
}

.dark .spinner {
  border: 4px solid rgba(255, 255, 255, 0.1);
  border-top-color: #60a5fa;
}

/* Mobile Menu Fix */
#nav-menu {
  transition: max-height 0.3s ease-in-out, opacity 0.3s ease-in-out;
}

@media (max-width: 640px) {
  #nav-menu {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 1rem 0;
  }

  #nav-menu.active {
    max-height: 500px;
    opacity: 1;
  }

  #theme-toggle {
    margin-top: 0px;
  }
}

/* Accessibility */
button:focus, a:focus {
  outline: none;
  box-shadow: 0 0 0 2px #3b82f6;
}

/* Smooth Scroll Behavior */
html {
  scroll-behavior: smooth;
}