* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: url('https://images.unsplash.com/photo-1504674900247-0877df9cc836?auto=format&fit=crop&w=1200&q=80') 
              no-repeat center center fixed;
  background-size: cover;
  color: #ecf0f1;
  overflow-x: hidden;
  position: relative;
  animation: backgroundFadeIn 2s ease-in-out;
  transition: all 0.3s ease;
}

@keyframes backgroundFadeIn {
  from { opacity: 0; transform: scale(1.1); }
  to { opacity: 1; transform: scale(1); }
}

body::before {
  content: '';
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: -1;
  backdrop-filter: blur(6px);
  animation: overlayFade 3s ease-in-out;
}

@keyframes overlayFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

header {
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0,204,188,0.3);
  padding: 15px 20px;
  text-align: center;
  position: sticky;
  top: 0;
  z-index: 100;
  transition: all 0.3s ease;
  box-shadow: 0 0 25px rgba(0,204,188,0.3);
}

header:hover {
  box-shadow: 0 0 35px rgba(0,204,188,0.4);
}

.header-content {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  margin-bottom: 10px;
}

.logo {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  filter: drop-shadow(0 0 8px rgba(0,204,188,0.6));
  transition: transform 0.3s ease;
}

.logo:hover {
  transform: scale(1.1) rotate(5deg);
}

.theme-toggle {
  position: absolute;
  right: 20px;
  width: 70px;
  height: 32px;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid #00ccbc;
  border-radius: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 3px;
  transition: all 0.3s ease;
}

.theme-toggle:hover {
  background: rgba(0, 204, 188, 0.2);
  box-shadow: 0 0 15px rgba(0, 204, 188, 0.4);
}

.toggle-slider {
  width: 24px;
  height: 24px;
  background: #00ccbc;
  border-radius: 50%;
  transition: transform 0.3s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

body.light-mode .toggle-slider {
  transform: translateX(38px);
}

.toggle-text {
  position: absolute;
  right: 8px;
  font-size: 0.7em;
  color: #00ccbc;
  font-weight: 600;
  pointer-events: none;
}

body.light-mode .toggle-text {
  left: 8px;
  right: auto;
}

.navbar {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.navbar a {
  color: #ecf0f1;
  text-decoration: none;
  font-weight: 500;
  position: relative;
  transition: all 0.3s ease;
}

.navbar a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -5px;
  left: 50%;
  background-color: #00ccbc;
  transform: translateX(-50%);
  transition: width 0.3s ease;
}

.navbar a:hover,
.navbar a.active {
  color: #00ccbc;
  text-shadow: 0 0 8px #00ccbc;
}

.navbar a:hover::after,
.navbar a.active::after {
  width: 100%;
}


.hero {
  text-align: center;
  padding: 100px 20px;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(8px);
  animation: heroSlideIn 1.5s ease-out;
}

@keyframes heroSlideIn {
  from { opacity: 0; transform: translateY(50px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero h1 {
  color: #00ccbc;
  font-size: 48px;
  background: rgba(0,0,0,0.6);
  display: inline-block;
  padding: 15px 30px;
  border-radius: 15px;
  text-shadow: 0 0 12px rgba(0,204,188,0.5);
  animation: fadeInUp 1s ease-out 0.5s both;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero input {
  margin-top: 30px;
  padding: 15px 20px;
  width: 350px;
  border-radius: 25px;
  border: none;
  outline: none;
  background: rgba(255,255,255,0.9);
  color: #333;
  font-size: 18px;
  transition: all 0.3s ease;
  box-shadow: 0 0 10px rgba(0,204,188,0.3);
}

.hero input:focus {
  background: white;
  box-shadow: 0 0 25px rgba(0,204,188,0.5);
  transform: scale(1.03);
  border: 2px solid #00ccbc;
}

.container {
  display: flex;
  flex-wrap: wrap;
  max-width: 1200px;
  margin: 30px auto;
  padding: 20px;
  gap: 20px;
}

.sidebar {
  width: 25%;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(10px);
  border-radius: 15px;
  padding: 25px;
  box-shadow: 0 0 20px rgba(0,204,188,0.2);
  transition: all 0.3s ease;
}

.sidebar h3 {
  color: #00ccbc;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 1rem;
  padding-bottom: 0.3rem;
}

.sidebar li {
  list-style: none;
  margin-bottom: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(0,204,188,0.1);
  cursor: pointer;
  transition: all 0.3s ease;
}

.sidebar li:hover,
.sidebar li.active-category {
  background: rgba(0,204,188,0.3);
  transform: translateX(6px);
  color: #00ccbc;
}

.content {
  flex: 1;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(10px);
  border-radius: 15px;
  padding: 25px;
  box-shadow: 0 0 25px rgba(0,204,188,0.15);
}

.filter-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  border-bottom: 2px solid #00ccbc;
  padding-bottom: 10px;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-bar button {
  background: linear-gradient(135deg, #00ccbc, #009688);
  color: white;
  border: none;
  padding: 10px 15px;
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 0 12px rgba(0,204,188,0.4);
}

.filter-bar button:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 25px rgba(0,204,188,0.6);
}

.filter-bar button.active {
  background: linear-gradient(135deg, #ff6b6b, #ee5a6f);
}

#restaurantContainer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
}

.restaurant {
  width: 220px;
  border-radius: 15px;
  overflow: hidden;
  text-align: center;
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(8px);
  transition: all 0.3s ease;
  box-shadow: 0 0 15px rgba(0,204,188,0.15);
}

.restaurant.hidden {
  display: none;
}

.restaurant:hover {
  transform: translateY(-8px) scale(1.03);
  box-shadow: 0 0 25px rgba(0,204,188,0.4);
}

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

.restaurant:hover img {
  transform: scale(1.1);
}

.restaurant h4 {
  margin: 10px 0 5px;
  color: #00ccbc;
}

.restaurant p {
  font-size: 14px;
  color: #ddd;
  margin: 5px 0;
}

#loadMore {
  background: linear-gradient(135deg, #00ccbc, #009688);
  border: none;
  color: #fff;
  padding: 12px 25px;
  border-radius: 30px;
  display: block;
  margin: 40px auto;
  cursor: pointer;
  font-weight: 600;
  box-shadow: 0 0 15px rgba(0,204,188,0.3);
  transition: all 0.3s ease;
}

#loadMore:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 25px rgba(0,204,188,0.6);
}

#loadMore.hidden {
  display: none;
}

footer {
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(12px);
  color: white;
  text-align: center;
  padding: 20px;
  margin-top: 50px;
  border-top: 1px solid rgba(0,204,188,0.3);
  box-shadow: 0 0 25px rgba(0,204,188,0.3);
}

footer a {
  color: #00ccbc;
  text-decoration: none;
  transition: color 0.3s ease;
}

footer a:hover {
  color: white;
  text-shadow: 0 0 8px #00ccbc;
}

/* === LIGHT MODE STYLES === */
body.light-mode {
  background: linear-gradient(135deg, #f5f5f5, #ffffff);
  color: #333;
}

body.light-mode::before {
  background: rgba(255, 255, 255, 0.8);
}

body.light-mode header {
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

body.light-mode .navbar a {
  color: #555;
}

body.light-mode .navbar a:hover,
body.light-mode .navbar a.active {
  color: #00b2a5;
}

body.light-mode .navbar a::after {
  background-color: #00b2a5;
}

body.light-mode .hero {
  background: rgba(255, 255, 255, 0.8);
}

body.light-mode .hero h1 {
  color: #00b2a5;
  background: rgba(255, 255, 255, 0.9);
  text-shadow: 0 0 12px rgba(0, 178, 165, 0.3);
}

body.light-mode .sidebar {
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

body.light-mode .sidebar h3 {
  color: #00b2a5;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

body.light-mode .sidebar li {
  background: rgba(0, 178, 165, 0.1);
  color: #333;
}

body.light-mode .sidebar li:hover,
body.light-mode .sidebar li.active-category {
  background: rgba(0, 178, 165, 0.3);
  color: #00b2a5;
}

body.light-mode .content {
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 25px rgba(0, 0, 0, 0.1);
}

body.light-mode .filter-bar {
  border-bottom: 2px solid #00b2a5;
}

body.light-mode .filter-bar h3 {
  color: #333;
}

body.light-mode .restaurant {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
}

body.light-mode .restaurant h4 {
  color: #00b2a5;
}

body.light-mode .restaurant p {
  color: #555;
}

body.light-mode footer {
  background: rgba(255, 255, 255, 0.95);
  color: #555;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

body.light-mode footer a {
  color: #00b2a5;
}

body.light-mode .theme-toggle {
  background: rgba(0, 0, 0, 0.1);
  border: 2px solid #00b2a5;
}

body.light-mode .toggle-slider {
  background: #00b2a5;
}

body.light-mode .toggle-text {
  color: #00b2a5;
}

/* === ANIMATIONS === */
.restaurant:nth-child(odd) { 
  animation: slideInLeft 0.8s ease-out; 
}

.restaurant:nth-child(even) { 
  animation: slideInRight 0.8s ease-out; 
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-50px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(50px); }
  to { opacity: 1; transform: translateX(0); }
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .container { 
    flex-direction: column; 
    align-items: center; 
  }
  
  .sidebar { 
    width: 85%; 
    margin-bottom: 20px; 
  }
  
  .restaurant { 
    width: 80%; 
  }
  
  .hero h1 { 
    font-size: 36px; 
  }
  
  .hero input { 
    width: 80%; 
  }

  .theme-toggle {
    right: 10px;
    width: 65px;
    height: 30px;
  }

  .toggle-slider {
    width: 22px;
    height: 22px;
  }

  body.light-mode .toggle-slider {
    transform: translateX(35px);
  }
}

@media (max-width: 480px) {
  .restaurant { 
    width: 90%; 
  }
  
  .navbar { 
    flex-wrap: wrap; 
    gap: 10px; 
  }

  .logo {
    width: 60px;
    height: 60px;
  }

  .theme-toggle {
    right: 5px;
    width: 60px;
    height: 28px;
  }

  .toggle-slider {
    width: 20px;
    height: 20px;
  }

  body.light-mode .toggle-slider {
    transform: translateX(32px);
  }

  .toggle-text {
    font-size: 0.65em;
  }
}