body {
  background-color: #f95c5c;
}

body.fade-out {
  opacity: 0;
  transition: opacity 0.6s;
}

.candle-count-display {
  text-align: center;
  margin-top: 120px;
  margin-bottom: 20px;
  font-family: 'Arial', sans-serif;
  font-size: 30px;
  font-weight: bold;
  color: #f0e4d0;
  background-color: #991914;
  padding: 10px;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
  border: 2px solid #ffc2d1;
}

/* Instructions Panel */
.instructions-panel {
  background-color: rgba(249, 92, 92, 0.9);
  border: 2px solid #ffc2d1;
  border-radius: 15px;
  padding: 25px;
  max-width: 450px;
  min-width: 380px;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(5px);
  animation: fadeInLeft 1s ease-out;
  position: fixed;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 50;
}

.instructions-panel h3 {
  color: #f0e4d0;
  font-family: 'Arial', sans-serif;
  font-size: 22px;
  font-weight: bold;
  text-align: center;
  margin: 0 0 15px 0;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.instruction-step {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
  animation: slideInLeft 0.6s ease-out;
}

.instruction-step:nth-child(2) { animation-delay: 0.2s; }
.instruction-step:nth-child(3) { animation-delay: 0.4s; }
.instruction-step:nth-child(4) { animation-delay: 0.6s; }

.step-number {
  background: linear-gradient(135deg, #991914, #AD030F);
  color: #f0e4d0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 16px;
  margin-right: 15px;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
  flex-shrink: 0;
}

.step-text {
  color: #f0e4d0;
  font-family: 'Arial', sans-serif;
  font-size: 16px;
  font-weight: 600;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateY(-50%) translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
  }
}

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

.candle-count-display span {
  font-weight: bold;
  color: #AD030F;
}

.cake {
  position: absolute;
  width: 250px;
  height: 200px;
  top: 50%;
  left: 50%;
  margin-top: -70px;
  margin-left: -125px;
}

.plate {
  width: 270px;
  height: 110px;
  position: absolute;
  bottom: -10px;
  left: -10px;
  background-color: #ccc;
  border-radius: 50%;
  box-shadow: 0 2px 0 #b3b3b3, 0 4px 0 #b3b3b3, 0 5px 40px rgba(0, 0, 0, 0.5);
}

.cake>* {
  position: absolute;
}

.layer {
  position: absolute;
  display: block;
  width: 250px;
  height: 100px;
  border-radius: 50%;
  background-color: #a20e11;
  box-shadow: 0 2px 0px #fbf8f8, 0 4px 0px #991914, 0 6px 0px #991914, 0 8px 0px #fbf8f8, 0 10px 0px #fbf8f8, 0 12px 0px #fbf8f8, 0 14px 0px #fbf8f8, 0 16px 0px #fbf8f8, 0 18px 0px #fbf8f8, 0 20px 0px #fbf8f8, 0 22px 0px #fbf8f8, 0 24px 0px #fbf8f8, 0 26px 0px #991914, 0 28px 0px #991914, 0 30px 0px #fbf8f8;
}

.layer-top {
  top: 0px;
}

.layer-middle {
  top: 33px;
}

.layer-bottom {
  top: 66px;
}

.icing {
  top: 2px;
  left: 5px;
  background-color: #f0e4d0;
  width: 240px;
  height: 90px;
  border-radius: 50%;
}

.icing:before {
  content: "";
  position: absolute;
  top: 4px;
  right: 5px;
  bottom: 6px;
  left: 5px;
  background-color: #f4ebdc;
  box-shadow: 0 0 4px #f6efe3, 0 0 4px #f6efe3, 0 0 4px #f6efe3;
  border-radius: 50%;
  z-index: 1;
}

.drip {
  display: block;
  width: 50px;
  height: 60px;
  border-bottom-left-radius: 25px;
  border-bottom-right-radius: 25px;
  background-color: #f0e4d0;
}

.drip1 {
  top: 53px;
  left: 5px;
  transform: skewY(15deg);
  height: 48px;
  width: 40px;
}

.drip2 {
  top: 69px;
  left: 181px;
  transform: skewY(-15deg);
}

.drip3 {
  top: 54px;
  left: 90px;
  width: 80px;
  border-bottom-left-radius: 40px;
  border-bottom-right-radius: 40px;
}

.candle {
  background-color: #7B020B;
  width: 12px;
  height: 35px;
  border-radius: 6px/3px;
  top: -20px;
  left: 50%;
  margin-left: -8px;
  z-index: 10;
}

.candle:before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 12px;
  height: 6px;
  border-radius: 50%;
  background-color: #ad030f;
}

.candle.out .flame {
  display: none;
}

.flame {
  position: absolute;
  background-color: orange;
  width: 10px;
  height: 25px;
  border-radius: 8px 8px 8px 8px/20px 20px 8px 8px;
  top: -34px;
  left: 50%;
  margin-left: -7.5px;
  z-index: 10;
  box-shadow: 0 0 10px rgba(255, 165, 0, 0.5), 0 0 20px rgba(255, 165, 0, 0.5), 0 0 60px rgba(255, 165, 0, 0.5), 0 0 80px rgba(255, 165, 0, 0.5);
  transform-origin: 50% 90%;
  animation: flicker 1s ease-in-out alternate infinite;
}

@keyframes flicker {
  0% {
    transform: skewX(5deg);
    box-shadow: 0 0 10px rgba(255, 165, 0, 0.2), 0 0 20px rgba(255, 165, 0, 0.2), 0 0 60px rgba(255, 165, 0, 0.2), 0 0 80px rgba(255, 165, 0, 0.2);
  }

  25% {
    transform: skewX(-5deg);
    box-shadow: 0 0 10px rgba(255, 165, 0, 0.5), 0 0 20px rgba(255, 165, 0, 0.5), 0 0 60px rgba(255, 165, 0, 0.5), 0 0 80px rgba(255, 165, 0, 0.5);
  }

  50% {
    transform: skewX(10deg);
    box-shadow: 0 0 10px rgba(255, 165, 0, 0.3), 0 0 20px rgba(255, 165, 0, 0.3), 0 0 60px rgba(255, 165, 0, 0.3), 0 0 80px rgba(255, 165, 0, 0.3);
  }

  75% {
    transform: skewX(-10deg);
    box-shadow: 0 0 10px rgba(255, 165, 0, 0.4), 0 0 20px rgba(255, 165, 0, 0.4), 0 0 60px rgba(255, 165, 0, 0.4), 0 0 80px rgba(255, 165, 0, 0.4);
  }

  100% {
    transform: skewX(5deg);
    box-shadow: 0 0 10px rgba(255, 165, 0, 0.5), 0 0 20px rgba(255, 165, 0, 0.5), 0 0 60px rgba(255, 165, 0, 0.5), 0 0 80px rgba(255, 165, 0, 0.5);
  }
}

/* Button Container for Perfect Centering */
.button-container {
  position: absolute;
  top: 75%;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  z-index: 100;
}

.nav-button {
  background: linear-gradient(45deg, #ff6b6b, #ff8e8e);
  color: white;
  border: none;
  padding: 15px 30px;
  font-size: 1.2rem;
  font-weight: bold;
  border-radius: 25px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
  animation: pulse 2s infinite;
}

.nav-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
  background: linear-gradient(45deg, #ff8e8e, #ffb3b3);
}

.nav-button:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(255, 107, 107, 0.3);
}

@keyframes pulse {
  0% { box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3); }
  50% { box-shadow: 0 4px 25px rgba(255, 107, 107, 0.5); }
  100% { box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3); }
}

.footer {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100%;
  background-color: #f8f9fa;
  color: #fb6f92;
  text-align: center;
  padding: 10px 0;
  font-size: 14px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.heart {
  animation: blink 1s linear infinite;
  width: 16px;
  height: 16px;
  margin-left: 5px;
}

@keyframes blink {
  0% {
    opacity: 0;
  }

  50% {
    opacity: 1;
  }

  100% {
    opacity: 0;
  }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .nav-button {
    padding: 12px 25px;
    font-size: 1rem;
  }
  
  .button-container {
    top: 70%;
  }
  
  .instructions-panel {
    position: relative;
    left: auto;
    top: auto;
    transform: none;
    margin: 15px auto;
    max-width: 350px;
  }
  
  .instructions-panel h3 {
    font-size: 20px;
  }
  
  .step-text {
    font-size: 14px;
  }
  
  .step-number {
    width: 25px;
    height: 25px;
    font-size: 14px;
    margin-right: 10px;
  }
  
  .candle-count-display {
    font-size: 24px;
    margin-top: 100px;
  }
}
/* =======  PHẦN GỐC (Khiêm đang dùng) — GIỮ NGUYÊN  ======= */
/* Tôm không biết CSS gốc của Khiêm, nên phần dưới chỉ là responsive bổ sung */
/* Chèn đoạn này CUỐI FILE CSS của Khiêm nha */

/* =======  RESPONSIVE CHO ĐIỆN THOẠI  ======= */
@media (max-width: 768px) {

  body {
    padding: 10px;
    overflow-x: hidden;
  }

  .candle-count-display {
    font-size: 22px !important;
    text-align: center;
    padding: 10px;
    line-height: 1.3;
  }

  .cake {
    transform: scale(0.7);
    margin: 0 auto;
    position: relative;
  }

  .button-container {
    margin-top: 20px;
    display: flex;
    justify-content: center;
  }

  .nav-button {
    font-size: 16px !important;
    padding: 12px 18px !important;
    width: 90%;
    text-align: center;
    border-radius: 10px;
  }

  .footer {
    font-size: 14px;
    margin-top: 20px;
    padding-bottom: 30px;
    text-align: center;
  }

  .heart {
    width: 18px;
    height: 18px;
  }
}



