* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #3b82f6;
  --primary-dark: #1e40af;
  --dark-bg: #0f172a;
  --card-bg: #1e293b;
  --light-bg: #f8fafc;
  --border: #334155;
  --text-light: #cbd5e1;
}

body {
  font-family: 'DM Sans', sans-serif;
  background: #0a0f1e;
  color: #e2e8f0;
  line-height: 1.6;
  min-height: 100vh;
}

/* ── Particle Canvas ──────────────────────────────────────── */
#particleCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
  z-index: 1;
}

/* ── Header ───────────────────────────────────────────────── */
@keyframes headerSlideDown {
  from { opacity: 0; transform: translateY(-30px); }
  to   { opacity: 1; transform: translateY(0); }
}

.header {
  background: linear-gradient(135deg, rgba(15,23,42,0.92) 0%, rgba(30,41,59,0.88) 100%);
  border-bottom: 2px solid var(--primary);
  padding: 40px 0;
  margin-bottom: 50px;
  box-shadow: 0 8px 48px rgba(0,0,0,0.5);
  position: relative;
  overflow: hidden;
  animation: headerSlideDown 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
  backdrop-filter: blur(12px);
  z-index: 1;
}

.header::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #3b82f6, #8b5cf6, #ec4899, #3b82f6);
  background-size: 200% 100%;
  animation: gradient 3s linear infinite;
}

@keyframes gradient {
  0%   { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
}

.logo {
  font-size: 38px;
  filter: drop-shadow(0 0 10px rgba(59, 130, 246, 0.5));
}

.brand h1 {
  font-family: 'Syne', sans-serif;
  font-size: 34px;
  font-weight: 900;
  background: linear-gradient(135deg, #60a5fa, #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
}

.subtitle {
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  color: var(--text-light);
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

/* ── Gallery wrapper ──────────────────────────────────────── */
.gallery {
  padding: 10px 0 80px;
  position: relative;
  z-index: 1;
  max-width: 1400px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}

/* ── Category Section ─────────────────────────────────────── */
@keyframes sectionFadeIn {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.category-section {
  margin-bottom: 64px;
  animation: sectionFadeIn 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.category-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(59, 130, 246, 0.25);
  position: relative;
}

/* animated left accent line */
.category-heading::before {
  content: "";
  position: absolute;
  left: -20px;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, #3b82f6, #8b5cf6);
  border-radius: 0 2px 2px 0;
}

.category-icon {
  font-size: 28px;
  filter: drop-shadow(0 0 8px rgba(59,130,246,0.4));
  flex-shrink: 0;
}

.category-title {
  font-family: 'Syne', sans-serif;
  font-size: 22px;
  font-weight: 800;
  background: linear-gradient(135deg, #e2e8f0, #94a3b8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.3px;
  flex: 1;
}

.category-count {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: #60a5fa;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.3);
  padding: 4px 12px;
  border-radius: 20px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  flex-shrink: 0;
}

/* ── Card Grid (inside a category) ───────────────────────── */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 28px;
}

/* ── Card entrance animation ──────────────────────────────── */
@keyframes cardEntrance {
  from {
    opacity: 0;
    transform: translateY(40px) scale(0.95);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

.page-card {
  position: relative;
  background: var(--card-bg);
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(59, 130, 246, 0.2);
  opacity: 0;
}

.page-card.visible {
  animation: cardEntrance 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.page-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(139, 92, 246, 0.1));
  opacity: 0;
  transition: opacity 0.4s;
  z-index: 1;
}

.page-card:hover::before { opacity: 1; }

.page-card:hover {
  transform: translateY(-12px) scale(1.02);
  box-shadow: 0 20px 48px rgba(59, 130, 246, 0.4);
  border-color: var(--primary);
}

.page-card img {
  width: 100%;
  height: 460px;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.page-card:hover img { transform: scale(1.08); }

.page-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(to top, rgba(15,23,42,0.98) 0%, rgba(30,41,59,0.85) 60%, transparent 100%);
  padding: 28px;
  color: white;
  transition: all 0.4s ease;
  z-index: 2;
}

.page-card:hover .page-overlay {
  transform: translateY(-6px);
  background: linear-gradient(to top, rgba(15,23,42,1) 0%, rgba(30,41,59,0.95) 70%, transparent 100%);
}

.page-number {
  display: inline-block;
  background: linear-gradient(135deg, var(--primary), #8b5cf6);
  padding: 5px 12px;
  border-radius: 6px;
  font-family: 'Syne', sans-serif;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-bottom: 10px;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.page-title {
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.5;
  color: #f1f5f9;
}

/* ── Modal/Lightbox ───────────────────────────────────────── */
.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background-color: rgba(0,0,0,0.97);
  animation: fadeIn 0.3s ease;
  backdrop-filter: blur(8px);
  overflow: hidden;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.modal-content {
  display: block;
  max-width: 95%;
  max-height: 88vh;
  margin: auto;
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 25px 80px rgba(0,0,0,0.6);
  border-radius: 8px;
  animation: zoomIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: zoom-in;
  user-select: none;
  -webkit-user-drag: none;
  touch-action: none;
}

.modal-content.zoomed  { cursor: grab; }
.modal-content.dragging { cursor: grabbing; }

@keyframes zoomIn {
  from { transform: translate(-50%, -50%) scale(0.7); opacity: 0; }
  to   { transform: translate(-50%, -50%) scale(1);   opacity: 1; }
}

.close {
  position: absolute;
  top: 25px; right: 45px;
  color: white;
  font-size: 55px;
  font-weight: bold;
  cursor: pointer;
  z-index: 10000;
  transition: all 0.3s;
  text-shadow: 0 0 20px rgba(239,68,68,0.8);
  line-height: 1;
}
.close:hover { color: #ef4444; transform: rotate(90deg) scale(1.2); }

.nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(59, 130, 246, 0.25);
  color: white;
  border: 2px solid rgba(255,255,255,0.3);
  font-size: 36px;
  padding: 24px 20px;
  cursor: pointer;
  z-index: 10000;
  transition: all 0.3s;
  backdrop-filter: blur(12px);
  font-weight: bold;
}
.nav-btn:hover {
  background: rgba(59,130,246,0.6);
  border-color: var(--primary);
  box-shadow: 0 0 30px rgba(59,130,246,0.6);
  transform: translateY(-50%) scale(1.1);
}
.prev { left: 25px;  border-radius: 0 12px 12px 0; }
.next { right: 25px; border-radius: 12px 0 0 12px; }

.caption {
  position: absolute;
  bottom: 70px; left: 50%;
  transform: translateX(-50%);
  color: white;
  font-size: 17px; font-weight: 700;
  text-align: center;
  background: linear-gradient(135deg, rgba(59,130,246,0.9), rgba(139,92,246,0.9));
  padding: 12px 28px;
  border-radius: 12px;
  backdrop-filter: blur(16px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  border: 1px solid rgba(255,255,255,0.2);
  max-width: 90%;
  pointer-events: none;
}

.zoom-hint {
  position: absolute;
  top: 28px; left: 50%;
  transform: translateX(-50%);
  background: rgba(15,23,42,0.85);
  color: #60a5fa;
  font-size: 14px; font-weight: 700;
  padding: 8px 20px;
  border-radius: 30px;
  border: 1px solid rgba(59,130,246,0.4);
  backdrop-filter: blur(10px);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 10001;
  letter-spacing: 0.3px;
}

.zoom-controls {
  position: absolute;
  bottom: 20px; right: 20px;
  display: flex; flex-direction: column;
  gap: 6px; z-index: 10000;
}

.zoom-btn {
  width: 42px; height: 42px;
  background: rgba(30,41,59,0.85);
  color: #e2e8f0;
  border: 1px solid rgba(59,130,246,0.4);
  border-radius: 10px;
  font-size: 20px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(10px);
  transition: all 0.2s ease;
  line-height: 1; padding: 0;
}
.zoom-btn:hover {
  background: rgba(59,130,246,0.5);
  border-color: var(--primary);
  transform: scale(1.1);
  box-shadow: 0 0 16px rgba(59,130,246,0.5);
  color: white;
}

.modal::after {
  content: "scroll: zoom  •  drag: pan  •  çift tık: yakınlaştır  •  0: sıfırla";
  position: absolute;
  bottom: 20px; left: 20px;
  font-size: 12px;
  color: rgba(148,163,184,0.6);
  pointer-events: none;
  letter-spacing: 0.2px;
}

/* ── Footer ───────────────────────────────────────────────── */
.footer {
  background: linear-gradient(135deg, rgba(10,15,30,0.97) 0%, rgba(15,23,42,0.97) 100%);
  border-top: 2px solid var(--primary);
  color: #e2e8f0;
  padding: 60px 20px 40px;
  margin-top: 80px;
  box-shadow: 0 -8px 32px rgba(0,0,0,0.3);
  position: relative; z-index: 1;
}

.footer .container { max-width: 900px; }

.credits {
  margin-bottom: 35px;
  background: rgba(30,41,59,0.6);
  padding: 28px;
  border-radius: 14px;
  border: 1px solid rgba(59,130,246,0.3);
}

.credits h3 {
  font-family: 'Syne', sans-serif;
  font-size: 22px; margin-bottom: 18px;
  background: linear-gradient(135deg, #60a5fa, #a78bfa);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 800; letter-spacing: 0.5px;
}

.credits ul { list-style: none; display: flex; flex-direction: column; gap: 12px; }

.credits li {
  font-size: 17px; padding-left: 24px;
  position: relative; color: #cbd5e1;
  font-weight: 600; transition: all 0.3s;
}
.credits li:hover { color: #60a5fa; transform: translateX(5px); }
.credits li::before {
  content: "→"; position: absolute; left: 0;
  color: var(--primary); font-weight: bold; font-size: 20px;
}

.notice {
  text-align: center; color: #94a3b8;
  font-size: 15px; padding-top: 25px;
  border-top: 1px solid rgba(51,65,85,0.6);
  font-weight: 500;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 768px) {
  .category-grid { grid-template-columns: 1fr; gap: 20px; }
  .category-title { font-size: 18px; }
  .category-heading::before { left: -10px; }
  .brand h1 { font-size: 22px; }
  .logo { font-size: 30px; }
  .modal-content { max-width: 98%; max-height: 84vh; }
  .nav-btn { padding: 18px 14px; font-size: 28px; }
  .close { top: 15px; right: 25px; font-size: 45px; }
  .caption { font-size: 14px; padding: 10px 18px; bottom: 65px; }
  .modal::after { display: none; }
  .zoom-controls { bottom: 14px; right: 14px; }
}

@media (max-width: 480px) {
  .page-card img { height: 380px; }
  .header { padding: 25px 0; }
  .prev { left: 10px; }
  .next { right: 10px; }
  .category-heading { flex-wrap: wrap; gap: 10px; }
}