/* Clean wedding-themed stylesheet: silvers, eggshells, khaki accents */

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

:root {
  --primary-color: #7a8b8a; /* dusty sage */
  --primary-dark: #5d6564;
  --secondary-color: #e8dfd0; /* warm sand */
  --accent: #b8a67d; /* warm khaki */
  --gold: #c9a961; /* rich champagne gold */
  --gold-metallic: #d4af37; /* metallic gold accent */
  --background: #e3d5c1; /* warm taupe */
  --surface: #f0e8da; /* soft cream */
  --text-primary: #2a2a2a; /* deep charcoal */
  --text-secondary: #6b5d52;
  --error: #b85a5a;
  --success: #1e8a4b;
  --border: rgba(201,169,97,0.45); /* visible gold border */
  --border-strong: rgba(201,169,97,0.65); /* prominent gold */
}

body {
  font-family: Inter, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  background: linear-gradient(180deg, var(--background) 0%, #ebe1d3 60%);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

header {
  background: linear-gradient(180deg, rgba(232,223,208,0.7) 0%, transparent 100%);
  padding: 2.5rem 1rem 1.5rem;
  text-align: center;
  border-bottom: 2px solid var(--border);
  position: relative;
}

header::after {
  content: '◆';
  position: absolute;
  bottom: -11px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--gold);
  font-size: 1.25rem;
  background: var(--background);
  padding: 0 0.75rem;
  line-height: 1;
}

header h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  font-size: 2.75rem;
  color: var(--primary-dark);
  margin-bottom: 0.75rem;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

nav {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  margin-top: 0.25rem;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.4rem 0.85rem;
  border-radius: 0.5rem;
  transition: all 0.18s ease;
  font-weight: 600;
}

.nav-link:hover {
  color: var(--text-primary);
  background: rgba(201,169,97,0.12);
  border-bottom: 2px solid var(--gold);
}

.nav-link.active {
  color: var(--primary-dark);
  background: rgba(201,169,97,0.18);
  border-bottom: 2px solid var(--gold-metallic);
  font-weight: 700;
}

main {
  flex: 1;
  padding: 2rem;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
}

/* Gallery Styles */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.gallery-item {
  background: var(--surface);
  border-radius: 0.5rem;
  overflow: hidden;
  border: 2px solid var(--border-strong);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08), 0 1px 3px rgba(201,169,97,0.15);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  position: relative;
}

.gallery-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 0.5rem;
  border: 1px solid rgba(255,255,255,0.5);
  pointer-events: none;
  z-index: 1;
}

.gallery-item img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  display: block;
}

.gallery-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.12), 0 2px 8px rgba(201,169,97,0.25), inset 0 0 0 2px var(--gold-metallic);
  border-color: var(--gold-metallic);
}

.image-info {
  padding: 0.9rem 1rem;
  background: var(--surface);
}

.upload-date {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.photo-count {
  text-align: center;
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 600;
  padding: 0.875rem 1.5rem;
  background: var(--surface);
  border-radius: 2rem;
  display: block;
  width: fit-content;
  margin: 0 auto;
  border: 2px solid var(--gold);
  box-shadow: 0 2px 8px rgba(201,169,97,0.15);
}

.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  background: var(--surface);
  border-radius: 1rem;
  margin: 2rem auto;
  max-width: 600px;
}

.empty-state p {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

.empty-state a {
  color: var(--primary-dark);
  text-decoration: none;
  font-weight: 600;
}

.empty-state a:hover {
  text-decoration: underline;
}

/* Upload Form Styles */
.upload-container {
  max-width: 640px;
  margin: 2rem auto;
  background: var(--surface);
  padding: 2.5rem;
  border-radius: 0.75rem;
  border: 2px solid var(--border-strong);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08), 0 2px 6px rgba(201,169,97,0.12);
}

.upload-container h2 {
  text-align: center;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 600;
}

.message {
  padding: 1rem;
  border-radius: 0.5rem;
  margin-bottom: 1.5rem;
  text-align: center;
  font-weight: 500;
}

.message.error {
  background: rgba(184, 90, 90, 0.12);
  color: var(--error);
  border: 1px solid rgba(184, 90, 90, 0.18);
}

.message.success {
  background: rgba(30, 138, 75, 0.08);
  color: var(--success);
  border: 1px solid rgba(30, 138, 75, 0.12);
}

.message a {
  color: inherit;
  text-decoration: underline;
  font-weight: 600;
}

.upload-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-weight: 600;
  color: var(--text-primary);
}

.form-group input[type="password"],
.form-group input[type="file"] {
  padding: 0.75rem;
  border: 2px solid var(--border);
  border-radius: 0.5rem;
  background: var(--surface);
  color: var(--text-primary);
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.form-group input[type="password"]:focus,
.form-group input[type="file"]:focus {
  outline: none;
  border-color: var(--primary-dark);
}

.form-group input[type="file"] {
  cursor: pointer;
}

.help-text {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

.btn-primary {
  padding: 1rem 1.75rem;
  background: linear-gradient(135deg, var(--gold-metallic) 0%, var(--gold) 100%);
  color: #fff;
  border: 2px solid rgba(212,175,55,0.3);
  border-radius: 0.5rem;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(201,169,97,0.25), inset 0 1px 0 rgba(255,255,255,0.2);
  letter-spacing: 0.3px;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(201,169,97,0.35), 0 4px 8px rgba(0,0,0,0.1), inset 0 1px 0 rgba(255,255,255,0.3);
  background: linear-gradient(135deg, #dab851 0%, var(--gold-metallic) 100%);
}

.back-link {
  text-align: center;
  margin-top: 1.5rem;
}

.back-link a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.3s ease;
}

.back-link a:hover {
  color: var(--primary-dark);
}

footer {
  background: transparent;
  padding: 1.5rem 1rem 3rem;
  text-align: center;
  color: var(--text-secondary);
  border-top: 2px solid var(--border);
  margin-top: auto;
  position: relative;
}

footer::before {
  content: '◆';
  position: absolute;
  top: -11px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--gold);
  font-size: 1.25rem;
  background: var(--background);
  padding: 0 0.75rem;
  line-height: 1;
}

/* Responsive Design */
@media (max-width: 768px) {
  header h1 {
    font-size: 1.5rem;
  }

  nav {
    gap: 1rem;
  }

  .gallery {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
  }

  .gallery-item img {
    height: 250px;
  }

  .upload-container {
    padding: 1.5rem;
  }

  main {
    padding: 1rem;
  }
}

@media (max-width: 480px) {
  .gallery {
    grid-template-columns: 1fr;
  }

  header {
    padding: 1rem;
  }

  nav {
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
  }
}

/* Lightbox/Carousel Styles */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.lightbox-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 0.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
  from { transform: scale(0.8); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.lightbox-info {
  display: flex;
  gap: 2rem;
  justify-content: center;
  align-items: center;
  color: var(--text-secondary);
  font-size: 1rem;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: rgba(240,232,218,0.95);
  color: var(--text-primary);
  border: 2px solid var(--gold-metallic);
  font-size: 2rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0.75rem 1.25rem;
  border-radius: 0.5rem;
  transition: all 0.24s ease;
  z-index: 1001;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4), 0 0 0 1px rgba(201,169,97,0.3);
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  background: var(--gold-metallic);
  color: #fff;
  border-color: var(--gold-metallic);
  box-shadow: 0 6px 16px rgba(0,0,0,0.5), 0 0 20px rgba(212,175,55,0.4);
}

.lightbox-close { top: 2rem; right: 2rem; font-size: 2.5rem; line-height: 1; padding: 0.25rem 0.75rem; }
.lightbox-prev { left: 2rem; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 2rem; top: 50%; transform: translateY(-50%); }

@media (max-width: 768px) {
  .lightbox-close { top: 1rem; right: 1rem; font-size: 2rem; padding: 0.25rem 0.5rem; }
  .lightbox-prev, .lightbox-next { font-size: 1.5rem; padding: 0.5rem; }
  .lightbox-prev { left: 1rem; }
  .lightbox-next { right: 1rem; }
  .lightbox-info { flex-direction: column; gap: 0.5rem; font-size: 0.875rem; }
}

