:root {
  --bg:#000;
  --fg:#fff;
  --overlay-bg: rgba(0,0,0,0.45);
}

html, body {
  height:100%;
  margin:0;
  background:var(--bg);
  color:var(--fg);
  font-family:system-ui,-apple-system,Segoe UI,Roboto,'Helvetica Neue',Arial;
}

.lightbox {
  position:fixed;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  background:var(--bg);
  overflow:hidden;
}

.top-info {
  position: absolute;
  right: 12px;
  top: 12px; /* alapértelmezett, mindig a HTML sorrend szerint */
  background: var(--overlay-bg);
  color: var(--fg);
  padding: 8px 12px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 16px;
  backdrop-filter: blur(4px);
  z-index: 20;
}

.link-btn {
  position:absolute;
  top:12px;
  left:12px;
  background:var(--overlay-bg);
  color:var(--fg);
  padding:8px 12px;
  border-radius:8px;
  font-weight:600;
  font-size:16px;
  backdrop-filter: blur(4px);
  text-decoration:none;
  z-index: 20;
}

.viewer {
  position:relative;
  width:100%;
  height:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  touch-action: none;
}

#mainImg {
  max-width:100%;
  max-height:100%;
  will-change: transform;
  user-select:none;
  -webkit-user-drag:none;
  touch-action: none;
  cursor: grab;
  transition: transform 0.08s linear;
  position:absolute;
  left:50%;
  top:50%;
  transform:translate(-50%,-50%) scale(1);
}

#mainImg.grabbing {
  cursor: grabbing;
}

.arrow {
  position:absolute;
  top:50%;
  transform:translateY(-50%);
  font-size:48px;
  line-height:1;
  padding:10px;
  border-radius:8px;
  background: rgba(0,0,0,0.25);
  color:var(--fg);
  user-select:none;
  cursor:pointer;
  z-index:10;
}

.arrow.left {
  left: 12px;
}

.arrow.right {
  right: 12px;
}

.empty {
  color:#ddd;
  font-size:20px;
  text-align:center;
  padding:20px;
  background: rgba(255,255,255,0.02);
  border-radius:8px;
}

.downloadLink {
    position: absolute;
    right: 12px;
    top: auto; /* hagyjuk, hogy a HTML sorrend szabályozza */
    bottom: 12px; /* vagy fix távolság a tetejétől, ha mindig lent akarjuk */
    background: var(--overlay-bg);
    color: var(--fg);
    padding: 8px 12px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 16px;
    backdrop-filter: blur(4px);
    text-decoration: none;
    display: inline-block;
    z-index: 20;
}

.downloadLink:hover, .link-btn:hover {
    background: rgba(255, 255, 255, 0.25); /* világosabb háttér */
    color: #000; /* fekete szöveg */
    border: 1px solid black;
}

.arrow:hover {
    background: rgba(255, 255, 255, 0.25); /* világosabb háttér */
    color: #000;                         /* fekete nyíl */
    transform: translateY(-50%) scale(1.1); /* kis nagyítás */
    box-shadow: 0 4px 12px rgba(0,0,0,0.3); /* árnyék */
}



@media (max-width:600px){
  .arrow {
    font-size:34px;
    padding:8px;
  }

  .top-info, .link-btn {
    font-size:14px;
    padding:6px 10px;
  }
}
