* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #0a0a0a;
  color: #e0e0e0;
  min-height: 100vh;
}

/* ── WARNING OVERLAY ──────────────────────────── */
#warning-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.4s;
}

#warning-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.warning-box {
  background: #1a1a1a;
  border: 2px solid #ff4444;
  border-radius: 12px;
  padding: 48px 56px;
  text-align: center;
  max-width: 520px;
  width: 90%;
  animation: pulse-border 2s ease-in-out infinite;
}

@keyframes pulse-border {
  0%, 100% { border-color: #ff4444; box-shadow: 0 0 20px rgba(255, 68, 68, 0.3); }
  50% { border-color: #ff8888; box-shadow: 0 0 40px rgba(255, 68, 68, 0.6); }
}

.warning-icon {
  font-size: 64px;
  color: #ff4444;
  margin-bottom: 16px;
}

.warning-box h1 {
  color: #ff4444;
  font-size: 28px;
  letter-spacing: 3px;
  margin-bottom: 16px;
}

.warning-box p {
  color: #cccccc;
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 8px;
}

.warning-box .warning-sub {
  color: #999;
  font-size: 13px;
  margin-bottom: 28px;
}

#warning-btn {
  background: #ff4444;
  color: #fff;
  border: none;
  padding: 14px 36px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  letter-spacing: 1px;
  transition: background 0.2s, transform 0.15s;
}

#warning-btn:hover {
  background: #ff6666;
  transform: scale(1.04);
}

/* ── HEADER ───────────────────────────────────── */
header {
  text-align: center;
  padding: 40px 20px 10px;
}

header h1 {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: 2px;
  color: #fff;
}

.subtitle {
  color: #777;
  font-size: 14px;
  margin-top: 6px;
  letter-spacing: 1px;
}

/* ── TABS ─────────────────────────────────────── */
#tabs {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 20px 16px 8px;
  flex-wrap: wrap;
}

.tab {
  background: #1a1a1a;
  color: #888;
  border: 1px solid #333;
  padding: 10px 24px;
  font-size: 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.tab:hover {
  color: #ccc;
  border-color: #555;
}

.tab.active {
  background: #ff4444;
  color: #fff;
  border-color: #ff4444;
}

/* ── IMAGE GRID ───────────────────────────────── */
#image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  padding: 24px 28px;
  max-width: 1400px;
  margin: 0 auto;
}

.placeholder {
  aspect-ratio: 16 / 10;
  background: #151515;
  border: 1px solid #2a2a2a;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  transition: transform 0.2s, border-color 0.2s;
}

.placeholder:hover {
  transform: scale(1.03);
  border-color: #ff4444;
}

.placeholder.empty {
  cursor: default;
}

.placeholder.empty:hover {
  transform: none;
  border-color: #2a2a2a;
}

.placeholder.empty::after {
  content: 'No Image';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #333;
  font-size: 13px;
  letter-spacing: 1px;
}

.placeholder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ── ARROW NAVIGATION ─────────────────────────── */
#arrows {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 32px 20px 48px;
}

#arrows button {
  background: #1a1a1a;
  color: #e0e0e0;
  border: 1px solid #333;
  width: 48px;
  height: 48px;
  font-size: 22px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

#arrows button:hover:not(:disabled) {
  background: #ff4444;
  border-color: #ff4444;
  color: #fff;
}

#arrows button:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

#page-info {
  color: #777;
  font-size: 14px;
  min-width: 120px;
  text-align: center;
}

/* ── LIGHTBOX ─────────────────────────────────── */
#lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 8000;
}

#lightbox.open {
  display: flex;
}

#lightbox img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.8);
}

#lightbox-close {
  position: absolute;
  top: 20px;
  right: 28px;
  background: none;
  border: none;
  color: #fff;
  font-size: 40px;
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s;
}

#lightbox-close:hover {
  color: #ff4444;
}

#lightbox-prev,
#lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: #fff;
  font-size: 32px;
  padding: 16px 18px;
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.2s;
}

#lightbox-prev { left: 20px; }
#lightbox-next { right: 20px; }

#lightbox-prev:hover,
#lightbox-next:hover {
  background: rgba(255, 68, 68, 0.5);
}

#lightbox-counter {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: #999;
  font-size: 14px;
}

/* ── RESPONSIVE ───────────────────────────────── */
@media (max-width: 600px) {
  #image-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
    padding: 16px;
  }

  header h1 {
    font-size: 22px;
  }

  .warning-box {
    padding: 32px 24px;
  }

  .warning-box h1 {
    font-size: 20px;
  }
}
