:root {
  --bg-color: #121212;
  --card-bg: rgba(255, 255, 255, 0.88);
  --card-bg-dark: rgba(26, 26, 26, 0.85);
  --card-border: rgba(255, 255, 255, 0.45);
  --card-border-subtle: rgba(255, 255, 255, 0.2);
  --text-main: #1c1917;
  --text-light: #f5f5f7;
  --text-muted: rgba(255, 255, 255, 0.88);
  --primary: #cba358; /* Warm wedding gold / champagne accent */
  --primary-hover: #b89047;
  --btn-bg: #121212;
  --btn-bg-hover: #242424;
  --btn-sec-bg: rgba(255, 255, 255, 0.95);
  --btn-sec-hover: #ffffff;
  --shadow-card: 0 12px 36px rgba(0, 0, 0, 0.22), 0 2px 8px rgba(0, 0, 0, 0.12);
  --shadow-hover: 0 20px 48px rgba(0, 0, 0, 0.35), 0 4px 12px rgba(0, 0, 0, 0.18);
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 8px;
  --font-display: 'Bebas Neue', sans-serif;
  --font-body: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

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

body {
  background-color: var(--bg-color);
  color: var(--text-light);
  font-family: var(--font-body);
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

/* Blurred Background Layer */
.background-decor {
  position: fixed;
  top: -30px;
  left: -30px;
  right: -30px;
  bottom: -30px;
  background: url('bg.jpg') no-repeat center center;
  background-size: cover;
  filter: blur(24px) brightness(0.65);
  transform: scale(1.08);
  pointer-events: none;
  z-index: -1;
}

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
}

.container-fluid {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 16px;
  width: 100%;
}

/* Header */
.header {
  text-align: center;
  padding: 55px 0 24px;
}

.title {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 7vw, 4.8rem);
  font-weight: 400;
  letter-spacing: 0.06em;
  color: #ffffff;
  line-height: 1.05;
  text-transform: uppercase;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.6);
  margin-bottom: 10px;
}

.subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto 26px;
  font-weight: 500;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
  letter-spacing: 0.02em;
}

/* Header Action Toolbar */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 24px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  user-select: none;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: linear-gradient(135deg, #d3ab5f, #b3883a);
  color: #121212;
  box-shadow: 0 4px 18px rgba(211, 171, 95, 0.35);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #dfb96f, #bf9546);
  box-shadow: 0 6px 24px rgba(211, 171, 95, 0.5);
  transform: translateY(-2px);
}

.btn-secondary {
  background: var(--btn-sec-bg);
  color: #1a1a1a;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.btn-secondary:hover {
  background: var(--btn-sec-hover);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  transform: translateY(-2px);
}

.btn-dark {
  background: rgba(18, 18, 18, 0.85);
  color: #ffffff;
  border: 1px solid var(--card-border-subtle);
  backdrop-filter: blur(10px);
}

.btn-dark:hover {
  background: rgba(36, 36, 36, 0.95);
  border-color: rgba(255, 255, 255, 0.4);
}

.btn-sm {
  padding: 7px 10px;
  font-size: 0.8rem;
}

/* Photo Gallery: Justified Left-to-Right Flexbox Layout */
.gallery-container {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding-bottom: 60px;
}

.gallery-container::after {
  content: '';
  flex-grow: 999999999;
  min-width: 250px;
  height: 0;
}

/* Photo Card */
.photo-card {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: var(--shadow-card);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  cursor: pointer;
  height: clamp(190px, 25vw, 290px);
  min-width: 140px;
}

.photo-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(255, 255, 255, 0.6);
  z-index: 2;
}

.photo-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.photo-card:hover img {
  transform: scale(1.03);
}

/* Card Hover Overlay */
.photo-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.3) 60%, transparent 100%);
  opacity: 0;
  transition: opacity 0.22s ease;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 10px 12px;
  pointer-events: none;
}

.photo-card:hover .photo-card-overlay {
  opacity: 1;
}

/* Metadata in card */
.card-meta {
  color: #fff;
  font-size: 0.78rem;
  font-weight: 500;
  margin-bottom: 7px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  width: 100%;
  line-height: 1.25;
}

.card-meta-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  flex: 1;
}

.card-meta-size {
  flex-shrink: 0;
  opacity: 0.85;
  white-space: nowrap;
  font-size: 0.74rem;
}

.card-time {
  color: #cba358;
  font-weight: 600;
}

/* Quick Action Buttons (Landscape vs Portrait) */
.card-actions-quick {
  display: flex;
  gap: 6px;
  width: 100%;
  pointer-events: auto;
}

.card-actions-quick .btn {
  flex: 1;
  min-width: 0;
  padding: 6px 6px;
  font-size: 0.78rem;
  white-space: nowrap;
}

.card-actions-quick .btn svg {
  flex-shrink: 0;
}

/* PORTRAIT (ÁLLÓ) KÉPEK: Gombok egymás alá kerülnek, így kényelmesen elférnek */
.card-portrait .card-actions-quick {
  flex-direction: column;
  gap: 5px;
}

.card-portrait .card-actions-quick .btn {
  width: 100%;
  padding: 6px 8px;
}

/* Lightbox Modal */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 10, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.lightbox.active {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: max(14px, env(safe-area-inset-top)) 20px 14px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 10;
  width: 100%;
  box-sizing: border-box;
}

.lightbox-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
  min-width: 0;
  overflow: hidden;
}

#lightbox-counter {
  white-space: nowrap;
  font-weight: 700;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

#lightbox-time {
  white-space: nowrap;
  flex-shrink: 0;
}

#lightbox-filename {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.lightbox-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.lightbox-btn-close {
  width: 36px;
  height: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 50%;
}

.lightbox-body {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 12px;
}

.lightbox-img-wrapper {
  max-width: 95vw;
  max-height: 84vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.lightbox-img {
  max-width: 95vw;
  max-height: 84vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius-sm);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.7);
  transition: opacity 0.2s ease;
  user-select: none;
}

/* Lightbox Nav buttons */
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  z-index: 5;
}

.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-50%) scale(1.08);
}

.lightbox-prev {
  left: 20px;
}

.lightbox-next {
  right: 20px;
}

@media (max-width: 768px) {
  .lightbox-nav {
    display: none; /* Mobilon swipe gesztus működik */
  }

  .lightbox-header {
    padding: max(8px, env(safe-area-inset-top)) 10px 8px;
    gap: 8px;
  }

  .lightbox-title {
    font-size: 0.85rem;
    gap: 6px;
  }

  #lightbox-filename {
    display: none; /* Mobilon a technikai DSC fájlnév elrejtve, hogy ne nyomja el a gombokat */
  }

  .lightbox-actions {
    gap: 6px;
  }

  .lightbox-actions .btn-sm {
    padding: 6px 9px;
    font-size: 0.78rem;
    border-radius: 6px;
    gap: 4px;
  }

  .lightbox-actions .btn-sm svg {
    width: 14px;
    height: 14px;
  }

  .btn-text-full {
    display: none; /* "Eredeti méret" helyett "Eredeti", "Webes méret" helyett "Web" */
  }

  .lightbox-btn-close {
    width: 34px;
    height: 34px;
  }

  /* Fotó megjelenítése mobilon: szélétől szélig, maximális helykihasználás */
  .lightbox-body {
    padding: 6px 0;
  }

  .lightbox-img-wrapper {
    max-width: 100vw;
    max-height: calc(100vh - 65px);
    width: 100%;
  }

  .lightbox-img {
    max-width: 100vw;
    max-height: calc(100vh - 65px);
    border-radius: 0;
  }
}

@media (max-width: 380px) {
  .lightbox-header {
    padding: 6px 8px;
    gap: 4px;
  }

  #lightbox-time {
    display: none !important; /* Különösen kis kijelzőn csak a sorszám látszik */
  }

  .lightbox-actions {
    gap: 4px;
  }

  .lightbox-actions .btn-sm {
    padding: 5px 6px;
    font-size: 0.72rem;
  }
}

/* Login Card (Auth Gate) */
.auth-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 3000;
  background: rgba(10, 10, 10, 0.75);
}

.auth-card {
  background: var(--card-bg);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 38px 30px;
  max-width: 440px;
  width: 100%;
  box-shadow: var(--shadow-hover);
  text-align: center;
  color: var(--text-main);
  animation: cardFadeIn 0.4s ease-out;
}

@keyframes cardFadeIn {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

.auth-title {
  font-family: var(--font-display);
  font-size: 3.2rem;
  letter-spacing: 0.06em;
  margin-bottom: 24px;
  color: #121212;
}

.auth-input-group {
  margin-bottom: 20px;
  text-align: left;
}

.auth-input {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 2px solid rgba(0, 0, 0, 0.15);
  font-size: 1.05rem;
  font-family: inherit;
  outline: none;
  background: #ffffff;
  color: #121212;
  transition: border-color 0.2s;
}

.auth-input:focus {
  border-color: #b3883a;
}

.auth-error {
  color: #dc2626;
  font-size: 0.88rem;
  margin-top: 8px;
  display: none;
  font-weight: 500;
}

/* Footer */
.footer {
  text-align: center;
  padding: 36px 20px;
  font-size: 0.95rem;
  color: #ffffff;
  font-weight: 500;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  margin-top: auto;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: rgba(18, 18, 18, 0.95);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: #ffffff;
  padding: 14px 28px;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 600;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.2);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
  z-index: 4000;
  display: flex;
  align-items: center;
  gap: 10px;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}
/* Photographer Credits Badge */
.credits {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--card-border-subtle);
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 0.88rem;
  color: #f5f5f7;
  margin-bottom: 22px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.credits-text {
  font-weight: 500;
  opacity: 0.95;
}

.credits-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #cba358;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s, transform 0.15s;
}

.credits-link:hover {
  color: #dfb96f;
  text-decoration: underline;
  transform: translateY(-1px);
}

.credits-link svg {
  color: #cba358;
}

.credits-sep {
  opacity: 0.4;
  font-size: 0.8rem;
}

