/* Cosmic gradient background */
body {
  margin: 0;
  font-family: "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #1a1f33, #0d0f1a 60%);
  color: #e6e6f0;
}

/* Header */
header {
  text-align: center;
  padding: 40px 20px 10px;
}

header h1 {
  font-size: 2.8rem;
  margin: 0;
  color: #dfe3ff;
}

.subtitle {
  margin-top: 8px;
  font-size: 1.2rem;
  color: #b8bce0;
}

/* Filter bar */
#filter-bar {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 20px;
  flex-wrap: wrap;
}

#filter-bar button {
  background: #2a2f4d;
  border: none;
  padding: 10px 18px;
  border-radius: 6px;
  color: #e6e6f0;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.2s;
}

#filter-bar button:hover {
  background: #3a3f63;
}

#filter-bar .active {
  background: #5560a4;
}

/* Gallery grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
  padding: 20px;
  max-width: 1200px;
  margin: auto;
}

.card {
  background: #1f2338;
  border-radius: 10px;
  padding: 10px;
  text-align: center;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.4);
}

.card img {
  width: 100%;
  border-radius: 8px;
}

.card-title {
  margin-top: 10px;
  font-size: 1rem;
  color: #dfe3ff;
}

/* Footer */
footer {
  max-width: 900px;
  margin: 60px auto;
  padding: 20px;
  color: #c8cbe6;
  line-height: 1.6;
}

footer h2 {
  color: #e6e6f0;
  margin-top: 40px;
}

/* Modal overlay */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 12, 20, 0.85);
  display: none;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
}

/* Modal content */
.modal-content {
  background: #1f2338;
  padding: 20px;
  border-radius: 12px;
  max-width: 700px;
  width: 100%;
  color: #e6e6f0;
  position: relative;
  box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 2rem;
  cursor: pointer;
  color: #dfe3ff;
}

.modal-image img {
  width: 100%;
  border-radius: 10px;
}

.modal-title {
  margin-top: 20px;
  font-size: 1.6rem;
  color: #dfe3ff;
}

.modal-section-title {
  margin-top: 20px;
  font-size: 1.2rem;
  color: #b8bce0;
}

.modal-text {
  margin-top: 10px;
  line-height: 1.6;
  color: #c8cbe6;
}
