* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', sans-serif;
  background: #0f172a;
  color: #fff;
  padding: 20px;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid #1e293b;
  padding-bottom: 10px;
}

.logo span {
  font-size: 24px;
  font-weight: bold;
  color: #facc15;
}
.logo p {
  font-size: 12px;
  color: #94a3b8;
}

.header-text {
  font-size: 16px;
  color: #e0f2fe;
}

.category-tabs {
  display: flex;
  gap: 10px;
  margin: 20px 0;
  flex-wrap: wrap;
}

.tab {
  background: #334155;
  border: none;
  padding: 10px 15px;
  border-radius: 6px;
  color: #fff;
  cursor: pointer;
  transition: all 0.3s ease;
}

.tab.active {
  background: #facc15;
  color: #0f172a;
}

.tab span {
  font-size: 10px;
  color: #cbd5e1;
}

.search-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

#searchInput {
  flex: 1;
  padding: 10px;
  border-radius: 6px;
  border: none;
  background: #1e293b;
  color: #fff;
}

#filterBtn {
  background: #475569;
  color: #fff;
  border: none;
  padding: 10px 15px;
  border-radius: 6px;
}

main h2 {
  margin-bottom: 5px;
  color: #facc15;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.card {
  background: #1e293b;
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.3s;
}

.card:hover {
  transform: translateY(-5px);
}

.card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  cursor: pointer;
}

.card-info {
  padding: 10px;
}

.card-info h4 {
  font-size: 14px;
  font-weight: bold;
}

.card-info p {
  font-size: 12px;
  color: #cbd5e1;
}

.card-info .year {
  margin-top: 5px;
  background: #facc15;
  color: #0f172a;
  padding: 2px 6px;
  font-size: 11px;
  border-radius: 4px;
  display: inline-block;
}

.placeholder {
  background: #334155;
  height: 300px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  font-size: 14px;
}

.modal {
  display: none;
  position: fixed;
  z-index: 999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  justify-content: center;
  align-items: center;
  overflow: auto; /* allow scrolling if content is large */
  padding: 20px;
}

.modal-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
  overflow: hidden;
  background: #1e293b;
  padding: 20px;
  border-radius: 10px;
  text-align: center;
  color: white;
}

.modal-content img {
  max-width: 100%;
  max-height: 70vh; /* prevent image from taking entire screen */
  border-radius: 8px;
  margin-bottom: 15px;
  object-fit: contain;
}

.close-btn {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 30px;
  color: white;
  cursor: pointer;
  z-index: 1000;
}
@media (max-width: 600px) {
  .modal-content img {
    max-height: 60vh;
  }

  .close-btn {
    font-size: 24px;
    top: 5px;
    right: 10px;
  }
}

#musicToggle {
  background: none;
  border: none;
  color: #facc15;
  font-size: 22px;
  cursor: pointer;
  margin-left: 10px;
}

body.dark-theme {
  background: #0f172a;
  color: #ffffff;
}
body.light-theme {
  background: #f1f5f9;
  color: #1e293b;
}

body.light-theme .tab {
  background: #cbd5e1;
  color: #1e293b;
}
body.light-theme .tab.active {
  background: #facc15;
  color: #0f172a;
}
body.light-theme .card {
  background: #e2e8f0;
}
body.light-theme .modal-content {
  background: #f8fafc;
  color: #0f172a;
}


.fade-in {
  animation: fadeIn 0.5s ease-in-out;
}
@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.98); }
  to   { opacity: 1; transform: scale(1); }
}
.card {
  transition: transform 0.3s, box-shadow 0.3s;
}
.card:hover {
  transform: scale(1.03);
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

#themeToggle, #musicToggle {
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: #facc15;
}
body.light-theme #themeToggle {
  color: #0f172a;
}
