* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Roboto", sans-serif;
  background-color: #121212;
  color: #ffffff;
  transition: background-color 0.3s, color 0.3s;
}

body.light-mode {
  background-color: #f9fafb;
  color: #1f2937;
}

.navbar {
  width: 100%;
  height: 64px;
  background-color: #1a1a1a;
  position: sticky;
  top: 0;
  z-index: 20;
  transition: background-color 0.3s, box-shadow 0.3s;
}

body.light-mode .navbar {
  background-color: #ffffff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  height: 100%;
  max-width: 1400px;
  margin: 0 auto;
}

.logo-container {
  flex: 0 0 auto;
}

.logo {
  font-size: 28px;
  color: #4dbf00;
  font-family: "Sigmar One", sans-serif;
  text-decoration: none;
  transition: color 0.3s;
}

body.light-mode .logo {
  color: #2e7d32;
}

.logo:hover {
  color: #66ff00;
}

body.light-mode .logo:hover {
  color: #388e3c;
}

.menu-container {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
  justify-content: center;
}

.menu-list {
  display: flex;
  list-style: none;
  gap: 12px;
}

.menu-list-item {
  cursor: pointer;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.menu-list-item:hover,
.menu-list-item.active {
  background-color: #4dbf00;
  color: #121212;
  font-weight: 700;
}

body.light-mode .menu-list-item:hover,
body.light-mode .menu-list-item.active {
  background-color: #2e7d32;
  color: #ffffff;
}

.search-form {
  display: flex;
  align-items: center;
  background-color: #2a2a2a;
  border-radius: 20px;
  padding: 6px 12px;
  max-width: 240px;
  transition: background-color 0.3s;
}

body.light-mode .search-form {
  background-color: #e5e7eb;
}

#search {
  background: transparent;
  border: none;
  outline: none;
  color: #ffffff;
  padding: 6px;
  flex: 1;
  font-size: 14px;
}

body.light-mode #search {
  color: #1f2937;
}

#search::placeholder {
  color: #9ca3af;
}

body.light-mode #search::placeholder {
  color: #6b7280;
}

.search-btn {
  background: none;
  border: none;
  color: #4dbf00;
  cursor: pointer;
  padding: 6px;
  font-size: 16px;
  transition: color 0.3s;
}

body.light-mode .search-btn {
  color: #2e7d32;
}

.search-btn:hover {
  color: #66ff00;
}

body.light-mode .search-btn:hover {
  color: #388e3c;
}

.profile-container {
  display: flex;
  align-items: center;
  gap: 12px;
}

.profile-picture {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #4dbf00;
  transition: border-color 0.3s;
}

body.light-mode .profile-picture {
  border-color: #2e7d32;
}

.profile-text-container {
  display: flex;
  align-items: center;
  gap: 6px;
}

.profile-text {
  font-size: 14px;
  font-weight: 500;
}

.toggle {
  width: 44px;
  height: 24px;
  background-color: #ffffff;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  padding: 0 4px;
  cursor: pointer;
  transition: background-color 0.3s;
}

body.light-mode .toggle {
  background-color: #1f2937;
}

.toggle-icon {
  font-size: 14px;
  color: #f59e0b;
}

.toggle-ball {
  width: 20px;
  height: 20px;
  background-color: #1a1a1a;
  position: absolute;
  right: 2px;
  border-radius: 50%;
  transition: transform 0.3s ease, background-color 0.3s;
}

body.light-mode .toggle-ball {
  transform: translateX(-20px);
  background-color: #ffffff;
}

.mobile-menu-toggle {
  display: none;
  font-size: 24px;
  cursor: pointer;
  color: #ffffff;
  transition: color 0.3s;
}

body.light-mode .mobile-menu-toggle {
  color: #1f2937;
}

.mobile-menu-toggle:hover {
  color: #4dbf00;
}

body.light-mode .mobile-menu-toggle:hover {
  color: #2e7d32;
}

.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 80%;
  max-width: 300px;
  height: 100vh;
  background-color: #1a1a1a;
  z-index: 30;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  padding: 16px;
}

body.light-mode .mobile-menu {
  background-color: #ffffff;
  box-shadow: 2px 0 4px rgba(0, 0, 0, 0.1);
}

.mobile-menu.active {
  transform: translateX(0);
}

.mobile-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.mobile-menu-close {
  font-size: 24px;
  color: #ffffff;
  cursor: pointer;
  transition: color 0.3s;
}

body.light-mode .mobile-menu-close {
  color: #1f2937;
}

.mobile-menu-close:hover {
  color: #4dbf00;
}

body.light-mode .mobile-menu-close:hover {
  color: #2e7d32;
}

.mobile-menu-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mobile-menu-item {
  padding: 12px 16px;
  font-size: 16px;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.mobile-menu-item:hover,
.mobile-menu-item.active {
  background-color: #4dbf00;
  color: #121212;
  font-weight: 700;
}

body.light-mode .mobile-menu-item:hover,
body.light-mode .mobile-menu-item.active {
  background-color: #2e7d32;
  color: #ffffff;
}

.mobile-search-form {
  display: flex;
  width: 100%;
  padding: 8px 12px;
  background-color: #2a2a2a;
  border-radius: 20px;
  margin-bottom: 16px;
  transition: background-color 0.3s;
}

body.light-mode .mobile-search-form {
  background-color: #e5e7eb;
}

#mobile-search {
  background: transparent;
  border: none;
  outline: none;
  color: #ffffff;
  padding: 6px;
  flex: 1;
  font-size: 14px;
}

body.light-mode #mobile-search {
  color: #1f2937;
}

#mobile-search::placeholder {
  color: #9ca3af;
}

body.light-mode #mobile-search::placeholder {
  color: #6b7280;
}

.mobile-search-btn {
  background: none;
  border: none;
  color: #4dbf00;
  cursor: pointer;
  padding: 6px;
  font-size: 16px;
  transition: color 0.3s;
}

body.light-mode .mobile-search-btn {
  color: #2e7d32;
}

.mobile-search-btn:hover {
  color: #66ff00;
}

body.light-mode .mobile-search-btn:hover {
  color: #388e3c;
}

.sidebar {
  width: 64px;
  height: 100vh;
  background-color: #1a1a1a;
  position: fixed;
  top: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 80px;
  z-index: 10;
  transition: background-color 0.3s;
}

body.light-mode .sidebar {
  background-color: #ffffff;
  box-shadow: 2px 0 4px rgba(0, 0, 0, 0.1);
}

.left-menu-icon {
  color: #ffffff;
  font-size: 24px;
  margin-bottom: 24px;
  cursor: pointer;
  position: relative;
  transition: color 0.3s;
}

body.light-mode .left-menu-icon {
  color: #1f2937;
}

.left-menu-icon:hover {
  color: #4dbf00;
}

body.light-mode .left-menu-icon:hover {
  color: #2e7d32;
}

.left-menu-icon[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 70px;
  top: 50%;
  transform: translateY(-50%);
  background-color: #333;
  color: #ffffff;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

body.light-mode .left-menu-icon[data-tooltip]::after {
  background-color: #e5e7eb;
  color: #1f2937;
}

.left-menu-icon:hover[data-tooltip]::after {
  opacity: 1;
  visibility: visible;
}

.main-content {
  padding: 24px 80px 24px 96px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 24px;
  max-width: 1400px;
  margin: 0 auto;
  transition: padding 0.3s ease;
}

.movie {
  background-color: #1e1e1e;
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s;
  position: relative;
}

body.light-mode .movie {
  background-color: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.movie:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.movie img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  transition: opacity 0.3s ease;
}

.movie:hover img {
  opacity: 0.8;
}

.movie-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  font-size: 14px;
}

.movie-info h3 {
  font-size: 16px;
  font-weight: 600;
}

.movie-info span {
  padding: 6px 12px;
  border-radius: 8px;
  font-weight: bold;
}

.movie-info span.green {
  background-color: #00c853;
}

.movie-info span.orange {
  background-color: #ff9800;
}

.movie-info span.red {
  background-color: #d32f2f;
}

.movie-info span.gray {
  background-color: #6b7280;
}

.overview {
  font-size: 13px;
  padding: 16px;
  background-color: #121212;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  max-height: 100%;
  transform: translateY(100%);
  transition: transform 0.4s ease, background-color 0.3s;
}

body.light-mode .overview {
  background-color: #f1f5f9;
}

.movie:hover .overview {
  transform: translateY(0);
}

.know-more {
  margin-top: 12px;
  background-color: #4dbf00;
  color: #121212;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: background-color 0.3s ease;
}

body.light-mode .know-more {
  background-color: #2e7d32;
  color: #ffffff;
}

.know-more:hover {
  background-color: #3aa700;
}

body.light-mode .know-more:hover {
  background-color: #388e3c;
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin: 32px 0;
  font-size: 16px;
}

.page,
.current {
  padding: 10px 20px;
  border-radius: 9999px;
  background-color: #333;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s, color 0.3s;
}

body.light-mode .page,
body.light-mode .current {
  background-color: #e5e7eb;
  color: #1f2937;
}

.page:hover {
  background-color: #4dbf00;
  color: #121212;
}

body.light-mode .page:hover {
  background-color: #2e7d32;
  color: #ffffff;
}

.page.disabled {
  background-color: #555;
  color: #aaaaaa;
  cursor: not-allowed;
}

body.light-mode .page.disabled {
  background-color: #d1d5db;
  color: #6b7280;
}

.overlay {
  height: 100%;
  width: 0;
  position: fixed;
  z-index: 30;
  top: 0;
  left: 0;
  background-color: rgba(0, 0, 0, 0.9);
  overflow-x: hidden;
  transition: width 0.5s ease;
}

.overlay-content {
  position: relative;
  top: 10%;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
  padding: 0 20px;
}

.closebtn {
  position: absolute;
  top: 20px;
  right: 45px;
  font-size: 60px;
  color: #ffffff;
  text-decoration: none;
  transition: color 0.3s;
}

.closebtn:hover {
  color: #4dbf00;
}

#arrows {
  display: flex;
  justify-content: space-between;
  position: absolute;
  top: 50%;
  width: 100%;
  max-width: 800px;
  padding: 0 20px;
  transform: translateY(-50%);
}

#left-arrow,
#right-arrow {
  font-size: 36px;
  color: #ffffff;
  cursor: pointer;
  transition: color 0.3s;
}

#left-arrow:hover,
#right-arrow:hover {
  color: #4dbf00;
}

.embed {
  display: none;
}

.embed.show {
  display: block;
}

.dots {
  margin-top: 20px;
}

.dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  background-color: #555;
  border-radius: 50%;
  margin: 0 5px;
  cursor: pointer;
}

.dot.active {
  background-color: #4dbf00;
}

.loader {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border: 8px solid #4dbf00;
  border-top: 8px solid #121212;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  animation: spin 1s linear infinite;
}

body.light-mode .loader {
  border: 8px solid #2e7d32;
  border-top: 8px solid #f9fafb;
}

@keyframes spin {
  0% { transform: translate(-50%, -50%) rotate(0deg); }
  100% { transform: translate(-50%, -fek50%) rotate(360deg); }
}

@media (max-width: 768px) {
  .navbar-container {
    padding: 0 12px;
  }

  .menu-container {
    display: none;
  }

  .mobile-menu-toggle {
    display: block;
  }

  .sidebar {
    display: none;
  }

  .main-content {
    padding: 16px;
  }

  .profile-text-container {
    display: none;
  }
}

@media (max-width: 480px) {
  .main-content {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
  }

  .movie img {
    height: 240px;
  }

  .movie-info {
    padding: 8px 12px;
  }

  .overview {
    font-size: 12px;
    padding: 12px;
  }

  .know-more {
    padding: 6px 12px;
    font-size: 14px;
  }
}