:root {
  --accent: #d85474;
  --accent-hover: #c44766;
  --accent-light: #fff0f3;
  --accent-soft: #fce4ea;
  --text-dark: #2d2d2d;
  --border-soft: #e8e8e8;
  --shadow: 0 4px 24px rgba(216, 84, 116, 0.08);
  --radius: 16px;
}

* {
  box-sizing: border-box;
}

body {
  font-family: "Inter", system-ui, sans-serif;
  background: #fafafa;
  color: var(--text-dark);
  min-height: 100vh;
}

.text-accent {
  color: var(--accent) !important;
}

.btn-accent {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  border-radius: 10px;
  font-weight: 500;
}

.btn-accent:hover,
.btn-accent:focus {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #fff;
}

.btn-outline-accent {
  color: var(--accent);
  border-color: var(--accent);
  border-radius: 10px;
  font-weight: 500;
}

.btn-outline-accent:hover {
  background: var(--accent-light);
  color: var(--accent-hover);
  border-color: var(--accent-hover);
}

/* Navbar */
.navbar {
  background: #fff;
  border-bottom: 1px solid var(--border-soft);
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text-dark);
}

.brand-icon {
  position: relative;
  width: 28px;
  height: 24px;
  color: var(--accent);
}

.brand-icon .bi-heart-fill {
  position: absolute;
  left: 0;
  font-size: 1rem;
}

.brand-icon .bi-heart {
  position: absolute;
  left: 10px;
  top: 2px;
  font-size: 0.85rem;
  opacity: 0.7;
}

.protected-badge {
  pointer-events: none;
  border-radius: 10px;
}

/* Hero */
.hero-card {
  position: relative;
  background: linear-gradient(135deg, #fff5f7 0%, #fff 50%, #fef8fa 100%);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid rgba(216, 84, 116, 0.1);
}

.hero-title {
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 700;
  line-height: 1.15;
}

.hero-subtitle {
  font-size: 1.05rem;
  max-width: 420px;
}

.hero-stats {
  font-size: 0.95rem;
}

.floating-heart {
  position: absolute;
  color: var(--accent);
  opacity: 0.25;
  font-size: 1.25rem;
}

.heart-1 { top: 12%; right: 8%; }
.heart-2 { bottom: 15%; left: 45%; font-size: 0.9rem; }

.hero-decor {
  position: relative;
  height: 280px;
}

.decor-card {
  position: absolute;
  width: 120px;
  height: 140px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: var(--accent);
}

.decor-card-1 { right: 120px; top: 20px; transform: rotate(-8deg); z-index: 1; opacity: 0.9; }
.decor-card-2 { right: 60px; top: 0; transform: rotate(4deg); z-index: 2; }
.decor-card-3 { right: 0; top: 30px; transform: rotate(12deg); z-index: 3; opacity: 0.85; }

/* Cards */
.card {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.upload-card .card-body {
  padding: 2.5rem 1.5rem;
}

.upload-zone {
  border: 2px dashed #ddd;
  border-radius: 12px;
  padding: 2rem 1rem;
  transition: border-color 0.2s, background 0.2s;
}

.upload-zone.dragover {
  border-color: var(--accent);
  background: var(--accent-light);
}

.upload-icon {
  font-size: 2.5rem;
  color: #ccc;
  display: block;
  margin-bottom: 0.75rem;
}

.security-card .card-body {
  padding: 2rem 1.5rem;
}

.security-lock {
  font-size: 2rem;
  color: var(--accent);
}

/* Gallery */
.gallery-heading {
  font-size: 1.35rem;
  font-weight: 700;
}

.sort-select {
  width: auto;
  min-width: 140px;
  border-radius: 8px;
}

.view-toggle .btn {
  border-radius: 8px !important;
}

.view-toggle .btn.active {
  background: var(--accent-light);
  border-color: var(--accent);
  color: var(--accent);
}

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

.empty-gallery {
  grid-column: 1 / -1;
}

.photo-grid.list-view {
  grid-template-columns: 1fr;
}

.photo-item {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 1;
  cursor: pointer;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  transition: transform 0.2s, box-shadow 0.2s;
}

.photo-grid.list-view .photo-item {
  aspect-ratio: 16 / 6;
}

.photo-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(216, 84, 116, 0.15);
}

.upload-zone.uploading {
  opacity: 0.6;
  pointer-events: none;
}

.photo-item img,
.photo-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.photo-item.is-video .media-badge {
  position: absolute;
  bottom: 10px;
  left: 10px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  pointer-events: none;
}

.photo-item .remove-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  font-size: 0.85rem;
  opacity: 0;
  transition: opacity 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.photo-item:hover .remove-btn {
  opacity: 1;
}

/* Locked state */
body.gallery-locked .locked-content {
  display: none !important;
}

.locked-placeholder {
  display: none;
}

body.gallery-locked .locked-placeholder {
  display: block;
}

body.gallery-locked #navUploadBtn {
  opacity: 0.5;
}

/* Password modal */
.password-modal {
  border: none;
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.modal-lock-icon {
  width: 56px;
  height: 56px;
  background: var(--accent-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 1.5rem;
}

.password-input-wrap {
  position: relative;
}

.password-input-wrap .form-control {
  border-radius: 10px;
  padding-right: 3rem;
  border-color: var(--border-soft);
}

.password-input-wrap .form-control:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 0.2rem rgba(216, 84, 116, 0.15);
}

.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #999;
  padding: 0;
  line-height: 1;
}

.password-toggle:hover {
  color: var(--accent);
}

.modal-close-hidden {
  display: none;
}

body.gallery-unlocked .modal-close-hidden {
  display: block;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.lightbox img,
.lightbox video {
  max-width: 100%;
  max-height: 90vh;
  border-radius: 8px;
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  opacity: 0.8;
}

.lightbox-close:hover {
  opacity: 1;
}

@media (max-width: 991px) {
  .hero-card {
    padding: 2rem 1.25rem;
  }

  .photo-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }
}
