/* ==========================================================================
   Palmcity Nişan Fotoğrafları Galerisi - Premium Stiller
   ========================================================================== */

:root {
  --bg-primary: #0a0c0f;
  --bg-surface: #12161f;
  --bg-surface-hover: #1b202c;
  --bg-glass: rgba(18, 22, 31, 0.75);
  
  --gold-primary: #e5c170;
  --gold-hover: #f3d489;
  --gold-gradient: linear-gradient(135deg, #dfb15b 0%, #f6db96 50%, #c49640 100%);
  
  --text-main: #f0f3f8;
  --text-muted: #9aa4b5;
  --border-color: rgba(229, 193, 112, 0.15);
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  
  --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.6);
  --font-heading: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

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

/* Background Ambient Glows */
.bg-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(140px);
  pointer-events: none;
  z-index: -1;
  opacity: 0.25;
}
.bg-glow-1 {
  width: 500px;
  height: 500px;
  background: #c49640;
  top: -100px;
  left: -100px;
}
.bg-glow-2 {
  width: 600px;
  height: 600px;
  background: #4a2c5e;
  bottom: -150px;
  right: -150px;
}

/* Header */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(12, 14, 18, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(229, 193, 112, 0.12);
  padding: 0.85rem 2rem;
}

.header-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.brand-title {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.1;
}

.brand-subtitle {
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.8px;
  margin-top: 0.15rem;
  text-transform: uppercase;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.search-box {
  position: relative;
  width: 240px;
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.search-box input {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.6rem 1rem 0.6rem 2.6rem;
  border-radius: 50px;
  color: var(--text-main);
  font-size: 0.9rem;
  outline: none;
  transition: all 0.3s ease;
}

.search-box input:focus {
  border-color: var(--gold-primary);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 15px rgba(229, 193, 112, 0.2);
}

.stats-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 0.6rem 1.2rem;
  border-radius: 50px;
  color: var(--text-main);
  font-size: 0.9rem;
  font-weight: 500;
}

.btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn:hover {
  background: var(--bg-surface-hover);
  border-color: var(--gold-primary);
}

.btn-icon {
  border-radius: 50%;
  width: 42px;
  height: 42px;
  padding: 0;
  justify-content: center;
}

/* Main Content */
.main-content {
  flex: 1;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* Status Notice */
.status-notice {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  background: rgba(229, 193, 112, 0.08);
  border: 1px solid var(--gold-primary);
  padding: 1.5rem;
  border-radius: var(--radius-md);
  margin-bottom: 2rem;
}
.status-notice.hidden {
  display: none;
}
.notice-icon {
  font-size: 2.5rem;
  color: var(--gold-primary);
}
.notice-body h3 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--gold-primary);
  margin-bottom: 0.3rem;
}

/* Gallery Grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.photo-card {
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.35deg cubic-bezier(0.25, 1, 0.5, 1);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.photo-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-color);
  box-shadow: 0 15px 30px rgba(0,0,0,0.5), 0 0 20px rgba(229, 193, 112, 0.15);
}

.photo-img-wrapper {
  position: relative;
  width: 100%;
  height: 260px;
  background: #000;
  overflow: hidden;
}

.photo-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.photo-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 1rem;
}

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

.overlay-btn {
  background: var(--gold-gradient);
  color: #000;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  box-shadow: 0 4px 10px rgba(0,0,0,0.4);
}

.photo-card-info {
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-surface);
}

.photo-name {
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}

.photo-size {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Footer */
.app-footer {
  text-align: center;
  padding: 2rem;
  border-top: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: auto;
}

/* Lightbox Modal */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

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

.lightbox-overlay {
  position: absolute;
  inset: 0;
  background: rgba(5, 7, 10, 0.95);
  backdrop-filter: blur(20px);
}

.lightbox-header {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 0.85rem 1.5rem;
  background: rgba(12, 14, 18, 0.94);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(229, 193, 112, 0.15);
}

.lightbox-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  width: 100%;
}

.lightbox-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  width: 100%;
  flex-wrap: wrap;
}

.zoom-controls, .action-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.photo-title {
  font-size: 1.05rem;
  font-weight: 600;
  display: block;
}

.photo-meta {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.lb-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-main);
  padding: 0.45rem 0.8rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s ease;
  text-decoration: none;
}

.lb-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--gold-primary);
}

.btn-gold {
  background: var(--gold-gradient);
  color: #000;
  font-weight: 600;
  border: none;
}

.btn-gold:hover {
  background: var(--gold-hover);
  color: #000;
}

.btn-close {
  background: rgba(255, 60, 60, 0.18);
  border-color: rgba(255, 60, 60, 0.35);
  color: #ff6b6b;
}

.btn-close:hover {
  background: rgba(255, 60, 60, 0.35);
  color: #fff;
}

.zoom-level {
  font-size: 0.85rem;
  color: var(--gold-primary);
  min-width: 45px;
  text-align: center;
  font-weight: 600;
}

/* Lightbox Viewport */
.lightbox-viewport {
  position: relative;
  z-index: 5;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  user-select: none;
}

.lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  background: rgba(18, 22, 31, 0.7);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: all 0.2s ease;
}

.lb-nav:hover {
  background: var(--gold-gradient);
  color: #000;
}

.lb-prev { left: 1.5rem; }
.lb-next { right: 1.5rem; }

.lb-img-container {
  max-width: 90vw;
  max-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.1s ease-out;
  cursor: grab;
}

.lb-img-container:active {
  cursor: grabbing;
}

.lb-img-container img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  box-shadow: 0 10px 40px rgba(0,0,0,0.8);
  border-radius: 4px;
}

/* Lightbox Thumbnails */
.lightbox-thumbnails {
  position: relative;
  z-index: 10;
  display: flex;
  gap: 0.6rem;
  padding: 0.8rem 1.5rem;
  background: rgba(10, 12, 15, 0.9);
  overflow-x: auto;
  border-top: 1px solid var(--border-color);
  justify-content: center;
}

.lb-thumb {
  width: 60px;
  height: 45px;
  border-radius: 4px;
  overflow: hidden;
  opacity: 0.4;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.lb-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lb-thumb.active {
  opacity: 1;
  border-color: var(--gold-primary);
  transform: scale(1.08);
}

/* Responsive & Mobile Optimization */
@media (max-width: 768px) {
  .app-header {
    padding: 0.75rem 1rem;
  }
  
  .header-container {
    flex-direction: column;
    align-items: stretch;
    gap: 0.6rem;
  }
  
  .brand {
    text-align: center;
  }

  .brand-title {
    font-size: 1.5rem;
  }

  .brand-subtitle {
    font-size: 0.75rem;
  }
  
  .header-actions {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }

  .search-box {
    flex: 1;
    width: auto;
  }

  .stats-badge {
    padding: 0.5rem 0.8rem;
    font-size: 0.8rem;
  }

  /* Lightbox Mobile Adjustments */
  .lightbox-header {
    padding: 0.6rem 0.8rem;
    gap: 0.5rem;
    background: rgba(10, 12, 15, 0.96);
  }

  .lightbox-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
  }

  .photo-info {
    max-width: 75%;
  }

  .photo-title {
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .photo-meta {
    font-size: 0.72rem;
    line-height: 1.2;
    margin-top: 0.1rem;
  }

  .lightbox-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 0.3rem;
  }

  .zoom-controls {
    display: flex;
    align-items: center;
    gap: 0.25rem;
  }

  .action-controls {
    display: flex;
    align-items: center;
    gap: 0.4rem;
  }

  .lb-btn {
    padding: 0.38rem 0.55rem;
    font-size: 0.78rem;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .zoom-level {
    display: none;
  }

  .btn-gold {
    background: var(--gold-gradient);
    color: #000;
    font-weight: 600;
    padding: 0.4rem 0.75rem;
    font-size: 0.78rem;
    border-radius: 50px;
    box-shadow: 0 2px 8px rgba(229, 193, 112, 0.3);
  }

  .btn-close {
    padding: 0.35rem 0.6rem;
    font-size: 0.78rem;
  }

  .lb-nav {
    width: 36px;
    height: 36px;
    font-size: 0.9rem;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
  }

  .lb-prev { left: 0.4rem; }
  .lb-next { right: 0.4rem; }

  .lightbox-thumbnails {
    padding: 0.4rem 0.6rem;
    justify-content: flex-start;
    gap: 0.4rem;
  }

  .lb-thumb {
    width: 48px;
    height: 36px;
  }
}
