body {
  font-family: 'Segoe UI', Arial, sans-serif;
  background: #f4f4f4;
  color: #222;
  margin: 0;
  padding: 0;
  transition: background 0.3s, color 0.3s;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.header-left {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.stats {
  display: flex;
  gap: 1rem;
  font-size: 0.9rem;
  color: #666;
}

h1 {
  margin: 0;
  font-size: 2rem;
}

#controls {
  padding: 1rem 2rem;
  background: #fafafa;
  border-bottom: 1px solid #eee;
  display: flex;
  gap: 1rem;
  align-items: center;
}

#search-input,
#genre-filter {
  padding: 0.5rem 1rem;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 4px;
}

#search-input {
  flex: 1;
  max-width: 300px;
}

#genre-filter {
  width: 150px;
}

.sort-btn {
  padding: 0.5rem 1rem;
  font-size: 1rem;
  background: #444;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s;
}

.sort-btn:hover {
  background: #333;
}

main {
  padding: 2rem;
}

#movie-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.movie-card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  transition: box-shadow 0.2s, transform 0.2s;
}

.movie-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  transform: translateY(-2px);
}

.movie-title {
  font-size: 1.2rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.movie-genre {
  font-size: 1rem;
  color: #666;
  margin-bottom: 1rem;
}

.movie-rating {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.button-group {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.like-btn, .watchlist-btn {
  background: #e50914;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 0.5rem 1rem;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.2s;
}

.watchlist-btn {
  background: #444;
}

.watchlist-btn.active {
  background: #28a745;
}

.like-btn:hover {
  background: #b0060f;
}

.watchlist-btn:hover {
  background: #333;
}

.watchlist-btn.active:hover {
  background: #218838;
}

.likes-count {
  font-size: 1rem;
  color: #333;
}

.five-star {
  color: #ffd700;  /* Bright gold */
}

.four-star {
  color: #ffc800;  /* Light gold */
}

.three-star {
  color: #ffa500;  /* Orange gold */
}

.two-star {
  color: #c0c0c0;  /* Silver */
}

.one-star {
  color: #cd7f32;  /* Bronze */
}

/* Toggle Switch Styles */
.toggle-switch {
  display: flex;
  align-items: center;
  cursor: pointer;
}
.toggle-switch input {
  display: none;
}
.slider {
  width: 40px;
  height: 20px;
  background: #ccc;
  border-radius: 20px;
  position: relative;
  margin-right: 0.5rem;
  transition: background 0.3s;
}
.slider:before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 1px;
  top: 1px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.3s;
}
input:checked + .slider {
  background: #222;
}
input:checked + .slider:before {
  transform: translateX(20px);
}
.toggle-label {
  font-size: 1rem;
}

/* Dark Mode */
body.dark {
  background: #181818;
  color: #f4f4f4;
}
body.dark header {
  background: #222;
  color: #f4f4f4;
}
body.dark .stats {
  color: #aaa;
}
body.dark #controls {
  background: #222;
  border-bottom: 1px solid #333;
}
body.dark .movie-card {
  background: #232323;
  color: #f4f4f4;
}
body.dark .movie-genre {
  color: #aaa;
}
body.dark .like-btn {
  background: #444;
  color: #fff;
}
body.dark .like-btn:hover {
  background: #e50914;
}
body.dark .watchlist-btn {
  background: #333;
}
body.dark .watchlist-btn.active {
  background: #28a745;
}
body.dark .watchlist-btn:hover {
  background: #444;
}
body.dark .watchlist-btn.active:hover {
  background: #218838;
}
body.dark .slider {
  background: #444;
}
body.dark #search-input,
body.dark #genre-filter {
  background: #333;
  border-color: #444;
  color: #fff;
}
body.dark #search-input::placeholder {
  color: #888;
}
body.dark .sort-btn {
  background: #333;
}
body.dark .sort-btn:hover {
  background: #444;
}

.quote-section {
  background: #f8f9fa;
  padding: 1rem;
  margin: 1rem 0;
  border-radius: 4px;
  border-left: 3px solid #e50914;
}

.quote {
  font-style: italic;
  margin: 0 0 0.5rem 0;
  color: #555;
}

.quote-author {
  font-size: 0.9rem;
  color: #777;
  margin: 0 0 0.5rem 0;
}

.new-quote-btn {
  background: transparent;
  border: 1px solid #ccc;
  color: #666;
  padding: 0.3rem 0.8rem;
  font-size: 0.8rem;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.2s;
}

.new-quote-btn:hover {
  background: #f0f0f0;
  border-color: #999;
}

/* Dark mode styles for quotes */
body.dark .quote-section {
  background: #2a2a2a;
  border-left-color: #e50914;
}

body.dark .quote {
  color: #ddd;
}

body.dark .quote-author {
  color: #aaa;
}

body.dark .new-quote-btn {
  border-color: #444;
  color: #aaa;
}

body.dark .new-quote-btn:hover {
  background: #333;
  border-color: #666;
}

.navbar {
  background: #23272f;
  color: #fff;
  padding: 0.5rem 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
  position: sticky;
  top: 0;
  z-index: 100;
  font-family: 'Segoe UI', Arial, sans-serif;
}

.navbar-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
}

.navbar-brand {
  font-size: 1.5rem;
  font-weight: bold;
  color: #ffb400;
  text-decoration: none;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
}

.navbar-links {
  list-style: none;
  display: flex;
  gap: 2rem;
  margin: 0;
  padding: 0;
  position: relative;
}

.navbar-links li {
  position: relative;
}

.navbar-links li a {
  color: #fff;
  text-decoration: none;
  font-size: 1rem;
  transition: color 0.2s, background 0.2s;
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
  display: block;
}

.navbar-links li a:hover,
.navbar-links li a:focus {
  background: #ffb400;
  color: #23272f;
  outline: none;
}

.genres-dropdown-menu {
  display: none;
  position: absolute;
  top: 2.2rem;
  left: 0;
  background: #23272f;
  padding: 0.5rem 0;
  margin: 0;
  list-style: none;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  min-width: 120px;
}

.nav-genres-dropdown:hover .genres-dropdown-menu,
.nav-genres-dropdown:focus-within .genres-dropdown-menu {
  display: block;
}

.genres-dropdown-menu li a {
  color: #fff;
  padding: 0.4rem 1.2rem;
  text-decoration: none;
  font-size: 1rem;
  display: block;
  border-radius: 0;
}

.genres-dropdown-menu li a:hover,
.genres-dropdown-menu li a:focus {
  background: #ffb400;
  color: #23272f;
  outline: none;
}

.footer {
  background: #23272f;
  color: #fff;
  padding: 1.2rem 0 1rem 0;
  font-size: 1rem;
  box-shadow: 0 -2px 8px rgba(0,0,0,0.07);
  margin-top: 2rem;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 2rem;
}

.footer-left {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.footer-logo {
  font-weight: bold;
  color: #ffb400;
  font-size: 1.2rem;
  letter-spacing: 1px;
}

.footer-copy {
  font-size: 0.95rem;
  color: #bbb;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  color: #ffb400;
  text-decoration: none;
  font-size: 1rem;
  transition: color 0.2s;
}

.footer-links a:hover,
.footer-links a:focus {
  color: #fff;
  text-decoration: underline;
  outline: none;
}

.footer-right {
  font-size: 0.98rem;
  color: #bbb;
}

/* Responsive adjustments */
@media (max-width: 700px) {
  .navbar-container,
  .footer-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.7rem;
    padding: 0 1rem;
  }
  .navbar-links,
  .footer-links {
    gap: 1rem;
  }
}