/* Reset & Variables */
:root {
  --primary: #FF6B9D;
  --secondary: #FF85AB;
  --accent: #FFD700;
  --bg-gradient-1: #FFF0F5;
  --bg-gradient-2: #FFE4EC;
  --card-bg: #FFFFFF;
  --text-dark: #2D2D2D;
  --text-light: #666666;
  --shadow: rgba(255, 107, 157, 0.2);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  overflow-x: hidden;
}

/* ==================== PASSWORD SCREEN ==================== */
.password-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #FFF0F5 0%, #FFE4EC 50%, #FFD0E8 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  overflow: hidden;
}

.password-container {
  width: 100%;
  max-width: 500px;
  padding: 20px;
  position: relative;
  z-index: 2;
}

/* Decorative flowers with swing animation */
.flower-decorations {
  position: fixed;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 1;
}

.deco-flower {
  position: absolute;
  font-size: 3rem;
  animation: swingFlower 3s ease-in-out infinite;
  opacity: 0.6;
  filter: drop-shadow(0 5px 10px rgba(255, 107, 157, 0.3));
}

.deco-flower:nth-child(1) { animation-delay: 0s; animation-duration: 3s; }
.deco-flower:nth-child(2) { animation-delay: 0.5s; animation-duration: 3.5s; }
.deco-flower:nth-child(3) { animation-delay: 1s; animation-duration: 2.8s; }
.deco-flower:nth-child(4) { animation-delay: 1.5s; animation-duration: 3.2s; }
.deco-flower:nth-child(5) { animation-delay: 0.3s; animation-duration: 3.3s; }
.deco-flower:nth-child(6) { animation-delay: 0.8s; animation-duration: 2.9s; }
.deco-flower:nth-child(7) { animation-delay: 1.2s; animation-duration: 3.1s; }
.deco-flower:nth-child(8) { animation-delay: 0.6s; animation-duration: 3.4s; }

@keyframes swingFlower {
  0%, 100% {
    transform: rotate(-10deg) translateY(0);
  }
  50% {
    transform: rotate(10deg) translateY(-10px);
  }
}

/* Password card */
.password-card {
  background: white;
  border-radius: 30px;
  padding: 50px 40px;
  box-shadow: 0 20px 60px rgba(255, 107, 157, 0.3);
  text-align: center;
  animation: fadeInScale 0.8s ease-out;
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-10px); }
  75% { transform: translateX(10px); }
}

.password-icon {
  font-size: 4rem;
  margin-bottom: 20px;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.password-title {
  font-family: 'Dancing Script', cursive;
  font-size: 2.5rem;
  color: var(--primary);
  margin-bottom: 10px;
  font-weight: 700;
}

.password-subtitle {
  color: var(--text-light);
  font-size: 1.1rem;
  margin-bottom: 30px;
}

.password-input-group {
  margin-bottom: 20px;
}

.password-input {
  width: 100%;
  padding: 15px 20px;
  border: 3px solid var(--bg-gradient-2);
  border-radius: 15px;
  font-size: 1.1rem;
  font-family: 'Poppins', sans-serif;
  margin-bottom: 15px;
  transition: all 0.3s ease;
  text-align: center;
  letter-spacing: 3px;
}

.password-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 20px rgba(255, 107, 157, 0.2);
  transform: translateY(-2px);
}

.password-btn {
  width: 100%;
  padding: 15px 30px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  border: none;
  border-radius: 25px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Poppins', sans-serif;
  box-shadow: 0 10px 30px rgba(255, 107, 157, 0.3);
  transition: all 0.3s ease;
}

.password-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 40px rgba(255, 107, 157, 0.4);
}

.password-btn:active {
  transform: translateY(-1px);
}

.password-hint {
  color: var(--text-light);
  font-size: 0.9rem;
  margin-top: 15px;
  font-style: italic;
}

.password-error {
  color: #ff4444;
  font-size: 1rem;
  margin-top: 15px;
  font-weight: 600;
  animation: shake 0.5s;
}

/* Falling flowers for password screen */
.password-falling-flowers {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

/* ==================== MAIN CONTENT ==================== */

body {
  font-family: 'Poppins', sans-serif;
  background: linear-gradient(135deg, var(--bg-gradient-1) 0%, var(--bg-gradient-2) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: relative;
}

/* Music control button */
.music-btn {
  position: fixed;
  top: 20px;
  right: 20px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 30px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  z-index: 10000;
  box-shadow: 0 5px 20px var(--shadow);
  transition: all 0.3s ease;
  font-family: 'Poppins', sans-serif;
  display: flex;
  align-items: center;
  gap: 8px;
}

.music-btn:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 25px var(--shadow);
}

.music-btn:active {
  transform: translateY(-1px);
}

/* Container */
.container {
  width: 100%;
  max-width: 600px;
  position: relative;
  z-index: 1;
}

/* Animated hearts background */
.hearts-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}

.heart {
  position: absolute;
  width: 20px;
  height: 20px;
  background: var(--primary);
  transform: rotate(45deg);
  opacity: 0.3;
  animation: float 15s infinite ease-in-out;
}

.heart:before,
.heart:after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  background: var(--primary);
  border-radius: 50%;
}

.heart:before {
  top: -10px;
  left: 0;
}

.heart:after {
  top: 0;
  left: -10px;
}

.heart:nth-child(1) { left: 10%; animation-delay: 0s; animation-duration: 12s; }
.heart:nth-child(2) { left: 25%; animation-delay: 2s; animation-duration: 15s; }
.heart:nth-child(3) { left: 40%; animation-delay: 4s; animation-duration: 13s; }
.heart:nth-child(4) { left: 60%; animation-delay: 1s; animation-duration: 14s; }
.heart:nth-child(5) { left: 75%; animation-delay: 3s; animation-duration: 16s; }
.heart:nth-child(6) { left: 90%; animation-delay: 5s; animation-duration: 11s; }

@keyframes float {
  0% {
    transform: translateY(100vh) rotate(45deg) scale(0);
    opacity: 0;
  }
  10% {
    opacity: 0.3;
  }
  90% {
    opacity: 0.3;
  }
  100% {
    transform: translateY(-100px) rotate(45deg) scale(1);
    opacity: 0;
  }
}

/* Card */
.card {
  background: var(--card-bg);
  border-radius: 30px;
  padding: 50px 40px;
  box-shadow: 0 20px 60px var(--shadow);
  text-align: center;
  position: relative;
  animation: fadeInUp 0.8s ease-out;
  backdrop-filter: blur(10px);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Badge */
.badge {
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  padding: 12px 30px;
  border-radius: 25px;
  font-weight: 700;
  font-size: 1.2rem;
  box-shadow: 0 10px 30px var(--shadow);
  letter-spacing: 3px;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-10px); }
}

/* Flower illustration */
.flower-illustration {
  margin: 20px 0 30px;
  animation: rotate 20s linear infinite;
}

@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Typography */
h1 {
  font-family: 'Dancing Script', cursive;
  font-size: 3rem;
  color: var(--primary);
  margin: 20px 0 10px;
  font-weight: 700;
  text-shadow: 2px 2px 4px rgba(255, 107, 157, 0.1);
}

h2 {
  font-size: 1.5rem;
  color: var(--secondary);
  margin-bottom: 25px;
  font-weight: 600;
}

/* Recipient name with typing effect */
.recipient-name {
  background: linear-gradient(135deg, #FFE8EF, #FFF5F8);
  border-radius: 15px;
  padding: 15px 25px;
  margin: 20px 0;
  box-shadow: 0 5px 15px rgba(255, 107, 157, 0.1);
}

.recipient-name p {
  color: var(--text-dark);
  font-size: 1.3rem;
  font-weight: 400;
  margin: 0;
}

.name-text {
  font-family: 'Dancing Script', cursive;
  font-size: 1.8rem;
  color: var(--primary);
  font-weight: 700;
  display: inline-block;
  border-right: 3px solid var(--primary);
  padding-right: 5px;
  animation: blink 0.7s infinite;
}

@keyframes blink {
  0%, 50% { border-color: var(--primary); }
  51%, 100% { border-color: transparent; }
}

.message {
  color: var(--text-light);
  font-size: 1.1rem;
  line-height: 1.8;
  margin: 25px 0;
  font-weight: 300;
}

/* Quote */
.quote {
  background: linear-gradient(135deg, #FFF5F8, #FFE8EF);
  border-left: 4px solid var(--primary);
  padding: 20px 25px;
  margin: 30px 0;
  border-radius: 10px;
  font-style: italic;
  color: var(--text-dark);
  position: relative;
}

.quote::before {
  content: '"';
  font-size: 4rem;
  color: var(--secondary);
  opacity: 0.2;
  position: absolute;
  top: -10px;
  left: 10px;
  font-family: Georgia, serif;
}

/* Buttons */
.actions {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-top: 30px;
  flex-wrap: wrap;
}

.btn {
  padding: 14px 30px;
  border: none;
  border-radius: 25px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'Poppins', sans-serif;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.btn.primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
}

.btn.primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px var(--shadow);
}

.btn.secondary {
  background: white;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn.secondary:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-3px);
}

/* Floating flowers */
.floating-flowers {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.flower {
  position: absolute;
  font-size: 2rem;
  animation: floatFlower 20s infinite ease-in-out;
  opacity: 0.6;
}

.flower:nth-child(1) { left: 5%; animation-delay: 0s; animation-duration: 15s; }
.flower:nth-child(2) { left: 20%; animation-delay: 3s; animation-duration: 18s; }
.flower:nth-child(3) { left: 50%; animation-delay: 1s; animation-duration: 20s; }
.flower:nth-child(4) { left: 70%; animation-delay: 4s; animation-duration: 16s; }
.flower:nth-child(5) { left: 85%; animation-delay: 2s; animation-duration: 17s; }

@keyframes floatFlower {
  0% {
    transform: translateY(100vh) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 0.6;
  }
  90% {
    opacity: 0.6;
  }
  100% {
    transform: translateY(-150px) rotate(360deg);
    opacity: 0;
  }
}

/* Falling flowers from top */
.falling-flowers {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.falling-flower {
  position: absolute;
  top: -50px;
  font-size: 2rem;
  opacity: 0.8;
  animation: fallDown 10s linear forwards;
  pointer-events: none;
}

@keyframes fallDown {
  0% {
    transform: translateY(-50px) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 0.8;
  }
  90% {
    opacity: 0.7;
  }
  100% {
    transform: translateY(100vh) rotate(360deg);
    opacity: 0;
  }
}

/* Sparkle effect */
.sparkle {
  position: absolute;
  width: 10px;
  height: 10px;
  background: var(--accent);
  border-radius: 50%;
  pointer-events: none;
  animation: sparkleAnim 1s ease-out forwards;
  z-index: 9999;
}

@keyframes sparkleAnim {
  0% {
    transform: scale(0) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: scale(2) rotate(180deg);
    opacity: 0;
  }
}

/* Click color burst effect - Thay thế cho click flower */
.click-circle {
  position: absolute;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  animation: colorBurst 1.2s ease-out forwards;
  box-shadow: 0 0 10px rgba(255, 107, 157, 0.6);
}

@keyframes colorBurst {
  0% {
    transform: translate(-50%, -50%) scale(0);
    opacity: 1;
  }
  50% {
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -50%) 
               translate(
                 calc(cos(var(--angle)) * var(--distance)),
                 calc(sin(var(--angle)) * var(--distance))
               )
               scale(0.8);
    opacity: 0;
  }
}

/* Click flower burst effect - ẨN KHÔNG DÙNG NỮA */
.click-flower {
  display: none;
}

@keyframes flowerBurst {
  /* Không dùng nữa */
}

/* Ripple effect on click */
.ripple {
  position: absolute;
  width: 20px; /* Giảm từ 30px xuống 20px */
  height: 20px; /* Giảm từ 30px xuống 20px */
  border: 2px solid var(--primary); /* Giảm từ 3px xuống 2px */
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  animation: rippleAnim 0.8s ease-out forwards; /* Giảm thời gian từ 1s xuống 0.8s */
}

@keyframes rippleAnim {
  0% {
    width: 20px;
    height: 20px;
    opacity: 1;
  }
  100% {
    width: 100px; /* Giảm từ 150px xuống 100px */
    height: 100px; /* Giảm từ 150px xuống 100px */
    opacity: 0;
  }
}

/* Responsive */
@media (max-width: 768px) {
  .card {
    padding: 40px 25px;
  }

  h1 {
    font-size: 2.2rem;
  }

  h2 {
    font-size: 1.2rem;
  }

  .message {
    font-size: 1rem;
  }

  .badge {
    font-size: 1rem;
    padding: 10px 25px;
  }

  .recipient-name p {
    font-size: 1.1rem;
  }

  .name-text {
    font-size: 1.5rem;
  }

  .actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .music-btn {
    top: 10px;
    right: 10px;
    padding: 10px 18px;
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 1.8rem;
  }

  .flower-illustration svg {
    width: 120px;
    height: 120px;
  }

  /* Password screen responsive */
  .password-card {
    padding: 35px 25px;
  }

  .password-title {
    font-size: 2rem;
  }

  .password-icon {
    font-size: 3rem;
  }

  .deco-flower {
    font-size: 2rem;
  }
}

/* Print styles */
@media print {
  body {
    background: white;
  }

  .hearts-bg,
  .floating-flowers,
  .actions {
    display: none;
  }

  .card {
    box-shadow: none;
    border: 2px solid var(--primary);
  }
}

/* ==================== MODAL STYLES ==================== */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 100000;
  display: none;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
}

.modal-content {
  position: relative;
  background: white;
  border-radius: 30px;
  padding: 40px;
  max-width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.4s ease-out;
  z-index: 1;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(50px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 40px;
  height: 40px;
  border: none;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 10;
}

.modal-close:hover {
  background: var(--secondary);
  transform: rotate(90deg) scale(1.1);
}

.modal-title {
  font-family: 'Dancing Script', cursive;
  font-size: 2.5rem;
  color: var(--primary);
  text-align: center;
  margin-bottom: 30px;
  font-weight: 700;
}

/* ==================== DANCING FLOWERS MODAL ==================== */
.flower-dance-container {
  width: 600px;
  height: 500px;
}

.dancing-flowers-area {
  position: relative;
  width: 100%;
  height: 350px;
  background: linear-gradient(135deg, #FFF5F8, #FFE8EF);
  border-radius: 20px;
  overflow: hidden;
  border: 3px dashed var(--secondary);
}

.dancing-flower {
  position: absolute;
  font-size: 3rem;
  animation: dancingFlower 3s ease-in-out infinite;
  cursor: pointer;
  transition: transform 0.2s;
}

.dancing-flower:hover {
  transform: scale(1.3) !important;
}

@keyframes dancingFlower {
  0%, 100% {
    transform: translateY(0) rotate(0deg) scale(1);
  }
  25% {
    transform: translateY(-20px) rotate(15deg) scale(1.1);
  }
  50% {
    transform: translateY(0) rotate(-10deg) scale(0.9);
  }
  75% {
    transform: translateY(-15px) rotate(20deg) scale(1.2);
  }
}

.flower-message {
  text-align: center;
  font-size: 1.5rem;
  color: var(--primary);
  font-weight: 600;
  margin-top: 20px;
  animation: pulse 2s ease-in-out infinite;
}

/* ==================== VIDEO MODAL ==================== */
.video-container {
  width: 800px;
  max-width: 95vw;
}

.video-wrapper {
  position: relative;
  width: 100%;
  border-radius: 20px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.love-video {
  width: 100%;
  height: auto;
  display: block;
  max-height: 70vh;
  object-fit: contain;
}

.video-message {
  text-align: center;
  font-size: 1.3rem;
  color: var(--primary);
  font-weight: 600;
  margin-top: 20px;
  font-family: 'Dancing Script', cursive;
}

/* Responsive cho modal */
@media (max-width: 768px) {
  .modal-content {
    padding: 30px 20px;
  }

  .flower-dance-container {
    width: 95vw;
    height: auto;
  }

  .dancing-flowers-area {
    height: 300px;
  }

  .modal-title {
    font-size: 2rem;
  }

  .dancing-flower {
    font-size: 2rem;
  }

  .video-container {
    width: 95vw;
  }
}

@media (max-width: 480px) {
  .dancing-flowers-area {
    height: 250px;
  }

  .modal-title {
    font-size: 1.8rem;
  }

  .flower-message,
  .video-message {
    font-size: 1.2rem;
  }
}

/* ==================== NHÂN VẬT HOA VUI NHỘN ==================== */
.funny-flower {
  position: fixed;
  z-index: 50000;
  cursor: grab;
  user-select: none;
  transition: transform 0.3s ease;
}

.funny-flower:active {
  cursor: grabbing;
}

.flower-character {
  position: relative;
  width: 80px;
  height: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  filter: drop-shadow(0 5px 15px rgba(255, 107, 157, 0.3));
}

/* Đầu hoa */
.flower-head {
  position: relative;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: headBob 2s ease-in-out infinite;
}

.petal-top {
  font-size: 3.5rem;
  position: absolute;
  animation: petalRotate 4s ease-in-out infinite;
}

.flower-face {
  position: absolute;
  font-size: 2rem;
  z-index: 1;
  animation: faceChange 3s ease-in-out infinite;
}

@keyframes headBob {
  0%, 100% { transform: translateY(0) rotate(-5deg); }
  50% { transform: translateY(-5px) rotate(5deg); }
}

@keyframes petalRotate {
  0%, 100% { transform: rotate(-10deg); }
  50% { transform: rotate(10deg); }
}

@keyframes faceChange {
  0%, 100% { content: '😊'; }
  33% { content: '😄'; }
  66% { content: '🥰'; }
}

/* Thân */
.flower-body {
  width: 8px;
  height: 35px;
  background: linear-gradient(180deg, #8BC34A, #4CAF50);
  border-radius: 4px;
  margin: -5px 0;
}

/* Chân tay - Đoạn thẳng màu xanh */
.flower-arms {
  position: absolute;
  top: 50px;
  width: 120%;
  left: -10%;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}

.arm {
  width: 3px;
  height: 25px;
  background: linear-gradient(180deg, #8BC34A, #4CAF50);
  border-radius: 2px;
  animation: armWave 1.2s ease-in-out infinite;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.arm-left {
  transform-origin: top center;
  animation-delay: 0s;
}

.arm-right {
  transform-origin: top center;
  animation-delay: 0.6s;
}

@keyframes armWave {
  0%, 100% { transform: rotate(-20deg); }
  50% { transform: rotate(20deg); }
}

.flower-legs {
  position: absolute;
  top: 85px;
  display: flex;
  gap: 12px;
  pointer-events: none;
}

.leg {
  width: 3px;
  height: 30px;
  background: linear-gradient(180deg, #66BB6A, #4CAF50);
  border-radius: 2px;
  animation: legWalk 0.8s ease-in-out infinite;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.leg-left {
  transform-origin: top center;
  animation-delay: 0s;
}

.leg-right {
  transform-origin: top center;
  animation-delay: 0.4s;
}

@keyframes legWalk {
  0%, 100% { transform: rotate(-15deg); }
  50% { transform: rotate(15deg); }
}

/* Nhảy lên */
@keyframes flowerJump {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-30px); }
}

/* Hiệu ứng bám tường */
.funny-flower.climbing .arm {
  animation: climbingArms 0.5s ease-in-out infinite;
}

.funny-flower.climbing .leg {
  animation: climbingLegs 0.6s ease-in-out infinite;
}

@keyframes climbingArms {
  0%, 100% { 
    transform: rotate(-45deg);
    height: 30px;
  }
  50% { 
    transform: rotate(-90deg);
    height: 35px;
  }
}

@keyframes climbingLegs {
  0%, 100% { 
    transform: rotate(45deg);
    height: 35px;
  }
  50% { 
    transform: rotate(90deg);
    height: 40px;
  }
}

/* Bong bóng chat */
.flower-speech-bubble {
  position: absolute;
  top: -50px;
  left: 50%;
  transform: translateX(-50%);
  background: white;
  padding: 10px 15px;
  border-radius: 20px;
  border: 2px solid var(--primary);
  white-space: nowrap;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  animation: bubblePop 0.3s ease-out;
  z-index: 1;
}

.flower-speech-bubble::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 10px solid white;
}

.speech-text {
  color: var(--primary);
  font-weight: 600;
  font-size: 0.9rem;
}

@keyframes bubblePop {
  0% {
    transform: translateX(-50%) scale(0);
    opacity: 0;
  }
  100% {
    transform: translateX(-50%) scale(1);
    opacity: 1;
  }
}

/* Responsive cho nhân vật hoa */
@media (max-width: 768px) {
  .flower-character {
    width: 60px;
    height: 90px;
  }

  .flower-head {
    width: 45px;
    height: 45px;
  }

  .petal-top {
    font-size: 2.5rem;
  }

  .flower-face {
    font-size: 1.5rem;
  }

  .flower-body {
    width: 6px;
    height: 25px;
  }

  .arm {
    width: 2px;
    height: 20px;
  }

  .leg {
    width: 2px;
    height: 25px;
  }

  .flower-speech-bubble {
    top: -40px;
    padding: 8px 12px;
  }

  .speech-text {
    font-size: 0.8rem;
  }
}
