body {
  font-family: 'Malgun Gothic', sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f9f9f9;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 30px;
  background-color: white;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

h1 {
  margin: 0;
  font-size: 1.5rem;
  color: #333;
}

.btn {
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
  text-decoration: none;
  display: inline-block;
}

.btn-primary {
  background-color: #2196F3;
  color: white;
}

.btn-secondary {
  background-color: #e0e0e0;
  color: #333;
  margin-left: 10px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
  padding: 30px;
  max-width: 1200px;
  margin: 0 auto;
}

.gallery-item {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s;
  position: relative;
}

.gallery-item:hover {
  transform: translateY(-5px);
}

.gallery-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.gallery-info {
  padding: 10px;
  font-size: 0.85rem;
  color: #666;
  display: flex;
  justify-content: space-between;
}

.delete-btn {
  background-color: #ff5252;
  color: white;
  border: none;
  padding: 5px 10px;
  border-radius: 3px;
  cursor: pointer;
  font-size: 0.8rem;
  position: absolute;
  top: 10px;
  right: 10px;
  display: none;
  /* Hidden by default, JS shows if admin */
}

.pagination {
  display: flex;
  justify-content: center;
  padding: 20px;
  gap: 5px;
}

.page-btn {
  padding: 5px 10px;
  border: 1px solid #ddd;
  background: white;
  cursor: pointer;
}

.page-btn.active {
  background-color: #2196F3;
  color: white;
  border-color: #2196F3;
}

/* Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 100;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background-color: white;
  padding: 30px;
  border-radius: 8px;
  width: 300px;
  position: relative;
}

.close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 1.5rem;
  cursor: pointer;
}

#login-form input {
  width: 100%;
  padding: 10px;
  margin-bottom: 10px;
  box-sizing: border-box;
  border: 1px solid #ddd;
  border-radius: 4px;
}


#login-form button {
  width: 100%;
}

@media (max-width: 470px) {
  header {
    flex-direction: column;
    padding: 15px;
    gap: 15px;
    text-align: center;
  }

  .header-left,
  .header-right {
    width: 100%;
    margin: 0;
  }

  .header-right {
    display: flex;
    justify-content: center;
  }

  h1 {
    font-size: 1.3rem;
    /* Slightly smaller for mobile */
  }

  .btn {
    width: auto;
    font-size: 0.85rem;
  }
}

footer {
  text-align: center;
  padding: 20px;
  color: #888;
  font-size: 0.9rem;
  border-top: 1px solid #eee;
  margin-top: 30px;
}