:root {
  --primary-color: #ff6600;
  --secondary-color: #2c3e50;
  --background-color: #f5f7fa;
  --card-bg: #ffffff;
  --text-color: #333333;
  --text-secondary: #7f8c8d;
  --border-color: #e1e4e8;
  --shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  --hover-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.dark-theme {
  --primary-color: #4a9de3;
  --secondary-color: #ecf0f1;
  --background-color: #1a1a2e;
  --card-bg: #16213e;
  --text-color: #e6e6e6;
  --text-secondary: #b0b0b0;
  --border-color: #2d3748;
  --shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  --hover-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
  color: var(--secondary-color);
}

.subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 600px;
}

.theme-switcher {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.theme-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 30px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.4s;
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 22px;
  width: 22px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--primary-color);
}

input:checked + .slider:before {
  transform: translateX(30px);
}

/* Tabs */
.tabs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 30px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 10px;
}

.tab {
    padding: 6px 15px;
    margin: 0 5px 10px;
    background: none;
    border: none;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-secondary);
}

.tab:hover {
  background-color: rgba(52, 152, 219, 0.1);
  color: var(--primary-color);
}

.tab.active {
  background-color: var(--primary-color);
  color: white;
}

/* Gallery grid */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 20px;
}

.gallery-item {
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeIn 0.5s ease forwards;
  background-color: var(--card-bg);
}

.gallery-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--hover-shadow);
}

.gallery-item img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.item-info {
  padding: 15px;
  background-color: var(--card-bg);
}

.item-info h3 {
  font-size: 1.1rem;
  letter-spacing: -1px;
  margin-bottom: 5px;
  color: var(--secondary-color);
}

.item-info p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Fade-in animation */
@keyframes fadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* No results text */
.no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px;
  color: var(--text-secondary);
}

footer {
  text-align: center;
  margin-top: 50px;
  padding: 20px;
  color: var(--text-secondary);
  border-top: 1px solid var(--border-color);
}

/* Responsive */
@media (max-width: 768px) {
  .gallery-item img {
      height: 250px !important;
    }
  .gallery {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  }
  header {
    flex-direction: column;
    align-items: flex-start;
  }
  .theme-switcher {
    align-self: flex-end;
    margin-top: 0;
  }
}

@media (max-width: 480px) {
  .gallery-item img {
      height: 250px !important;
    }
    
  .gallery {
    grid-template-columns: 1fr;
  }
  .tab {
    padding: 10px 16px;
    font-size: 0.9rem;
  }
  h1 {
    font-size: 2rem;
  }
}