/* Global Styles */
:root {
  --primary-color: #ff6b9d;
  --secondary-color: #7654ff;
  --accent-color: #ffcc4d;
  --dark-color: #333;
  --light-color: #ffffff;
  --background-gradient: linear-gradient(135deg, #ff6b9d, #7654ff);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

html,
body {
  width: 100%;
  overflow-x: hidden;
  position: relative;
}

body {
  min-height: 100vh;
  background: var(--background-gradient);
  color: var(--dark-color);
  line-height: 1.6;
}

/* Login Page Styles */
.login-page {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: var(--background-gradient);
}

.login-container {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 20px;
  padding: 40px;
  width: 90%;
  max-width: 400px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  text-align: center;
  animation: fadeIn 1s ease-in-out;
}

.heart-icon {
  font-size: 60px;
  margin-bottom: 20px;
  animation: pulse 1.5s infinite;
}

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

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.login-container h1 {
  color: var(--primary-color);
  margin-bottom: 10px;
}

.login-container p {
  color: var(--dark-color);
  margin-bottom: 25px;
}

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

input[type="password"] {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid #ddd;
  border-radius: 30px;
  font-size: 16px;
  transition: all 0.3s;
  outline: none;
}

input[type="password"]:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(255, 107, 157, 0.3);
}

.login-btn {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 12px 25px;
  border-radius: 30px;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s;
  width: 100%;
  font-weight: bold;
}

.login-btn:hover {
  background: #ff4b8d;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(255, 107, 157, 0.4);
}

.error {
  background: rgba(255, 0, 0, 0.1);
  color: #d32f2f;
  padding: 10px;
  border-radius: 5px;
  margin-bottom: 20px;
  font-size: 14px;
}

/* Hero Section Styles */
.birthday-hero {
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 20px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #ff6b9d, #7654ff);
}

.hero-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.hero-text {
  flex: 1;
  text-align: left;
  z-index: 2;
}

.birthday-title {
  font-family: "Dancing Script", cursive;
  font-size: 5rem;
  font-weight: bold;
  color: white;
  margin-bottom: 10px;
  animation: slideInLeft 1s ease-out;
  text-shadow: 3px 3px 0px rgba(0, 0, 0, 0.1);
}

.birthday-subtitle {
  font-family: "Dancing Script", cursive;
  font-size: 4rem;
  color: var(--accent-color);
  margin-bottom: 20px;
  animation: slideInLeft 1s ease-out 0.3s backwards;
  text-shadow: 2px 2px 0px rgba(0, 0, 0, 0.1);
}

.birthday-hearts {
  display: flex;
  gap: 10px;
  animation: slideInLeft 1s ease-out 0.6s backwards;
}

.birthday-hearts span {
  font-size: 2rem;
  animation: floatHeart 2s ease-in-out infinite;
}

.birthday-hearts span:nth-child(2) {
  animation-delay: 0.2s;
}

.birthday-hearts span:nth-child(3) {
  animation-delay: 0.4s;
}

.hero-image {
  flex: 1;
  position: relative;
  z-index: 2;
}

.floating-image {
  width: 400px;
  height: 400px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  animation: floatImage 3s ease-in-out infinite;
}

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

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Message Section */
.message-section {
  padding: 100px 20px;
  background: #fff;
}

/* Game Section */
.game-section {
  padding: 80px 20px;
  background: #f9f9f9;
  text-align: center;
}

.game-title {
  color: var(--primary-color);
  font-size: 2.5rem;
  margin-bottom: 20px;
}

.game-instruction {
  color: var(--dark-color);
  font-size: 1.2rem;
  margin-bottom: 40px;
}

.game-container {
  max-width: 800px;
  margin: 0 auto;
}

.game-info {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-bottom: 30px;
}

.player {
  padding: 10px 20px;
  border-radius: 20px;
  background: white;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.3s;
}

.player.active {
  background: var(--primary-color);
  color: white;
}

.player-name {
  display: block;
  font-weight: 600;
  margin-bottom: 5px;
}

.player-symbol {
  font-size: 1.5rem;
  font-weight: bold;
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  max-width: 400px;
  margin: 0 auto 20px;
}

.game-cell {
  aspect-ratio: 1;
  background: white;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.game-cell:hover {
  transform: scale(1.05);
  background: #f0f0f0;
}

.game-stats {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
}

.restart-btn {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s;
}

.restart-btn:hover {
  background: #ff4b8d;
  transform: translateY(-2px);
}

/* Music Section */
.music-section {
  padding: 80px 20px;
  background: #fff;
  text-align: center;
}

.music-title {
  color: var(--secondary-color);
  font-size: 2.5rem;
  margin-bottom: 40px;
}

.music-player {
  max-width: 400px;
  margin: 0 auto;
  background: white;
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.music-cover {
  position: relative;
  width: 300px;
  height: 300px;
  margin: 0 auto 20px;
  border-radius: 10px;
  overflow: hidden;
}

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

.music-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
}

.music-cover:hover .music-overlay {
  opacity: 1;
}

.play-icon {
  font-size: 3rem;
  color: white;
}

.music-info {
  margin-bottom: 20px;
}

.music-info h3 {
  color: var(--dark-color);
  margin-bottom: 5px;
}

.music-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-bottom: 15px;
}

.music-controls button {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  transition: transform 0.3s;
}

.music-controls button:hover {
  transform: scale(1.1);
}

.progress-bar {
  width: 100%;
  height: 5px;
  background: #eee;
  border-radius: 5px;
  margin: 10px 0;
  cursor: pointer;
}

.progress {
  width: 0%;
  height: 100%;
  background: var(--primary-color);
  border-radius: 5px;
  transition: width 0.1s linear;
}

.time {
  display: flex;
  justify-content: space-between;
  color: var(--dark-color);
  font-size: 0.9rem;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
  .main-nav {
    display: none !important;
  }

  .hero-content {
    flex-direction: column;
    text-align: center;
    padding: 0 15px;
  }

  .hero-text {
    text-align: center;
    margin-bottom: 40px;
  }

  .birthday-title {
    font-size: 4rem;
  }

  .birthday-subtitle {
    font-size: 3rem;
  }

  .floating-image {
    width: 300px;
    height: 300px;
  }

  /* Timeline Mobile Layout */
  .timeline:before {
    left: 30px;
    height: 100%;
  }

  .timeline-content {
    width: calc(100% - 60px);
    margin-left: 0;
    margin-bottom: 30px;
  }

  .timeline-content.left,
  .timeline-content.right {
    left: 0;
  }

  .timeline-ball {
    left: 30px;
    transform: none;
  }

  .timeline-ball::before {
    width: 25px;
    height: 25px;
  }

  /* Rest of mobile styles */
  .game-grid {
    max-width: 300px;
  }

  .game-cell {
    font-size: 2.5rem;
  }

  .player {
    padding: 8px 16px;
  }

  .player-name {
    font-size: 0.9rem;
  }

  .player-symbol {
    font-size: 1.2rem;
  }

  .music-player {
    padding: 15px;
    margin: 0 15px;
  }

  .music-cover {
    width: 250px;
    height: 250px;
  }

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

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

  .cake-container {
    padding: 0 15px;
  }

  .cake-wrapper {
    max-width: 300px;
  }

  .cake-image,
  .cake-slice {
    max-width: 300px;
  }

  .birthday-message {
    margin: 20px 15px;
    padding: 20px;
  }
}

/* Birthday Page Styles */
.birthday-message {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  margin-top: 40px;
  margin-bottom: 60px;
  position: relative;
  z-index: 2;
}

.birthday-message h2 {
  color: var(--primary-color);
  margin-bottom: 20px;
  font-size: 2rem;
}

.birthday-message p {
  font-size: 1.1rem;
  line-height: 1.8;
  margin-bottom: 15px;
}

/* Journey Section */
.journey-section {
  padding: 80px 20px;
  background: #f9f9f9;
  position: relative;
  width: 100%;
  overflow: hidden;
}

.journey-container {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  width: 100%;
}

.journey-title {
  text-align: center;
  margin-bottom: 60px;
  color: var(--primary-color);
  font-size: 2.5rem;
}

.timeline {
  position: relative;
  padding: 30px 0;
  width: 100%;
}

.timeline:before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 100%;
  background: var(--primary-color);
}

.timeline-ball {
  width: 40px;
  height: 40px;
  background: var(--accent-color);
  border-radius: 50%;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  border: 4px solid white;
  box-shadow: 0 0 0 4px var(--accent-color);
}

.timeline-ball::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 30px;
  height: 30px;
  background: url("https://source.unsplash.com/random/30x30/?love") center/cover;
  border-radius: 50%;
  border: 2px solid white;
}

.timeline-content {
  background: white;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  width: calc(50% - 50px);
  position: relative;
  margin-bottom: 50px;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s ease;
}

.timeline-content.show {
  opacity: 1;
  transform: translateY(0);
}

.timeline-content h3 {
  color: var(--secondary-color);
  margin-bottom: 10px;
}

.timeline-content.left {
  left: 0;
}

.timeline-content.right {
  left: calc(50% + 50px);
}

.final-message {
  text-align: center;
  padding: 40px 20px;
  background: var(--background-gradient);
  color: white;
}

.final-message h2 {
  font-size: 2.5rem;
  margin-bottom: 20px;
}

.final-message p {
  font-size: 1.2rem;
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.8;
}

/* Gallery Section */
.gallery-section {
  padding: 80px 20px;
  background: #fff;
}

.gallery-title {
  text-align: center;
  margin-bottom: 50px;
  color: var(--secondary-color);
  font-size: 2.5rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  grid-gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.gallery-item {
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s;
}

.gallery-item:hover {
  transform: translateY(-5px);
}

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

/* Cake Section */
.cake-section {
  padding: 80px 20px;
  background: #f9f9f9;
  text-align: center;
}

.cake-title {
  color: var(--primary-color);
  margin-bottom: 50px;
  font-size: 2.5rem;
}

.cake-container {
  max-width: 500px;
  margin: 0 auto;
  position: relative;
}

.cake-instruction {
  margin-bottom: 30px;
  font-size: 1.2rem;
  color: var(--dark-color);
}

/* Cake Specific Styles */
.cake-wrapper {
  position: relative;
  width: 100%;
  max-width: 400px;
  height: 300px;
  margin: 0 auto;
  cursor: pointer;
}

.cake-image,
.cake-slice {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  max-width: 400px;
  transition: all 0.5s ease;
}

.cake-slice {
  opacity: 0;
  transform: translateX(100px);
}

.cake-image.cut {
  transform: translateX(-50px);
}

.cake-slice.show {
  opacity: 1;
  transform: translateX(0);
}

.cake-celebration {
  position: absolute;
  top: -80px;
  left: 0;
  right: 0;
  background: white;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  animation: fadeInDown 0.5s ease-out;
}

@keyframes fadeInDown {
  from {
    transform: translateY(-20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.scroll-indicator {
  position: absolute;
  bottom: 30px;
  left: 0;
  right: 0;
  text-align: center;
  color: white;
  animation: bounce 2s infinite;
}

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

/* Animations */
@keyframes zoomIn {
  from {
    transform: scale(0.5);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes floatConfetti {
  0% {
    transform: translateY(0) rotate(0);
    opacity: 1;
  }
  100% {
    transform: translateY(-1000px) rotate(720deg);
    opacity: 0;
  }
}

/* Footer styles */
footer {
  background: var(--dark-color);
  color: white;
  text-align: center;
  padding: 20px;
}

/* Additional Animations */
.scroll-animate {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease-out;
}

.scroll-animate.animate {
  opacity: 1;
  transform: translateY(0);
}

/* Confetti Animation */
.confetti {
  position: absolute;
  z-index: 1;
}

/* Navigation */
.main-nav {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  padding: 10px 20px;
  border-radius: 30px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.main-nav ul {
  display: flex;
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-nav a {
  color: var(--dark-color);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
}

.main-nav a:hover {
  color: var(--primary-color);
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: white;
  padding: 30px;
  border-radius: 20px;
  text-align: center;
  max-width: 400px;
  width: 90%;
}

.modal-content h2 {
  color: var(--primary-color);
  margin-bottom: 20px;
}

.modal-btn {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s;
  margin-top: 20px;
}

.modal-btn:hover {
  background: #ff4b8d;
  transform: translateY(-2px);
}
