/* ===== TEMA D'AMOR - CSS MILLORAT ===== */

/* Variables de colors */
:root {
  --primary-pink: #ff4757;
  --secondary-pink: #ffb7c5;
  --light-pink: #ffe0e9;
  --dark-pink: #e63946;
  --white: #ffffff;
  --dark: #2d3436;
  --light-gray: #f8f9fa;
  --text-color: #2d3436;
  --shadow: 0 10px 30px rgba(255, 71, 87, 0.2);
  --shadow-light: 0 5px 15px rgba(255, 71, 87, 0.1);
}

/* ===== ESTILS GENERALS ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text-color);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ===== PÀGINA LOGIN ===== */
.login-page {
  background: linear-gradient(135deg, #ffeef3 0%, #ffb7c5 50%, #ff99ac 100%);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: hidden;
}

/* Fons amb cors animats */
.bg-hearts {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
}

.bg-hearts::before,
.bg-hearts::after {
  content: '❤️';
  position: absolute;
  font-size: 3rem;
  opacity: 0.1;
  animation: float-slow 8s infinite ease-in-out;
}

.bg-hearts::before {
  top: 10%;
  left: 10%;
  animation-delay: 0s;
}

.bg-hearts::after {
  bottom: 10%;
  right: 10%;
  animation-delay: 2s;
}

/* Container del login */
.login-container {
  z-index: 10;
  perspective: 1000px;
}

.login-box {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  padding: 50px 40px;
  border-radius: 20px;
  box-shadow: var(--shadow);
  max-width: 450px;
  width: 100%;
  text-align: center;
  animation: slideUp 0.8s ease-out;
  border: 2px solid var(--secondary-pink);
}

.heart-title {
  font-size: 4rem;
  margin-bottom: 20px;
  animation: heartBeat 1.3s infinite;
}

.login-box h1 {
  color: var(--primary-pink);
  font-size: 2.2rem;
  margin-bottom: 10px;
  font-weight: 700;
}

.subtitle {
  color: var(--text-color);
  font-size: 1rem;
  margin-bottom: 30px;
  opacity: 0.7;
}

.input-group {
  margin-bottom: 20px;
}

.input-date {
  width: 100%;
  padding: 15px;
  border: 2px solid var(--secondary-pink);
  border-radius: 10px;
  font-size: 1rem;
  margin-bottom: 15px;
  transition: all 0.3s ease;
  color: var(--text-color);
}

.input-date:focus {
  outline: none;
  border-color: var(--primary-pink);
  background-color: var(--light-pink);
  box-shadow: 0 0 10px rgba(255, 71, 87, 0.3);
}

.btn-enter {
  width: 100%;
  padding: 15px;
  background: linear-gradient(135deg, var(--primary-pink) 0%, var(--dark-pink) 100%);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-light);
}

.btn-enter:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.btn-enter:active {
  transform: translateY(-1px);
}

.heart-btn {
  margin-right: 8px;
}

.error-message {
  color: var(--primary-pink);
  margin-top: 15px;
  font-weight: 600;
  animation: shake 0.5s ease-in-out;
}

.hint {
  color: var(--text-color);
  font-size: 0.9rem;
  margin-top: 20px;
  opacity: 0.6;
  font-style: italic;
}

/* ===== PÀGINA PRINCIPAL ===== */
.main-page {
  background: linear-gradient(180deg, #fff0f5 0%, #ffe4ed 50%, #ffd6e3 100%);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

.bg-decoration {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.presentation {
  position: relative;
  z-index: 10;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

/* Navegació */
.nav-slides {
  position: absolute;
  top: 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 600px;
  padding: 0 20px;
  gap: 20px;
}

.nav-btn {
  background: linear-gradient(135deg, var(--primary-pink) 0%, var(--dark-pink) 100%);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-light);
}

.nav-btn:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow);
}

.slide-counter {
  color: var(--primary-pink);
  font-weight: 700;
  font-size: 1rem;
}

/* Contenidor de diapositives */
.slides-container {
  width: 100%;
  max-width: 700px;
  position: relative;
  min-height: 500px;
}

.slide {
  position: absolute;
  width: 100%;
  text-align: center;
  opacity: 0;
  transform: translateX(100px);
  transition: all 0.6s ease-in-out;
  pointer-events: none;
}

.slide.active {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.slide.prev {
  opacity: 0;
  transform: translateX(-100px);
}

.slide-content {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  padding: 60px 40px;
  border-radius: 20px;
  box-shadow: var(--shadow);
  border: 2px solid var(--secondary-pink);
  animation: zoomIn 0.4s ease-out; /* Reduït de 0.6s a 0.4s */
  will-change: transform, opacity;
}

.slide h1 {
  color: var(--primary-pink);
  font-size: 2.5rem;
  margin-bottom: 20px;
  font-weight: 700;
}

.slide-text {
  color: var(--text-color);
  font-size: 1.3rem;
  margin-bottom: 15px;
  font-weight: 500;
}

.slide-description {
  color: var(--text-color);
  font-size: 1.1rem;
  opacity: 0.8;
  margin-bottom: 30px;
}

.slide-description-long {
  color: var(--text-color);
  font-size: 1rem;
  line-height: 1.8;
  text-align: justify;
  max-height: 400px;
  overflow-y: auto;
  padding-right: 10px;
}

.heart-big {
  font-size: 5rem;
  margin-bottom: 20px;
  animation: heartBeat 1.3s infinite;
}

/* Targetes de moments */
.moments-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin-top: 25px;
}

.moment-card {
  background: linear-gradient(135deg, var(--light-pink) 0%, var(--secondary-pink) 100%);
  padding: 20px;
  border-radius: 15px;
  color: white;
  font-weight: 600;
  box-shadow: var(--shadow-light);
  transition: all 0.3s ease;
  font-size: 1rem;
}

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

/* Futur */
.future-text {
  margin-top: 30px;
  padding: 20px;
  background: linear-gradient(135deg, var(--light-pink) 0%, var(--secondary-pink) 100%);
  border-radius: 15px;
}

.future-text p {
  color: white;
  font-size: 1.1rem;
  margin-bottom: 15px;
  font-weight: 500;
}

.signature {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0;
}

/* ===== ESTADÍSTIQUES ===== */

.stats-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 30px;
}

.stat-box {
  background: linear-gradient(135deg, var(--light-pink) 0%, var(--secondary-pink) 100%);
  padding: 25px 20px;
  border-radius: 15px;
  text-align: center;
  color: white;
  box-shadow: var(--shadow-light);
  transition: all 0.3s ease;
  animation: slideUp 0.6s ease-out;
}

.stat-box:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow);
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 10px;
  animation: countUp 1.5s ease-out;
}

.stat-label {
  font-size: 1rem;
  font-weight: 600;
  opacity: 0.95;
}

/* Estadístiques detallades */
.stats-detailed {
  background: linear-gradient(135deg, var(--light-pink) 0%, var(--secondary-pink) 100%);
  padding: 30px;
  border-radius: 15px;
  margin: 25px 0;
  color: white;
}

.stat-bar {
  margin-bottom: 20px;
}

.stat-bar-label {
  font-weight: 600;
  margin-bottom: 8px;
  display: block;
  font-size: 0.95rem;
}

.stat-bar-container {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 10px;
  overflow: hidden;
  height: 40px;
  display: flex;
  align-items: center;
}

.stat-bar-fill {
  background: linear-gradient(90deg, #ff6b7a, #ff4757);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 0.9rem;
  border-radius: 10px;
  animation: expandWidth 1s ease-out;
  min-width: 50px;
}

.stats-info {
  background: rgba(255, 255, 255, 0.2);
  padding: 20px;
  border-radius: 12px;
  margin-top: 20px;
}

.stats-info p {
  color: white;
  font-size: 1rem;
  margin: 8px 0;
  font-weight: 500;
}

/* Galeria */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 25px;
}

.gallery-item {
  cursor: pointer;
  transition: all 0.3s ease;
  overflow: hidden;
  border-radius: 15px;
  box-shadow: var(--shadow-light);
}

.gallery-img {
  width: 100%;
  height: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  transition: all 0.3s ease;
  border-radius: 15px;
}

.gallery-item:hover .gallery-img {
  transform: scale(1.08) rotate(-2deg);
}

.gallery-item:hover {
  box-shadow: var(--shadow);
}

.gallery-placeholder {
  aspect-ratio: 1;
  background: linear-gradient(135deg, var(--light-pink) 0%, var(--secondary-pink) 100%);
  border-radius: 15px;
  display: flex;
  justify-content: center;
  align-items: center;
  color: white;
  font-weight: 600;
  font-size: 1.1rem;
  box-shadow: var(--shadow-light);
  transition: all 0.3s ease;
}

.gallery-item:hover .gallery-placeholder {
  transform: scale(1.08) rotate(-2deg);
  box-shadow: var(--shadow);
}

.gallery-hint {
  color: var(--text-color);
  font-size: 0.9rem;
  opacity: 0.7;
  margin-top: 15px;
}

/* Indicadors */
.slide-indicators {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
  z-index: 20;
}

.indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 71, 87, 0.4);
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid var(--primary-pink);
}

.indicator.active {
  background: var(--primary-pink);
  transform: scale(1.3);
}

.indicator:hover {
  background: var(--primary-pink);
}

/* Modal per a les imatges */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  backdrop-filter: blur(5px);
}

.modal.hidden {
  display: none;
}

.modal-content {
  position: relative;
  max-width: 90%;
  max-height: 90vh;
  animation: zoomIn 0.3s ease-out;
}

.modal-img {
  max-width: 100%;
  max-height: 85vh;
  border-radius: 15px;
  box-shadow: 0 0 30px rgba(255, 71, 87, 0.3);
}

.close-modal {
  position: absolute;
  top: -35px;
  right: 0;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.3s ease;
}

.close-modal:hover {
  color: var(--secondary-pink);
  transform: scale(1.2);
}

/* Cors flotants */
.floating-hearts {
  position: fixed;
  width: 100%;
  height: 100%;
  pointer-events: none;
  top: 0;
  left: 0;
  z-index: 5;
}

.heart {
  position: fixed;
  bottom: -50px;
  font-size: 2rem;
  animation: float 5s linear infinite;
  pointer-events: none;
  opacity: 0.7;
}

/* ===== ANIMACIONS ===== */
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes heartBeat {
  0%, 100% {
    transform: scale(1);
  }
  25% {
    transform: scale(1.1);
  }
  50% {
    transform: scale(1);
  }
}

@keyframes float {
  from {
    transform: translateY(0);
    opacity: 1;
  }
  to {
    transform: translateY(-100vh) rotateZ(360deg);
    opacity: 0;
  }
}

@keyframes float-slow {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-30px);
  }
}

@keyframes shake {
  0%, 100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-10px);
  }
  75% {
    transform: translateX(10px);
  }
}

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

@keyframes confetti {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(20px) rotate(360deg);
    opacity: 0;
  }
}

@keyframes countUp {
  from {
    opacity: 0;
    transform: scale(0.5);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes expandWidth {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .login-box {
    padding: 40px 30px;
  }

  .login-box h1 {
    font-size: 1.8rem;
  }

  .heart-title {
    font-size: 3rem;
  }

  .nav-slides {
    flex-wrap: wrap;
    width: 100%;
  }

  .slide-content {
    padding: 40px 25px;
  }

  .slide h1 {
    font-size: 2rem;
  }

  .moments-grid {
    grid-template-columns: 1fr;
  }

  .stats-container {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .stat-box {
    padding: 20px 15px;
  }

  .stat-number {
    font-size: 2rem;
  }

  .gallery {
    grid-template-columns: repeat(2, 1fr);
  }

  .heart-big {
    font-size: 3.5rem;
  }
}

@media (max-width: 480px) {
  .login-box {
    padding: 30px 20px;
  }

  .login-box h1 {
    font-size: 1.5rem;
  }

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

  .slide h1 {
    font-size: 1.5rem;
  }

  .slide-text {
    font-size: 1.1rem;
  }

  .nav-btn {
    padding: 8px 15px;
    font-size: 0.8rem;
  }

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

  .heart-big {
    font-size: 2.5rem;
  }
}
