/* ==========================================
   SEDA & SİNAN Düğün Anı Defteri Design System
   ========================================== */

:root {
  /* Renk Paleti (Rose Gold, Altın ve Krem Tonları) */
  --primary-color: #b76e79;      /* Rose Gold */
  --primary-hover: #a35d68;
  --secondary-color: #d4af37;    /* Altın Sarısı */
  --bg-champagne: #faf6f0;       /* Şampanya Krem Arka Plan */
  --text-dark: #3a3233;          /* Koyu Kahve/Charcoal */
  --text-light: #7c7273;         /* Yumuşak Gri-Kahve */
  --glass-bg: rgba(255, 255, 255, 0.75);
  --glass-border: rgba(255, 255, 255, 0.5);
  --glass-shadow: 0 8px 32px 0 rgba(183, 110, 121, 0.1);
  --border-radius: 16px;
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans: 'Montserrat', sans-serif;
  --font-script: 'Alex Brush', cursive;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-champagne);
  color: var(--text-dark);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  line-height: 1.6;
}

/* Dekoratif Bubble Efektleri */
.decor-bubble {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  z-index: -1;
  opacity: 0.4;
}

.bubble-1 {
  width: 400px;
  height: 400px;
  background-color: #ffd3b6;
  top: -100px;
  left: -150px;
}

.bubble-2 {
  width: 500px;
  height: 500px;
  background-color: #ffaaa5;
  bottom: 10%;
  right: -200px;
}

.bubble-3 {
  width: 300px;
  height: 300px;
  background-color: #d4af37;
  top: 40%;
  left: 20%;
  opacity: 0.15;
}

/* Uygulama Konteyneri */
.app-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 20px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Üst Başlık (Header) */
.main-header {
  text-align: center;
  margin-bottom: 30px;
  animation: fadeInDown 1s ease-out;
}

.date-badge {
  display: inline-block;
  font-size: 0.85rem;
  letter-spacing: 3px;
  color: var(--primary-color);
  border: 1px solid var(--primary-color);
  padding: 4px 15px;
  border-radius: 20px;
  margin-bottom: 15px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.3);
}

.couple-names {
  font-family: var(--font-serif);
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 2px;
  letter-spacing: -1px;
}

.wedding-tagline {
  font-family: var(--font-script);
  font-size: 2.8rem;
  color: var(--primary-color);
  margin-top: -10px;
  margin-bottom: 10px;
}

.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 15px 0;
}

.divider .line {
  height: 1px;
  width: 60px;
  background-color: var(--primary-color);
  opacity: 0.5;
}

.divider .heart {
  margin: 0 15px;
  font-size: 1.2rem;
  color: var(--primary-color);
  animation: heartbeat 1.5s infinite;
}

.welcome-text {
  font-size: 0.95rem;
  color: var(--text-light);
  max-width: 500px;
  margin: 0 auto;
  font-weight: 400;
}

/* Navigasyon Tabları */
.nav-tabs {
  display: flex;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: 40px;
  padding: 6px;
  margin-bottom: 30px;
  justify-content: space-between;
  position: sticky;
  top: 15px;
  z-index: 100;
}

.tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  padding: 12px 10px;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-light);
  cursor: pointer;
  border-radius: 30px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.tab-btn .icon {
  width: 18px;
  height: 18px;
}

.tab-btn:hover {
  color: var(--primary-color);
  background: rgba(255, 255, 255, 0.4);
}

.tab-btn.active {
  color: #fff;
  background: var(--primary-color);
  box-shadow: 0 4px 15px rgba(183, 110, 121, 0.3);
}

/* İçerik Kartı */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: var(--border-radius);
  padding: 35px;
  animation: fadeInUp 0.8s ease-out;
}

.section-title {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  color: var(--text-dark);
  margin-bottom: 25px;
  text-align: center;
  font-weight: 600;
}

/* Form Tasarımı */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.form-group input[type="text"],
.form-group textarea {
  width: 100%;
  padding: 14px;
  border: 1px solid rgba(183, 110, 121, 0.2);
  border-radius: 10px;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  background: rgba(255, 255, 255, 0.6);
  color: var(--text-dark);
  transition: all 0.3s ease;
}

.form-group input[type="text"]:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(183, 110, 121, 0.1);
}

/* Medya Yükleme Alanı */
.media-upload-area {
  border: 2px dashed rgba(183, 110, 121, 0.3);
  border-radius: 12px;
  padding: 30px 20px;
  text-align: center;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.4);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.media-upload-area:hover {
  border-color: var(--primary-color);
  background: rgba(255, 255, 255, 0.8);
}

.upload-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--text-light);
}

.camera-icon-wrapper {
  background: rgba(183, 110, 121, 0.1);
  color: var(--primary-color);
  width: 65px;
  height: 65px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 5px;
  transition: transform 0.3s ease;
}

.media-upload-area:hover .camera-icon-wrapper {
  transform: scale(1.1);
}

.upload-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-dark);
}

.upload-subtitle {
  font-size: 0.8rem;
  color: var(--text-light);
}

/* Önizleme */
.upload-preview {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}

.upload-preview img,
.upload-preview video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preview-overlay {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 10;
}

.remove-media-btn {
  background: rgba(0, 0, 0, 0.6);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
}

.remove-media-btn:hover {
  background: rgba(255, 0, 0, 0.8);
}

/* Gönder Butonu */
.submit-btn {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, var(--primary-color), #c9828e);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(183, 110, 121, 0.3);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(183, 110, 121, 0.4);
}

.submit-btn:active {
  transform: translateY(0);
}

/* Anı Duvarı (Galeri) */
.gallery-info {
  text-align: center;
  margin-bottom: 25px;
}

.gallery-info h2 {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  color: var(--text-dark);
}

.gallery-info p {
  font-size: 0.9rem;
  color: var(--text-light);
}

/* Masonry/Grid Galeri Düzeni */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  width: 100%;
}

@media (max-width: 600px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }
}

.gallery-card {
  break-inside: avoid;
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius);
  padding: 15px;
  margin-bottom: 20px;
  box-shadow: var(--glass-shadow);
  transition: all 0.3s ease;
  cursor: pointer;
}

.gallery-card:hover {
  transform: translateY(-5px) scale(1.01);
  box-shadow: 0 12px 25px rgba(183, 110, 121, 0.15);
}

.card-media {
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 12px;
  position: relative;
  background: #eaeaea;
  aspect-ratio: 1 / 1; /* Görselleri 1080x1080 (1:1) kare formatına zorlar */
}

.card-media img,
.card-media video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover; /* Sığmayan resimleri bozmadan ortalayarak kırpar */
}

.video-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  gap: 5px;
}

.card-content {
  padding: 5px;
}

.card-message {
  font-size: 0.9rem;
  color: var(--text-dark);
  font-style: italic;
  margin-bottom: 10px;
  white-space: pre-line;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  padding-top: 10px;
}

.card-author {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--primary-color);
}

.card-date {
  font-size: 0.75rem;
  color: var(--text-light);
}

/* Yükleme animasyonları ve Boş Durum Kartı */
.gallery-loading, .gallery-empty {
  text-align: center;
  padding: 40px;
  color: var(--text-light);
  background: var(--glass-bg);
  border-radius: var(--border-radius);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  width: 100%;
  
  /* Multi-column (sütunlu) yerleşim düzeltmeleri */
  column-span: all;
  -webkit-column-span: all;
  break-inside: avoid;
  -webkit-break-inside: avoid;
}

/* Tab İçerik Kontrolleri */
.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* QR Kod Tasarımı */
.qr-section {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.qr-info-text {
  max-width: 500px;
  margin: 10px auto 25px;
  color: var(--text-light);
  font-size: 0.9rem;
  text-align: center;
}

.qr-container {
  background: #fff;
  padding: 25px;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  margin-bottom: 30px;
  border: 1px solid rgba(183, 110, 121, 0.1);
}

.qr-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #fff;
}

.qr-couple-header {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-dark);
  letter-spacing: 2px;
  margin-bottom: 2px;
}

.qr-heart {
  color: var(--primary-color);
  font-size: 1.1rem;
  margin-bottom: 15px;
}

#qr-code-img {
  width: 220px;
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fafafa;
  border-radius: 10px;
  overflow: hidden;
  padding: 10px;
  margin-bottom: 15px;
}

#qr-code-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.qr-instructions {
  font-size: 0.85rem;
  color: var(--text-light);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.qr-actions {
  display: flex;
  gap: 15px;
  margin-bottom: 25px;
  width: 100%;
  max-width: 450px;
}

.btn {
  flex: 1;
  padding: 12px 20px;
  border-radius: 10px;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--primary-color);
  color: #fff;
  border: none;
}

.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-outline {
  background: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.btn-outline:hover {
  background: rgba(183, 110, 121, 0.05);
}

.btn-icon {
  width: 18px;
  height: 18px;
}

.admin-quick-info {
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  padding-top: 20px;
  margin-top: 10px;
  font-size: 0.8rem;
  color: var(--text-light);
  width: 100%;
}

.admin-quick-info code {
  background: rgba(0, 0, 0, 0.05);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
  color: var(--primary-color);
  font-size: 0.9rem;
}

.alert-note {
  margin-top: 8px;
  font-size: 0.75rem;
  color: #c9828e;
}

/* Toast Bildirimi */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(40, 30, 31, 0.9);
  color: #fff;
  padding: 12px 24px;
  border-radius: 30px;
  font-size: 0.9rem;
  z-index: 1000;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  opacity: 0;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* Spinner Animasyonu */
.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid rgba(183, 110, 121, 0.2);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 1s infinite linear;
}

.submit-btn .spinner {
  border-top-color: #fff;
  border-width: 2px;
  width: 18px;
  height: 18px;
}

/* Lightbox Detay Görünümü */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(20, 15, 16, 0.95);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.lightbox.open {
  display: flex;
  opacity: 1;
}

.close-lightbox {
  position: absolute;
  top: 20px;
  right: 25px;
  color: #fff;
  font-size: 2.5rem;
  font-weight: 300;
  cursor: pointer;
  transition: color 0.2s;
  z-index: 2100;
}

.close-lightbox:hover {
  color: var(--primary-color);
}

.lightbox-content-wrapper {
  max-width: 90%;
  max-height: 90vh;
  width: 500px;
  background: #fff;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0,0,0,0.5);
  transform: scale(0.9);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
}

.lightbox.open .lightbox-content-wrapper {
  transform: scale(1);
}

#lightbox-media-container {
  width: 100%;
  background: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
}

#lightbox-media-container img,
#lightbox-media-container video {
  max-width: 100%;
  max-height: 60vh;
  object-fit: contain;
  display: block;
  margin: 0 auto; /* Görseli yatayda tam ortalar */
}

.lightbox-details {
  padding: 20px;
  background: #fff;
  color: var(--text-dark);
  max-height: 220px;
  overflow-y: auto;
}

/* Özel İnce Scrollbar Tasarımı */
.lightbox-details::-webkit-scrollbar {
  width: 5px;
}
.lightbox-details::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.02);
  border-radius: 10px;
}
.lightbox-details::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 10px;
}

#lightbox-author {
  font-size: 1.1rem;
  color: var(--primary-color);
  font-weight: 700;
  margin-bottom: 8px;
}

#lightbox-text {
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 12px;
  white-space: pre-line;
}

.lightbox-date {
  font-size: 0.8rem;
  color: var(--text-light);
}

/* Footer Telif */
.main-footer-copyright {
  text-align: center;
  margin-top: auto;
  padding-top: 40px;
  color: var(--text-light);
  font-size: 0.8rem;
}

/* Keyframes Animasyonlar */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes heartbeat {
  0% { transform: scale(1); }
  50% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Yazdırma Modu CSS (Print Media Queries) */
@media print {
  body {
    background: #fff;
    color: #000;
  }
  .decor-bubble,
  .main-header,
  .nav-tabs,
  #section-write,
  #section-wall,
  .qr-actions,
  .admin-quick-info,
  .main-footer-copyright {
    display: none !important;
  }
  .app-container {
    padding: 0;
    margin: 0;
    max-width: 100%;
  }
  #section-qr {
    display: block !important;
  }
  .glass-card {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    backdrop-filter: none !important;
  }
  .qr-container {
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
    margin: 40px auto !important;
  }
  .qr-card {
    border: 3px double #000;
    padding: 40px;
    border-radius: 0;
    width: 450px;
  }
  .qr-couple-header {
    font-size: 2.2rem;
  }
  #qr-code-img {
    width: 320px;
    height: 320px;
  }
}
