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

:root {
  --primary: #ff6b9d;
  --primary-light: #ffb3d9;
  --primary-dark: #ff4081;
  --secondary: #ffeaa7;
  --bg-gradient-start: #fff5f8;
  --bg-gradient-end: #ffe4f0;
  --text-dark: #2d2d2d;
  --text-light: #666;
  --white: #ffffff;
  --shadow: 0 10px 40px rgba(255, 107, 157, 0.15);
  --shadow-hover: 0 15px 60px rgba(255, 107, 157, 0.25);
}

body {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
  min-height: 100vh;
  color: var(--text-dark);
  overflow-x: hidden;
  position: relative;
}

/* Background Decorations */
.background-decorations {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.sparkle {
  position: absolute;
  font-size: 1.5rem;
  animation: twinkle 3s ease-in-out infinite;
  opacity: 0.5;
}

@keyframes twinkle {
  0%, 100% {
    opacity: 0.2;
    transform: scale(0.8) rotate(0deg);
  }
  50% {
    opacity: 0.6;
    transform: scale(1.2) rotate(180deg);
  }
}

.heart {
  position: absolute;
  bottom: -50px;
  font-size: 1.5rem;
  animation: float-up var(--duration) ease-in infinite;
  animation-delay: var(--delay);
  opacity: 0.4;
}

@keyframes float-up {
  0% {
    bottom: -50px;
    opacity: 0;
  }
  10% {
    opacity: 0.4;
  }
  90% {
    opacity: 0.4;
  }
  100% {
    bottom: calc(100vh + 50px);
    opacity: 0;
    transform: translateX(20px) rotate(360deg);
  }
}

/* Header */
.header {
  position: relative;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 40px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 107, 157, 0.1);
}

.logo {
  font-family: 'Pacifico', cursive;
  font-size: 1.6rem;
  color: var(--primary);
  font-weight: 400;
}

.nav-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--white);
  border: 2px solid rgba(255, 107, 157, 0.2);
  border-radius: 25px;
  color: var(--text-dark);
  font-family: 'Poppins', sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.nav-btn:hover {
  background: rgba(255, 107, 157, 0.05);
  border-color: var(--primary);
  transform: translateY(-2px);
}

.nav-btn svg {
  width: 16px;
  height: 16px;
}

/* Main Content */
.main-content {
  position: relative;
  z-index: 10;
  max-width: 1400px;
  margin: 0 auto;
  padding: 50px 40px;
  min-height: calc(100vh - 80px);
}

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

.photostrip-card {
  background: var(--white);
  border-radius: 25px;
  padding: 25px;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  animation: card-appear 0.5s ease-out;
}

@keyframes card-appear {
  0% {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.photostrip-card::before {
  content: '';
  position: absolute;
  top: -3px;
  left: -3px;
  right: -3px;
  bottom: -3px;
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  border-radius: 27px;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.photostrip-card:hover::before {
  opacity: 0.4;
}

.photostrip-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-hover);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 2px solid rgba(255, 107, 157, 0.1);
}

.card-date {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary);
}

.card-menu {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 107, 157, 0.1);
  border: none;
  color: var(--primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: all 0.3s ease;
}

.card-menu:hover {
  background: rgba(255, 107, 157, 0.2);
  transform: scale(1.1);
}

.photostrip-preview {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 15px;
}

.preview-photo {
  aspect-ratio: 1;
  border-radius: 15px;
  overflow: hidden;
  background: linear-gradient(135deg, #fff9fb, #fff0f5);
  border: 3px solid rgba(255, 107, 157, 0.2);
}

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

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

.photostrip-info {
  text-align: center;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 107, 157, 0.1);
}

.timestamp {
  font-size: 0.85rem;
  color: var(--text-light);
  font-weight: 500;
}

/* Empty State */
.empty-state {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 500px;
  text-align: center;
  padding: 60px 20px;
}

.empty-state.show {
  display: flex;
}

.empty-icon {
  font-size: 8rem;
  margin-bottom: 30px;
  animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-20px);
  }
}

.empty-state h2 {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 15px;
}

.empty-state p {
  font-size: 1.2rem;
  color: var(--text-light);
  margin-bottom: 35px;
  max-width: 400px;
}

/* Buttons */
.btn {
  padding: 16px 35px;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  font-family: 'Poppins', sans-serif;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.5s, height 0.5s;
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

.btn span {
  position: relative;
  z-index: 1;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: var(--white);
  box-shadow: 0 8px 25px rgba(255, 107, 157, 0.3);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 35px rgba(255, 107, 157, 0.4);
}

.btn-outline {
  background: var(--white);
  color: var(--primary);
  border: 2px solid var(--primary-light);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.btn-outline:hover {
  background: rgba(255, 107, 157, 0.05);
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.btn-icon {
  width: 18px;
  height: 18px;
  transition: transform 0.3s ease;
}

.btn-primary:hover .btn-icon {
  transform: translateX(5px);
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  animation: fade-in 0.3s ease-out;
}

.modal.show {
  display: flex;
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal-content {
  background: var(--white);
  border-radius: 30px;
  padding: 40px;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.3);
  animation: slide-up 0.3s ease-out;
  margin: 20px;
}

@keyframes slide-up {
  from {
    transform: translateY(50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.close-button {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 45px;
  height: 45px;
  font-size: 2.5rem;
  background: rgba(255, 107, 157, 0.1);
  border: none;
  border-radius: 50%;
  color: var(--primary);
  cursor: pointer;
  transition: all 0.3s ease;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-button:hover {
  background: rgba(255, 107, 157, 0.2);
  transform: rotate(90deg);
}

.modal-content h2 {
  color: var(--text-dark);
  text-align: center;
  margin-bottom: 30px;
  font-size: 1.8rem;
  font-weight: 700;
}

.modal-photostrip {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin-bottom: 30px;
}

.modal-photo {
  aspect-ratio: 1;
  border-radius: 15px;
  overflow: hidden;
  border: 3px solid rgba(255, 107, 157, 0.2);
}

.modal-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-actions {
  display: flex;
  gap: 15px;
  justify-content: center;
}

.modal-actions .btn {
  flex: 1;
}

/* Responsive */
@media (max-width: 1024px) {
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
  }
}

@media (max-width: 768px) {
  .header {
    padding: 15px 20px;
  }

  .logo {
    font-size: 1.3rem;
  }

  .nav-btn {
    padding: 8px 16px;
    font-size: 0.85rem;
  }

  .main-content {
    padding: 30px 20px;
  }

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

  .photostrip-card {
    padding: 20px;
  }

  .card-header {
    margin-bottom: 15px;
    padding-bottom: 12px;
  }

  .card-date {
    font-size: 0.85rem;
  }

  .photostrip-preview {
    gap: 10px;
  }

  .empty-icon {
    font-size: 6rem;
    margin-bottom: 25px;
  }

  .empty-state h2 {
    font-size: 2rem;
  }

  .empty-state p {
    font-size: 1rem;
    margin-bottom: 30px;
  }

  .btn {
    padding: 14px 30px;
    font-size: 0.95rem;
  }

  .modal-content {
    padding: 30px 25px;
    margin: 15px;
  }

  .modal-content h2 {
    font-size: 1.5rem;
    margin-bottom: 25px;
  }

  .modal-photostrip {
    gap: 12px;
    margin-bottom: 25px;
  }

  .modal-actions {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .header {
    flex-direction: row;
    padding: 12px 15px;
  }

  .logo {
    font-size: 1.1rem;
  }

  .nav-btn {
    padding: 6px 12px;
    font-size: 0.8rem;
    gap: 4px;
  }

  .nav-btn svg {
    width: 14px;
    height: 14px;
  }

  .main-content {
    padding: 20px 15px;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .photostrip-card {
    padding: 18px;
  }

  .empty-icon {
    font-size: 5rem;
    margin-bottom: 20px;
  }

  .empty-state h2 {
    font-size: 1.8rem;
  }

  .empty-state p {
    font-size: 0.95rem;
  }

  .btn {
    padding: 13px 25px;
    font-size: 0.9rem;
    width: 100%;
    justify-content: center;
  }

  .modal-content {
    padding: 25px 20px;
    border-radius: 25px;
  }

  .modal-content h2 {
    font-size: 1.3rem;
  }

  .close-button {
    width: 40px;
    height: 40px;
    font-size: 2rem;
  }

  /* Reduce animations */
  .sparkle:nth-child(n+3),
  .heart:nth-child(n+2) {
    display: none;
  }
}

/* Touch optimizations */
@media (hover: none) and (pointer: coarse) {
  .btn,
  .nav-btn,
  .photostrip-card,
  .card-menu {
    touch-action: manipulation;
  }

  .btn,
  .nav-btn {
    min-height: 48px;
  }

  .card-menu {
    min-width: 44px;
    min-height: 44px;
  }
}
