body {
  margin: 0;
  font-family: sans-serif;
  background: #fafafa;
}


Back Button
.back-button {
  position: fixed;
  top: 20px;
  left: 20px;
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  color: #333;
  background: rgba(255, 255, 255, 0.8);
  padding: 8px 14px;
  border-radius: 6px;
  /* box-shadow: 0 2px 5px rgba(0,0,0,0.05); */
  transition: all 0.2s ease;
  z-index: 1001;
}

.back-button:hover {
  background: #e0e0e0;
}

/* Grid */
.grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
  padding: 80px 16px 16px 16px; /* Top padding increased to clear back button */
}

.grid-item {
  width: 100%;
  height: auto;
  object-fit: cover;
  cursor: pointer;
  border-radius: 8px;
  transition: transform 0.2s;
}

.grid-item:hover {
  transform: scale(1.03);
}

/* Modal styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  padding: 40px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.85);
}

.modal-content {
  display: block;
  margin: auto;
  max-width: 90%;
  max-height: 90%;
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

.close {
  position: absolute;
  top: 20px;
  right: 35px;
  color: white;
  font-size: 32px;
  font-weight: bold;
  cursor: pointer;
}

:root {
  --bg: #fafafa;
  --text: #111;
  --card: #fff;
}

body {
  background-color: var(--bg);
  color: var(--text);
  transition: background 0.3s, color 0.3s;
}

.dark-mode {
  --bg: #121212;
  --text: #eee;
  --card: #1e1e1e;
}

.grid-container,
.back-button,
.dark-toggle {
  transition: background 0.3s, color 0.3s;
}

/* Dark toggle button */
.dark-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  font-size: 18px;
  background: rgba(255, 255, 255, 0.8);
  border: none;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  z-index: 1001;
}

.dark-toggle:hover {
  background: #e0e0e0;
}

.dark-mode .dark-toggle {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.dark-mode .dark-toggle:hover {
  background: rgba(255, 255, 255, 0.2);
}

.dark-mode .back-button {
  background: rgba(255, 255, 255, 0.1);
  color: #eee;
}

.dark-mode .grid-item {
  border: 1px solid #333;
}
