/* General page styles */
body {
  margin: 0;
  height: 100vh;
  font-family: 'Segoe UI', Arial, sans-serif;
  background: linear-gradient(135deg, #f5f0e4 0%, #ffffff 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  color: #333;
  padding: 20px;
}

.container {
  position: relative; /* for overlapping cards */
  background: #fff8e1;
  padding: 30px 40px;
  padding-right: 120px; /* space for overlapping cards */
  border-radius: 15px;
  text-align: center;
  box-shadow: 0 0 15px rgba(0,0,0,0.15);
  max-width: 450px;
  width: 100%;
}

h1 {
  color: #e65100;
  margin-bottom: 10px;
  font-size: 1.8rem;
}

p {
  font-size: 1rem;
  margin: 10px 0 20px;
}

.stars {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
}

.star {
  font-size: 45px;
  color: #ccc;
  cursor: pointer;
  transition: 0.3s;
}

.star:hover,
.star.active {
  color: #ffb300;
}

.message {
  display: none;
  font-weight: bold;
  color: #2e7d32;
  font-size: 1.1rem;
}

.loader {
  margin: 20px auto 0;
  border: 6px solid #ffe9b5;
  border-top: 6px solid #ffb300;
  border-radius: 50%;
  width: 45px;
  height: 45px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

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

  h1 {
    font-size: 1.5rem;
  }

  .star {
    font-size: 35px;
  }

  p {
    font-size: 0.95rem;
  }
}

/* Right-side overlapping cardview */
.main-cards {
  position: absolute; /* relative to container */
  top: 50%;
  right: -100px; /* overlaps container */
  transform: translateY(-50%);
  width: 200px;
  height: 300px;
  display: grid;
  place-items: center;
  z-index: 5;
}

.card {
  width: 190px;
  height: 254px;
  position: absolute;
  transition: 0.3s ease-in-out;
  cursor: pointer;
  box-shadow: 0px 0px 30px -10px rgba(0, 0, 0, 0.3);
  border-radius: 12px;
  background-size: cover;
  background-position: center;
}

/* Initial stacking */
#c1 { z-index: 4; background-image: url('https://images.squarespace-cdn.com/content/v1/676b1352728b0525ceb4b881/c0d1d1d6-3f05-47ce-9ce4-3dcd7ff30148/oo.png?format=1500'); }
#c2 { z-index: 3; background-image: url('https://images.squarespace-cdn.com/content/v1/676b1352728b0525ceb4b881/9c9f45ff-9eb3-4b12-a2c7-c9b2f968533c/Screenshot+2025-05-21+at+12.22.45%E2%80%AFPM+copy.jpg?format=2500w'); }
#c3 { z-index: 2; background-image: url('https://images.squarespace-cdn.com/content/v1/676b1352728b0525ceb4b881/ccef9d38-4adc-4e6a-8dd6-a762d5c0054f/AJAXLOCO.jpg'); }
#c4 { z-index: 1; background-image: url('https://images.squarespace-cdn.com/content/v1/676b1352728b0525ceb4b881/0b6a7477-a18b-4ed7-9654-bbd782f2c50c/pancakes'); }

/* Spread on hover */
.main-cards:hover #c1 { transform: translateX(-100px) rotate(-40deg); }
.main-cards:hover #c2 { transform: translateX(-50px) rotate(-30deg); }
.main-cards:hover #c3 { transform: translateX(0) rotate(-20deg); }
.main-cards:hover #c4 { transform: translateX(50px) rotate(-10deg); }

/* Hover individual cards for full spread */
#c1:hover { transform: translateX(-150px) rotate(0deg) !important; }
#c2:hover { transform: translateX(-100px) rotate(0deg) !important; }
#c3:hover { transform: translateX(-50px) rotate(0deg) !important; }
#c4:hover { transform: translateX(50px) rotate(0deg) !important; }

@media(max-width: 768px){
  .main-cards { display: none; }
}