* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --bg: #f3f4f6; --card: #ffffff; --text: #1f2937;
  --muted: #6b7280; --accent: #2b3a55; --danger: #e11d48;
}
body { font-family: system-ui, -apple-system, sans-serif; background: var(--bg); color: var(--text); }
.hidden { display: none !important; }

header { background: #fff; border-bottom: 1px solid #e5e7eb; padding: 20px 16px; text-align: center; }
header h1 { font-size: 2rem; margin-bottom: 6px; }
.subtitle { color: var(--muted); }

/* Galereya */
.gallery {
  max-width: 1100px; margin: 30px auto; padding: 0 16px;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px;
}
.card { background: var(--card); border-radius: 16px; overflow: hidden; box-shadow: 0 8px 20px rgba(15,23,42,.1); cursor: pointer; }
.card img { width: 100%; height: 240px; object-fit: cover; display: block; }
.card h3 { padding: 14px; text-align: center; font-size: 1.1rem; }

/* Blog */
.blog-section { max-width: 900px; margin: 40px auto; padding: 0 16px; }
.blog-section h2 { margin-bottom: 20px; font-size: 1.5rem; }
.post { background: var(--card); border-radius: 12px; padding: 16px; margin-bottom: 16px; box-shadow: 0 4px 12px rgba(15,23,42,.08); }
.post-cover { width: 100%; height: 200px; object-fit: cover; border-radius: 8px; margin-bottom: 12px; display: block; }
.post h3 { margin-bottom: 8px; font-size: 1.2rem; }
.post p { color: var(--muted); font-size: 0.95rem; }
.post small { display: block; margin-top: 8px; color: var(--muted); font-size: 0.85rem; }

/* Modal */
.modal {
  position: fixed; inset: 0; background: rgba(0,0,0,.88); z-index: 1000;
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.modal img { max-width: 92vw; max-height: 80vh; object-fit: contain; border-radius: 12px; }
.close-btn {
  position: absolute; top: 16px; right: 28px; color: #fff; font-size: 2.5rem; cursor: pointer;
}
.modal-actions { position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%); display: flex; gap: 12px; }
.modal-btn { background: #fff; color: #111; padding: 10px 18px; border-radius: 8px; text-decoration: none; font-weight: bold; }

/* Admin */
.admin-wrap { max-width: 900px; margin: 30px auto; padding: 0 16px; }
.admin-wrap h2 { margin-bottom: 16px; font-size: 1.4rem; }
.tab { display: inline-block; padding: 8px 16px; border: 1px solid #cbd5e1; border-radius: 8px; margin-right: 8px; cursor: pointer; }
.tab.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.tab-content { display: none; margin-top: 20px; }
.tab-content.active { display: block; }

form.admin-form { background: #fff; padding: 18px; border-radius: 12px; margin-bottom: 24px; box-shadow: 0 4px 12px rgba(15,23,42,.08); }
form.admin-form label { display: block; margin-bottom: 8px; font-weight: 600; font-size: 0.9rem; }
form.admin-form input, form.admin-form textarea { width: 100%; margin-bottom: 12px; padding: 10px; border: 1px solid #d1d5db; border-radius: 8px; }
form.admin-form button { background: var(--accent); color: #fff; border: none; padding: 10px 20px; border-radius: 8px; cursor: pointer; }

.item-list { display: grid; gap: 12px; }
.item-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 12px; display: flex; gap: 12px; align-items: center; }
.item-card img { width: 80px; height: 80px; object-fit: cover; border-radius: 8px; }
.item-card .flex-1 { flex: 1; }
.item-card h4 { margin-bottom: 4px; font-size: 1rem; }
.item-card small { color: var(--muted); font-size: 0.8rem; display: block; margin-bottom: 8px; }
.item-card button { background: var(--danger); color: #fff; border: none; padding: 6px 12px; border-radius: 6px; cursor: pointer; font-size: 0.85rem; }
.edit-box { margin-top: 10px; padding: 10px; background: #f8fafc; border-radius: 8px; display: none; }
.edit-box.active { display: block; }
.pass-box { background: #fff; padding: 18px; border-radius: 12px; margin-bottom: 24px; text-align: center; box-shadow: 0 4px 12px rgba(15,23,42,.08); }
.pass-box input { width: auto; display: inline-block; max-width: 260px; }
