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

/* hidden ozelligi, display:flex/blk gibi yazar stilleri olan elemanlarda da
   gercekten gizleme yapsin (split-view / wall / detail-view icin kritik) */
[hidden] {
  display: none !important;
}

html {
  background: #0b0b0b;
  color: #0b0b0b;
  min-height: 100vh;
  height: auto;
  overflow-x: hidden;
  overflow-y: auto;
}

body {
  background: #0b0b0b;
  min-height: 100vh;
  height: auto;
  overflow: visible;
}

html.is-locked,
body.is-locked {
  overflow: hidden;
  height: 100%;
  overscroll-behavior: none;
}

.app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  background: rgba(11, 11, 11, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: opacity 0.2s ease;
}

/* lightbox acikken header gizlenir (butonlar lb'nin altinda kalmasin) */
body.lb-open .app-header {
  opacity: 0;
  pointer-events: none;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.view-switcher {
  display: flex;
  gap: 4px;
  background: rgba(255, 255, 255, 0.06);
  padding: 3px;
  border-radius: 6px;
}

.vbtn {
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.55);
  font: 600 12px/1.2 system-ui, -apple-system, sans-serif;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.vbtn:hover {
  color: #fff;
}

.vbtn.is-active {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.langbar {
  display: flex;
  gap: 2px;
  padding: 3px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 4px;
}

.lbtn {
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.45);
  font: 600 11px/1.2 system-ui, -apple-system, sans-serif;
  padding: 6px 9px;
  border-radius: 3px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.lbtn:hover {
  color: #fff;
}

.lbtn.is-on {
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.qbar {
  display: flex;
  gap: 2px;
  padding: 3px;
  background: rgba(0, 0, 0, 0.55);
  border-radius: 4px;
}

.qbtn {
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.42);
  font: 500 11px/1.2 system-ui, -apple-system, sans-serif;
  letter-spacing: 0.04em;
  padding: 6px 8px;
  cursor: pointer;
  white-space: nowrap;
}

.qbtn.is-on {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.hbtn {
  border: 0;
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.75);
  font: 600 12px/1.2 system-ui, -apple-system, sans-serif;
  padding: 7px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.hbtn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
}

.hbtn.is-active {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.detail-view {
  padding: 12px;
  width: 100%;
}

.detail-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 2px 2px 14px;
}

.dback {
  border: 0;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font: 600 13px/1 system-ui, sans-serif;
  padding: 9px 16px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s ease;
  white-space: nowrap;
}

.dback:hover {
  background: rgba(255, 255, 255, 0.18);
}

.detail-title {
  color: #fff;
  font: 700 17px/1.2 system-ui, sans-serif;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.main-container {
  padding-top: 56px;
  min-height: 100vh;
}

.split-view {
  display: flex;
  gap: 16px;
  padding: 12px;
  width: 100%;
}

.split-col {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 10px;
}

.split-header {
  font: 700 15px/1.2 system-ui, sans-serif;
  color: #fff;
  padding: 8px 12px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 12px;
}

.count-badge {
  font-size: 11px;
  padding: 2px 7px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.7);
}

.card-video-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 18px;
  padding-left: 3px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
  pointer-events: none;
  transition: transform 0.25s ease, background-color 0.25s ease;
}

.card:hover .card-video-badge {
  transform: translate(-50%, -50%) scale(1.12);
  background: rgba(220, 38, 38, 0.85);
  border-color: #fff;
}

.wall {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 4px;
  width: 100%;
}

.wall-col {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.card {
  position: relative;
  overflow: hidden;
  background: #161616;
  cursor: zoom-in;
  display: block;
  width: 100%;
  border: 0;
  padding: 0;
  appearance: none;
  overflow-anchor: none;
}

.card img {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: top;
  transform: scale(1);
  transition: transform 0.45s ease, filter 0.45s ease, opacity 0.35s ease;
  opacity: 0;
  visibility: hidden;
}

.card img.is-in {
  opacity: 1;
  visibility: visible;
}

.card video {
  display: block;
  width: 100%;
  min-height: 140px;
  max-height: 260px;
  object-fit: cover;
  vertical-align: top;
  pointer-events: none;
  background: #111;
  transition: transform 0.45s ease, filter 0.45s ease;
}

.card:hover video,
.card:focus-visible video {
  transform: scale(1.045);
  filter: brightness(0.72);
}

.card:hover img,
.card:focus-visible img {
  transform: scale(1.045);
  filter: brightness(0.72);
}

.card:focus {
  outline: none;
}

.card:focus-visible {
  outline: 1px solid #fff;
  outline-offset: -1px;
}

.card-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px 10px 8px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.4) 70%, transparent 100%);
  color: #fff;
  font: 600 13px/1.2 system-ui, sans-serif;
  letter-spacing: 0.02em;
  text-align: left;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}

.card:hover .card-caption,
.card:focus-visible .card-caption {
  opacity: 1;
}

/* Video Filmstrip Hover Preview & Scrub Bar */
.card-strip-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-repeat: no-repeat;
  background-size: 1600% 100%;
  background-position: 0% 0%;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 2;
}

.card.is-hovering .card-strip-overlay {
  opacity: 1;
}

.card-scrub-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: #ff3b30;
  box-shadow: 0 0 6px rgba(255, 59, 48, 0.8);
  width: 0%;
  opacity: 0;
  transition: opacity 0.2s ease, width 0.05s linear;
  z-index: 5;
  pointer-events: none;
}

.card.is-hovering .card-scrub-bar {
  opacity: 1;
}


.skel {
  background: linear-gradient(110deg, #161616 0%, #161616 40%, #2a2a2a 50%, #161616 60%, #161616 100%);
  background-size: 200% 100%;
  animation: shimmer 1.2s linear infinite;
  min-height: 42vw;
}

@media (min-width: 600px) {
  .skel {
    min-height: 28vw;
  }
}

@media (min-width: 900px) {
  .skel {
    min-height: 22vw;
  }
}

@media (min-width: 1280px) {
  .skel {
    min-height: 18vw;
  }
}

.skel-a { min-height: calc(var(--h, 42vw) * 1.15); }
.skel-b { min-height: calc(var(--h, 42vw) * 0.85); }
.skel-c { min-height: calc(var(--h, 42vw) * 1.35); }

@keyframes shimmer {
  to {
    background-position: -200% 0;
  }
}

.lb[hidden] {
  display: none;
}

.lb {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: #000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.lb-stage {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 0;
  padding: 40px 48px 8px;
  cursor: default;
  overflow: hidden;
  position: relative;
  user-select: none;
  -webkit-user-select: none;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}

.lb-stage::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.lb-stage::-webkit-scrollbar-track {
  background: transparent;
}

.lb-stage::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 3px;
}

.lb-img {
  max-width: min(100%, 95vw);
  max-height: calc(100vh - 85px);
  width: auto;
  height: auto;
  object-fit: contain;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
  opacity: 1;
  transform: translateX(0);
  transition: opacity 0.28s ease, transform 0.28s ease, max-width 0.25s ease, max-height 0.25s ease;
  cursor: zoom-in;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.7);
  border-radius: 2px;
  image-rendering: -webkit-optimize-contrast;
}

.lb-img.is-zoomed {
  max-width: none;
  max-height: none;
  width: auto;
  height: auto;
  object-fit: none;
  cursor: grab;
  margin: auto;
  touch-action: none;
  -webkit-touch-callout: none;
}

.lb-video {
  max-width: min(100%, 95vw);
  max-height: calc(100vh - 85px);
  width: auto;
  height: auto;
  object-fit: contain;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.7);
  border-radius: 4px;
  background: #000;
  outline: none;
}

.lb-video[hidden] {
  display: none !important;
}

.lb-stage.is-grabbing,
.lb-stage.is-grabbing .lb-img,
.lb-img.is-grabbing {
  cursor: grabbing !important;
}

.lb-back {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  border: 0;
  background: rgba(0, 0, 0, 0.55);
  color: rgba(255, 255, 255, 0.85);
  font: 600 13px/1 system-ui, sans-serif;
  padding: 11px 18px;
  border-radius: 20px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
  max-width: 42vw;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.lb-back:hover {
  color: #fff;
  background: rgba(0, 0, 0, 0.85);
}

.lb-close,
.lb-nav {
  position: absolute;
  z-index: 2;
  background: transparent;
  border: 0;
  color: rgba(255, 255, 255, 0.82);
  cursor: pointer;
  font: 400 28px/1 "Segoe UI", system-ui, sans-serif;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.lb-close {
  top: 8px;
  right: 8px;
  font-size: 32px;
}

.lb-prev {
  left: 4px;
  top: 50%;
  transform: translateY(-70%);
  font-size: 42px;
}

.lb-next {
  right: 4px;
  top: 50%;
  transform: translateY(-70%);
  font-size: 42px;
}

.lb-close:hover,
.lb-nav:hover {
  color: #fff;
}

.lb-thumbs {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: nowrap;
  gap: 5px;
  justify-content: flex-start;
  align-items: center;
  padding: 6px 12px 10px;
  max-width: 92vw;
  width: auto;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

.lb-thumbs::-webkit-scrollbar {
  height: 4px;
}

.lb-thumbs::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 2px;
}

.lb-thumbs::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.25);
  border-radius: 2px;
}

.lb-thumbs button {
  flex: 0 0 auto;
  width: 32px;
  height: 44px;
  padding: 0;
  border: 1px solid transparent;
  background: #111;
  cursor: pointer;
  opacity: 0.45;
  overflow: hidden;
  border-radius: 3px;
  transition: opacity 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.lb-thumbs button:hover {
  opacity: 0.8;
}

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

.lb-thumbs button.is-on {
  opacity: 1;
  border-color: #fff;
  transform: scale(1.08);
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.4);
}

@media (max-width: 680px) {
  .app-header {
    flex-wrap: wrap;
    padding: 6px 10px;
    gap: 6px;
  }

  .header-left {
    width: 100%;
    justify-content: space-between;
  }

  .header-right {
    width: 100%;
    justify-content: space-between;
  }

  .main-container {
    padding-top: 86px;
  }

  .vbtn {
    padding: 5px 10px;
    font-size: 11px;
  }

  .hbtn {
    padding: 5px 10px;
    font-size: 11px;
  }

  .qbtn {
    padding: 4px 6px;
    font-size: 10px;
  }

  .lbtn {
    padding: 4px 7px;
    font-size: 10px;
  }
}

@media (max-width: 599px) {
  .lb-stage {
    padding: 38px 8px 6px;
  }

  .lb-prev,
  .lb-next {
    font-size: 32px;
    width: 36px;
  }

  .lb-thumbs {
    max-width: 98vw;
    padding: 4px 6px 8px;
    gap: 4px;
  }

  .lb-thumbs button {
    width: 26px;
    height: 36px;
  }
}
