/* =============================================
   GLOBAL RESET & BASE
   ============================================= */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --gold: #FFD700;
  --gold-light: #FFE55C;
  --gold-dark: #C9A227;
  --red: #8B0000;
  --red-mid: #A51C1C;
  --red-light: #C0392B;
  --red-bright: #E74C3C;
  --bg-dark: #0a0404;
  --bg-overlay: rgba(8, 2, 2, 0.82);
  --text-gold: #FFD700;
  --text-cream: #FFF5E1;
  --shadow-gold: 0 0 20px rgba(255, 215, 0, 0.6);
  --shadow-red: 0 0 20px rgba(139, 0, 0, 0.8);
  --font: 'Be Vietnam Pro', sans-serif;
}

html, body {
  width: 100%;
  min-height: 100vh;
  font-family: var(--font);
  background: var(--bg-dark);
  color: var(--text-cream);
  overflow-x: hidden;
}

/* =============================================
   BACKGROUND
   ============================================= */
body {
  background-image: 
    radial-gradient(ellipse at 50% 0%, rgba(139,0,0,0.35) 0%, transparent 60%),
    url('https://images.unsplash.com/photo-1600585154340-be6161a56a0c?w=1920&q=80');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

.bg-overlay {
  position: fixed;
  inset: 0;
  background: 
    radial-gradient(ellipse at center top, rgba(120,0,0,0.4) 0%, transparent 55%),
    linear-gradient(to bottom, rgba(5,0,0,0.75) 0%, rgba(8,2,2,0.88) 100%);
  z-index: 0;
  pointer-events: none;
}

/* Floating gold particles */
.bg-particles {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.particle {
  position: absolute;
  border-radius: 50%;
  animation: floatUp linear infinite;
  opacity: 0;
}

@keyframes floatUp {
  0%   { opacity: 0; transform: translateY(0) scale(0.5); }
  10%  { opacity: 0.8; }
  90%  { opacity: 0.5; }
  100% { opacity: 0; transform: translateY(-100vh) scale(1.2); }
}

/* =============================================
   MAIN WRAPPER
   ============================================= */
.main-wrapper {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  padding: 20px 16px 80px;
  gap: 20px;
}

/* =============================================
   HEADER
   ============================================= */
.site-header {
  text-align: center;
  position: relative;
  padding: 10px 0 0;
}

.header-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 400px;
  height: 60px;
  background: radial-gradient(ellipse, rgba(255,215,0,0.15) 0%, transparent 70%);
  pointer-events: none;
}

.site-title {
  font-size: clamp(1.4rem, 4vw, 2.2rem);
  font-weight: 900;
  letter-spacing: 0.05em;
  color: var(--gold);
  text-shadow: 0 0 20px rgba(255,215,0,0.8), 0 0 40px rgba(255,200,0,0.4);
  animation: pulseTitle 3s ease-in-out infinite;
}

.site-subtitle {
  font-size: clamp(0.75rem, 2vw, 1rem);
  font-weight: 400;
  color: rgba(255,215,0,0.7);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-top: 4px;
}

@keyframes pulseTitle {
  0%, 100% { text-shadow: 0 0 20px rgba(255,215,0,0.8), 0 0 40px rgba(255,200,0,0.4); }
  50%       { text-shadow: 0 0 30px rgba(255,215,0,1), 0 0 60px rgba(255,200,0,0.7), 0 0 80px rgba(255,150,0,0.3); }
}

/* =============================================
   BAN THO SECTION
   ============================================= */
.bantho-section {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 10px;
  width: 100%;
  max-width: 760px;
  position: relative;
}

/* --- Câu đối --- */
.cau-doi {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.cau-doi-inner {
  background: linear-gradient(180deg, #8B0000 0%, #5a0000 100%);
  border: 2px solid var(--gold-dark);
  border-radius: 6px;
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  box-shadow: 0 0 15px rgba(139,0,0,0.6), inset 0 0 10px rgba(255,215,0,0.05);
}

.cau-doi-inner span {
  font-size: clamp(0.85rem, 2.5vw, 1.1rem);
  font-weight: 700;
  color: var(--gold);
  text-shadow: 0 0 8px rgba(255,215,0,0.6);
  line-height: 1;
  writing-mode: vertical-rl;
  letter-spacing: 2px;
}

.chuoi-tien {
  width: clamp(36px, 8vw, 60px);
  object-fit: contain;
  filter: drop-shadow(0 0 6px rgba(255,215,0,0.5));
  animation: swingChuoi 4s ease-in-out infinite;
}

@keyframes swingChuoi {
  0%, 100% { transform: rotate(-3deg); }
  50%       { transform: rotate(3deg); }
}

/* --- Bàn thờ chính --- */
.bantho-main {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  max-width: 460px;
}

/* Đèn lồng */
.den-long {
  position: absolute;
  top: -30px;
  width: clamp(50px, 12vw, 90px);
  object-fit: contain;
  filter: drop-shadow(0 0 15px rgba(255,150,0,0.9)) drop-shadow(0 0 30px rgba(255,100,0,0.6));
  animation: glowDenLong 2s ease-in-out infinite alternate;
  z-index: 5;
}

.den-long-trai { left: -15px; transform: rotate(-5deg); }
.den-long-phai { right: -15px; transform: rotate(5deg) scaleX(-1); }

@keyframes glowDenLong {
  from { filter: drop-shadow(0 0 12px rgba(255,150,0,0.8)) drop-shadow(0 0 25px rgba(255,100,0,0.5)); }
  to   { filter: drop-shadow(0 0 20px rgba(255,200,0,1))   drop-shadow(0 0 40px rgba(255,130,0,0.8)); }
}

/* Khung bàn thờ */
.bantho-frame {
  width: 100%;
  background: linear-gradient(180deg, #6b0000 0%, #3d0000 50%, #1a0000 100%);
  border: 3px solid var(--gold-dark);
  border-radius: 12px 12px 6px 6px;
  padding: 12px 10px 0;
  box-shadow:
    0 0 30px rgba(200,0,0,0.5),
    0 0 60px rgba(139,0,0,0.3),
    inset 0 0 20px rgba(255,215,0,0.08),
    inset 0 1px 0 rgba(255,215,0,0.3);
  position: relative;
  overflow: hidden;
}

.bantho-frame::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold), #FFF5CC, var(--gold), transparent);
  border-radius: 12px 12px 0 0;
}

/* Top label */
.bantho-top-label {
  display: flex;
  justify-content: space-between;
  padding: 0 8px;
  margin-bottom: 6px;
}

.bantho-top-label span {
  font-size: clamp(0.6rem, 1.8vw, 0.85rem);
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--gold);
  text-shadow: 0 0 10px rgba(255,215,0,0.7);
}

/* Thần tài container */
.than-container {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 4px;
}

.than-glow {
  position: absolute;
  top: 20%;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(255,215,0,0.15) 0%, transparent 70%);
  pointer-events: none;
  animation: pulseGlow 3s ease-in-out infinite;
}

@keyframes pulseGlow {
  0%, 100% { transform: translateX(-50%) scale(1); opacity: 0.8; }
  50%       { transform: translateX(-50%) scale(1.2); opacity: 1; }
}

.than-tai-img {
  width: clamp(110px, 28vw, 200px);
  object-fit: contain;
  filter: drop-shadow(0 0 12px rgba(255,200,0,0.4));
  position: relative;
  z-index: 2;
  transition: filter 0.3s;
}

.than-label {
  display: flex;
  gap: 20px;
  padding: 2px 0;
}

.than-label span {
  font-size: clamp(0.55rem, 1.6vw, 0.8rem);
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--gold-light);
  text-shadow: 0 0 8px rgba(255,215,0,0.6);
}

/* Bàn thờ items */
.bantho-items {
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  padding: 4px 2px 0;
  gap: 3px;
}

.item-binh-hoa, .item-dia-hoa, .item-mo, .item-nen-tho {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.binh-hoa-img {
  width: clamp(30px, 7vw, 55px);
  object-fit: contain;
  filter: drop-shadow(0 0 6px rgba(255,215,0,0.3));
}

.dia-hoa-img {
  width: clamp(42px, 10vw, 80px);
  object-fit: contain;
  filter: drop-shadow(0 0 8px rgba(255,180,0,0.4));
}

.mo-img {
  width: clamp(28px, 7vw, 50px);
  object-fit: contain;
  filter: drop-shadow(0 0 5px rgba(200,150,0,0.4));
}

/* Bát hương */
.bat-huong {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.bat-huong-body {
  width: clamp(42px, 10vw, 70px);
  height: clamp(30px, 7vw, 48px);
  background: linear-gradient(180deg, #8B4513 0%, #5C2E00 50%, #3a1a00 100%);
  border: 2px solid var(--gold-dark);
  border-radius: 50% 50% 0 0 / 60% 60% 0 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: 0 0 10px rgba(255,150,0,0.3), inset 0 1px 0 rgba(255,215,0,0.3);
}

.bat-label {
  font-size: clamp(0.55rem, 1.5vw, 0.75rem);
  font-weight: 800;
  color: var(--gold);
  text-shadow: 0 0 6px rgba(255,215,0,0.8);
  letter-spacing: 0.1em;
  position: absolute;
  bottom: 4px;
}

.bat-huong-base {
  width: clamp(46px, 11vw, 76px);
  height: 6px;
  background: linear-gradient(90deg, #4a2000, #8B4513, #C9A227, #8B4513, #4a2000);
  border-radius: 0 0 4px 4px;
}

/* =============================================
   NÉN NHANG – THỰC TẾ HƠN
   ============================================= */
.nen-nhang-container {
  position: absolute;
  top: -65px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 4px;
  width: 100%;
}

/* Nhang chưa cháy – màu đỏ/nâu đậm */
.nen-nhang {
  position: relative;
  transform-origin: bottom center;
}

/* Que nhang */
.nen-nhang .nhang-stick {
  width: 3px;
  border-radius: 2px 2px 0 0;
  position: relative;
  /* Gradient: đầu cháy màu đỏ cam → thân đỏ thẫm → gốc nâu */
  background: linear-gradient(
    to bottom,
    #ff3300 0%,
    #cc2200 15%,
    #8B1500 35%,
    #6b1200 55%,
    #4a0d00 75%,
    #2d0800 100%
  );
  animation: nhangFlicker 1.8s ease-in-out infinite;
}

/* Tro ở đầu nhang cháy */
.nen-nhang .nhang-stick::before {
  content: '';
  position: absolute;
  top: -3px;
  left: 50%;
  transform: translateX(-50%);
  width: 5px;
  height: 5px;
  background: radial-gradient(circle, #aaa 0%, #777 60%, transparent 100%);
  border-radius: 50%;
  opacity: 0.85;
}

/* Lửa nhang */
.nen-nhang .nhang-flame {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.nen-nhang .flame-outer {
  width: 7px;
  height: 12px;
  background: radial-gradient(ellipse at bottom, #ff6600 0%, #ff3300 40%, rgba(255,50,0,0) 100%);
  border-radius: 50% 50% 30% 30%;
  animation: flameDance 0.4s ease-in-out infinite alternate;
  filter: blur(0.5px);
}

.nen-nhang .flame-inner {
  position: absolute;
  top: 3px;
  width: 4px;
  height: 8px;
  background: radial-gradient(ellipse at bottom, #fff7aa 0%, #ffcc00 50%, rgba(255,180,0,0) 100%);
  border-radius: 50% 50% 30% 30%;
  animation: flameDance 0.35s ease-in-out infinite alternate-reverse;
  filter: blur(0.3px);
}

.nen-nhang .flame-core {
  position: absolute;
  top: 5px;
  width: 2px;
  height: 5px;
  background: linear-gradient(to top, #fff 0%, #fffde0 100%);
  border-radius: 50%;
  opacity: 0.9;
}

/* Khói nhang */
.nen-nhang .nhang-smoke {
  position: absolute;
  top: -26px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 20px;
  pointer-events: none;
}

.nhang-smoke-particle {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(200,200,200,0.55);
  animation: nhangSmoke 2.5s ease-in-out infinite;
  opacity: 0;
}

.nhang-smoke-particle:nth-child(1) { animation-delay: 0s; }
.nhang-smoke-particle:nth-child(2) { animation-delay: 0.8s; }
.nhang-smoke-particle:nth-child(3) { animation-delay: 1.6s; }

@keyframes nhangSmoke {
  0%   { opacity: 0; transform: translateX(-50%) translateY(0) scale(0.5); }
  15%  { opacity: 0.5; }
  70%  { opacity: 0.2; }
  100% { opacity: 0; transform: translateX(calc(-50% + var(--dx,0px))) translateY(-22px) scale(2.5); }
}

@keyframes nhangFlicker {
  0%, 100% { transform: rotate(-0.8deg); }
  30%       { transform: rotate(1.2deg); }
  60%       { transform: rotate(-1deg); }
}

@keyframes flameDance {
  from { transform: scaleX(0.85) scaleY(0.9) skewX(-4deg); }
  to   { transform: scaleX(1.15) scaleY(1.1) skewX(4deg); }
}

/* Nhang sắp tàn – hiển thị tro nhiều hơn, lửa mờ hơn */
.nen-nhang.sap-tan .nhang-stick {
  background: linear-gradient(
    to bottom,
    #888 0%,
    #aaa 20%,
    #777 30%,
    #8B1500 50%,
    #4a0d00 80%,
    #2d0800 100%
  );
  opacity: 0.7;
}
.nen-nhang.sap-tan .flame-outer { opacity: 0.4; }
.nen-nhang.sap-tan .flame-inner { opacity: 0.3; }

/* Khói từ bát hương */
.khoi-bat-container {
  position: absolute;
  top: -120px;
  width: 60px;
  height: 80px;
  pointer-events: none;
}

.khoi-particle {
  position: absolute;
  bottom: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(200,200,200,0.6);
  animation: khoiFloat 3s ease-in-out infinite;
  opacity: 0;
}

@keyframes khoiFloat {
  0%   { opacity: 0; transform: translateX(0) translateY(0) scale(0.5); }
  20%  { opacity: 0.6; }
  80%  { opacity: 0.2; }
  100% { opacity: 0; transform: translateX(var(--dx, 0)) translateY(-80px) scale(2); }
}

/* =============================================
   ĐÈN NẾN THỜ – 2 BÊN BÀN THỜ
   ============================================= */
.item-nen-tho {
  position: relative;
  flex-shrink: 0;
}

.nen-tho-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Thân nến */
.nen-tho-body {
  width: clamp(10px, 2.5vw, 16px);
  height: clamp(40px, 10vw, 65px);
  background: linear-gradient(
    to right,
    #cc0000 0%,
    #ff2222 25%,
    #ff5555 45%,
    #ff2222 65%,
    #cc0000 85%,
    #990000 100%
  );
  border-radius: 2px 2px 1px 1px;
  position: relative;
  box-shadow:
    inset -3px 0 6px rgba(0,0,0,0.4),
    inset 2px 0 4px rgba(255,150,150,0.3),
    0 0 8px rgba(255,0,0,0.3);
}

/* Nắp nến (sáp chảy) */
.nen-tho-body::before {
  content: '';
  position: absolute;
  top: -3px;
  left: -1px;
  right: -1px;
  height: 5px;
  background: linear-gradient(to bottom, #ff8888 0%, #cc3333 100%);
  border-radius: 3px 3px 0 0;
}

/* Sáp chảy xuống bên hông */
.nen-tho-body::after {
  content: '';
  position: absolute;
  top: 4px;
  right: -2px;
  width: 4px;
  height: 10px;
  background: linear-gradient(to bottom, #ff6666, #cc3333, transparent);
  border-radius: 0 2px 3px 0;
  opacity: 0.7;
}

/* Đế nến */
.nen-tho-de {
  width: clamp(16px, 4vw, 24px);
  height: clamp(5px, 1.5vw, 8px);
  background: linear-gradient(to bottom, #aa8800, var(--gold-dark), #aa8800);
  border-radius: 3px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.5);
}

/* Lửa nến */
.nen-tho-lua {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  height: clamp(20px, 5vw, 30px);
  width: clamp(16px, 4vw, 22px);
  margin-bottom: 1px;
}

.nen-tho-lua .lua-outer {
  position: absolute;
  bottom: 0;
  width: clamp(10px, 2.5vw, 16px);
  height: clamp(18px, 4.5vw, 26px);
  background: radial-gradient(
    ellipse at 50% 85%,
    rgba(255,80,0,1) 0%,
    rgba(255,140,0,0.9) 35%,
    rgba(255,200,0,0.5) 65%,
    rgba(255,220,100,0) 100%
  );
  border-radius: 50% 50% 30% 30%;
  animation: nenThoFlame1 0.5s ease-in-out infinite alternate;
  filter: blur(0.8px);
}

.nen-tho-lua .lua-inner {
  position: absolute;
  bottom: 1px;
  width: clamp(6px, 1.5vw, 10px);
  height: clamp(12px, 3vw, 18px);
  background: radial-gradient(
    ellipse at 50% 80%,
    #fff7c0 0%,
    #ffe066 40%,
    #ff8800 75%,
    rgba(255,100,0,0) 100%
  );
  border-radius: 50% 50% 25% 25%;
  animation: nenThoFlame2 0.45s ease-in-out infinite alternate-reverse;
  filter: blur(0.3px);
}

.nen-tho-lua .lua-core {
  position: absolute;
  bottom: 2px;
  width: clamp(2px, 0.6vw, 4px);
  height: clamp(6px, 1.5vw, 10px);
  background: linear-gradient(to top, #ffffff 0%, #fff8d0 100%);
  border-radius: 50% 50% 0 0;
  opacity: 0.95;
}

/* Vầng sáng xung quanh lửa nến */
.nen-tho-lua::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: clamp(24px, 6vw, 40px);
  height: clamp(24px, 6vw, 40px);
  background: radial-gradient(circle, rgba(255,180,0,0.35) 0%, rgba(255,120,0,0.15) 50%, transparent 75%);
  border-radius: 50%;
  animation: nenGlow 2s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes nenThoFlame1 {
  from { transform: scaleX(0.88) scaleY(0.92) rotate(-2deg); }
  to   { transform: scaleX(1.12) scaleY(1.08) rotate(2deg); }
}

@keyframes nenThoFlame2 {
  from { transform: scaleX(0.9) scaleY(0.95) rotate(3deg); }
  to   { transform: scaleX(1.1) scaleY(1.05) rotate(-3deg); }
}

@keyframes nenGlow {
  from { opacity: 0.6; transform: translateX(-50%) scale(0.9); }
  to   { opacity: 1; transform: translateX(-50%) scale(1.1); }
}

/* Khói nhẹ từ nến thờ */
.nen-khoi {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  pointer-events: none;
}

/* Ánh sáng hắt lên từ nến */
.nen-tho-wrapper::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 80px;
  background: radial-gradient(ellipse at 50% 0%, rgba(255,160,0,0.12) 0%, transparent 70%);
  pointer-events: none;
  animation: nenAmbient 2.5s ease-in-out infinite alternate;
}

@keyframes nenAmbient {
  from { opacity: 0.5; }
  to   { opacity: 1; }
}

/* Đế bàn thờ */
.bantho-base {
  height: 16px;
  background: linear-gradient(90deg, #4a0000, var(--red-mid), #8B0000, var(--red-mid), #4a0000);
  border-top: 2px solid var(--gold-dark);
  margin: 0 -10px;
  position: relative;
  overflow: hidden;
}

.base-pattern {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    90deg,
    transparent 0px,
    transparent 10px,
    rgba(255,215,0,0.15) 10px,
    rgba(255,215,0,0.15) 12px
  );
}

/* Chuông */
.chuong-wrapper {
  position: absolute;
  right: -20px;
  bottom: 20px;
  z-index: 3;
}

.chuong-img {
  width: clamp(36px, 9vw, 60px);
  object-fit: contain;
  cursor: pointer;
  filter: drop-shadow(0 0 8px rgba(255,215,0,0.5));
  transition: transform 0.1s, filter 0.3s;
}

.chuong-img:hover {
  filter: drop-shadow(0 0 14px rgba(255,215,0,0.9));
}

.chuong-img.rung {
  animation: rungChuong 0.5s ease-in-out;
}

@keyframes rungChuong {
  0%   { transform: rotate(0deg); }
  15%  { transform: rotate(20deg); }
  35%  { transform: rotate(-20deg); }
  55%  { transform: rotate(12deg); }
  70%  { transform: rotate(-12deg); }
  85%  { transform: rotate(6deg); }
  100% { transform: rotate(0deg); }
}

/* =============================================
   NHANG COUNTER
   ============================================= */
.nhang-counter {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(80,0,0,0.6);
  border: 1px solid rgba(255,215,0,0.3);
  border-radius: 50px;
  padding: 6px 20px;
  font-size: 0.85rem;
  font-weight: 500;
  color: rgba(255,215,0,0.85);
  backdrop-filter: blur(8px);
  flex-wrap: wrap;
  justify-content: center;
}

.counter-icon { font-size: 1.1rem; }

.nhang-reset-info {
  font-size: 0.72rem;
  color: rgba(255,215,0,0.5);
  font-style: italic;
  margin-left: 4px;
}

/* =============================================
   ACTION BUTTONS
   ============================================= */
.action-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.btn-thap, .btn-chuong {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: 50px;
  font-family: var(--font);
  font-size: clamp(0.8rem, 2.5vw, 0.95rem);
  font-weight: 700;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.btn-thap::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.15) 0%, transparent 100%);
  border-radius: 50px;
}

.btn-thap-1 {
  background: linear-gradient(135deg, #8B0000 0%, #C0392B 50%, #8B0000 100%);
  color: var(--gold);
  border: 1.5px solid var(--gold-dark);
  box-shadow: 0 4px 15px rgba(139,0,0,0.6), 0 0 20px rgba(200,50,50,0.3);
}

.btn-thap-1:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 6px 25px rgba(139,0,0,0.8), 0 0 30px rgba(255,100,0,0.4);
  color: var(--gold-light);
}

.btn-thap-3 {
  background: linear-gradient(135deg, #5a0000 0%, #8B0000 50%, #5a0000 100%);
  color: var(--gold);
  border: 1.5px solid var(--gold-dark);
  box-shadow: 0 4px 15px rgba(90,0,0,0.6), 0 0 20px rgba(180,0,0,0.3);
}

.btn-thap-3:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 6px 25px rgba(90,0,0,0.8), 0 0 30px rgba(255,80,0,0.4);
  color: var(--gold-light);
}

.btn-chuong {
  background: linear-gradient(135deg, #3d2000 0%, #6b3800 50%, #3d2000 100%);
  color: var(--gold);
  border: 1.5px solid var(--gold-dark);
  box-shadow: 0 4px 15px rgba(61,32,0,0.6);
}

.btn-chuong:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 6px 25px rgba(107,56,0,0.8), 0 0 30px rgba(255,200,0,0.3);
  color: var(--gold-light);
}

.btn-thap:active, .btn-chuong:active {
  transform: translateY(0) scale(0.98);
}

.btn-icon {
  font-size: 1.1rem;
}

/* =============================================
   CẦU NGUYỆN SECTION
   ============================================= */
.cau-nguyen-section {
  width: 100%;
  max-width: 520px;
}

.cau-nguyen-card {
  background: linear-gradient(135deg, rgba(80,0,0,0.75) 0%, rgba(40,0,0,0.85) 100%);
  border: 2px solid rgba(255,215,0,0.35);
  border-radius: 16px;
  padding: 20px;
  backdrop-filter: blur(10px);
  box-shadow: 0 0 30px rgba(139,0,0,0.4), inset 0 0 20px rgba(255,215,0,0.04);
}

.cau-nguyen-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 14px;
}

.cau-nguyen-header h2 {
  font-size: clamp(0.9rem, 2.5vw, 1.1rem);
  font-weight: 900;
  letter-spacing: 0.12em;
  color: var(--gold);
  text-shadow: 0 0 12px rgba(255,215,0,0.6);
}

.nguyen-icon { font-size: 1.2rem; }

.cau-nguyen-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Input tên */
.cau-nguyen-name {
  width: 100%;
  background: rgba(20,0,0,0.7);
  border: 1.5px solid rgba(255,215,0,0.3);
  border-radius: 10px;
  color: var(--text-cream);
  font-family: var(--font);
  font-size: 0.9rem;
  padding: 10px 14px;
  outline: none;
  transition: border-color 0.25s, box-shadow 0.25s;
}

.cau-nguyen-name::placeholder {
  color: rgba(255,215,0,0.35);
  font-style: italic;
}

.cau-nguyen-name:focus {
  border-color: rgba(255,215,0,0.6);
  box-shadow: 0 0 12px rgba(255,215,0,0.12);
}

.cau-nguyen-input {
  width: 100%;
  background: rgba(20,0,0,0.7);
  border: 1.5px solid rgba(255,215,0,0.25);
  border-radius: 10px;
  color: var(--text-cream);
  font-family: var(--font);
  font-size: 0.9rem;
  line-height: 1.6;
  padding: 12px 14px;
  resize: none;
  outline: none;
  transition: border-color 0.25s, box-shadow 0.25s;
}

.cau-nguyen-input::placeholder {
  color: rgba(255,215,0,0.3);
  font-style: italic;
}

.cau-nguyen-input:focus {
  border-color: rgba(255,215,0,0.6);
  box-shadow: 0 0 15px rgba(255,215,0,0.15);
}

.btn-gui-cau-nguyen {
  align-self: flex-end;
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #8B0000, #C0392B);
  color: var(--gold);
  border: 1.5px solid var(--gold-dark);
  border-radius: 50px;
  padding: 10px 24px;
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s ease;
}

.btn-gui-cau-nguyen:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(200,0,0,0.5);
  color: var(--gold-light);
}

/* =============================================
   DANH SÁCH LỜI CẦU NGUYỆN
   ============================================= */
.prayer-list-section {
  width: 100%;
  max-width: 560px;
}

.prayer-list-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 14px;
}

.prayer-list-header h3 {
  font-size: clamp(0.9rem, 2.5vw, 1.05rem);
  font-weight: 800;
  color: var(--gold);
  letter-spacing: 0.1em;
  text-shadow: 0 0 10px rgba(255,215,0,0.5);
}

.prayer-list-header span { font-size: 1.1rem; }

.prayer-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 420px;
  overflow-y: auto;
  padding-right: 4px;
}

.prayer-list::-webkit-scrollbar { width: 4px; }
.prayer-list::-webkit-scrollbar-track { background: rgba(80,0,0,0.3); border-radius: 4px; }
.prayer-list::-webkit-scrollbar-thumb { background: var(--gold-dark); border-radius: 4px; }

.prayer-item {
  background: linear-gradient(135deg, rgba(80,0,0,0.65), rgba(30,0,0,0.8));
  border: 1px solid rgba(255,215,0,0.22);
  border-radius: 12px;
  padding: 12px 16px;
  backdrop-filter: blur(8px);
  position: relative;
  animation: prayerIn 0.5s ease;
  overflow: hidden;
}

.prayer-item::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 3px; height: 100%;
  background: linear-gradient(to bottom, var(--gold), var(--gold-dark));
  border-radius: 2px 0 0 2px;
}

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

.prayer-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.prayer-item-name {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--gold);
  text-shadow: 0 0 8px rgba(255,215,0,0.4);
}

.prayer-item-name i {
  font-size: 0.8rem;
  opacity: 0.8;
}

.prayer-item-time {
  font-size: 0.72rem;
  color: rgba(255,215,0,0.45);
  font-style: italic;
}

.prayer-item-text {
  font-size: 0.88rem;
  color: rgba(255,245,225,0.88);
  line-height: 1.65;
  padding-left: 4px;
}

.prayer-item-icon {
  position: absolute;
  right: 12px;
  bottom: 10px;
  font-size: 1.1rem;
  opacity: 0.25;
}

.prayer-item-new {
  border-color: rgba(255, 215, 0, 0.55) !important;
  box-shadow: 0 0 12px rgba(255,215,0,0.18), inset 0 0 10px rgba(255,215,0,0.05);
  animation: prayerInNew 0.6s ease !important;
}

@keyframes prayerInNew {
  from { opacity: 0; transform: translateY(-14px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.prayer-new-badge {
  display: inline-flex;
  align-items: center;
  background: linear-gradient(90deg, #FFD700, #FF8C00);
  color: #3d1a00;
  font-size: 0.62rem;
  font-weight: 800;
  padding: 1px 7px;
  border-radius: 20px;
  letter-spacing: 0.5px;
  text-shadow: none;
  box-shadow: 0 0 6px rgba(255,215,0,0.5);
  animation: badgePulse 1.5s ease infinite;
}

@keyframes badgePulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.65; }
}

.prayer-loading {
  text-align: center;
  color: rgba(255,215,0,0.5);
  padding: 24px;
  font-size: 0.9rem;
}

.prayer-empty {
  text-align: center;
  color: rgba(255,215,0,0.4);
  padding: 30px;
  font-size: 0.9rem;
  font-style: italic;
}

/* =============================================
   HÒM CÔNG ĐỨC WIDGET
   ============================================= */
.hom-cong-duc-widget {
  position: fixed;
  bottom: 24px;
  right: 20px;
  z-index: 100;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hom-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: var(--gold);
  color: #3d0000;
  font-size: 0.7rem;
  font-weight: 900;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: pulseBadge 2s ease-in-out infinite;
  z-index: 2;
}

@keyframes pulseBadge {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255,215,0,0.5); }
  50%       { transform: scale(1.15); box-shadow: 0 0 0 8px rgba(255,215,0,0); }
}

.hom-img {
  width: clamp(65px, 14vw, 90px);
  object-fit: contain;
  filter: drop-shadow(0 0 12px rgba(255,215,0,0.5));
  transition: transform 0.25s, filter 0.25s;
  animation: floatHom 4s ease-in-out infinite;
}

.hom-img:hover {
  transform: scale(1.1);
  filter: drop-shadow(0 0 20px rgba(255,215,0,0.8));
}

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

.hom-tooltip {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.08em;
  text-shadow: 0 0 8px rgba(255,215,0,0.6);
  margin-top: 2px;
}

/* =============================================
   MODAL CÔNG ĐỨC
   ============================================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(6px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal-card {
  background: linear-gradient(160deg, #5a0000 0%, #2a0000 60%, #1a0000 100%);
  border: 2px solid var(--gold-dark);
  border-radius: 20px;
  padding: 30px 28px;
  max-width: 380px;
  width: calc(100% - 40px);
  position: relative;
  box-shadow:
    0 0 40px rgba(200,0,0,0.5),
    0 0 80px rgba(139,0,0,0.3),
    inset 0 0 20px rgba(255,215,0,0.05);
  animation: slideUpModal 0.3s ease;
}

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

.modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 50%;
  width: 30px;
  height: 30px;
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.modal-close:hover { background: rgba(255,255,255,0.2); }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 14px;
}

.modal-header h3 {
  font-size: clamp(0.9rem, 2.5vw, 1.05rem);
  font-weight: 800;
  color: var(--gold);
  text-align: center;
  letter-spacing: 0.08em;
  text-shadow: 0 0 12px rgba(255,215,0,0.5);
}

.modal-header span { font-size: 1.2rem; }

.modal-desc {
  font-size: 0.85rem;
  color: rgba(255,215,0,0.65);
  text-align: center;
  line-height: 1.7;
  margin-bottom: 18px;
}

.cong-duc-amounts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

.btn-amount {
  background: linear-gradient(135deg, rgba(100,0,0,0.7), rgba(60,0,0,0.8));
  border: 1.5px solid rgba(255,215,0,0.3);
  border-radius: 10px;
  color: var(--gold);
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 700;
  padding: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-amount:hover, .btn-amount.selected {
  background: linear-gradient(135deg, #8B0000, #C0392B);
  border-color: var(--gold);
  transform: scale(1.03);
  box-shadow: 0 0 15px rgba(255,215,0,0.2);
}

.modal-footer-note {
  text-align: center;
  font-size: 0.78rem;
  color: rgba(255,215,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 14px;
}

.btn-xac-nhan {
  width: 100%;
  background: linear-gradient(135deg, #8B0000, #C0392B, #8B0000);
  border: 1.5px solid var(--gold-dark);
  border-radius: 50px;
  color: var(--gold);
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 800;
  padding: 14px;
  cursor: pointer;
  letter-spacing: 0.08em;
  transition: all 0.25s;
  box-shadow: 0 4px 20px rgba(139,0,0,0.5);
}

.btn-xac-nhan:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 30px rgba(200,0,0,0.7);
  color: var(--gold-light);
}

/* =============================================
   TOAST
   ============================================= */
.toast-container {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 300;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background: linear-gradient(135deg, rgba(80,0,0,0.95), rgba(40,0,0,0.95));
  border: 1.5px solid var(--gold-dark);
  border-radius: 50px;
  color: var(--gold);
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 10px 24px;
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
  animation: toastIn 0.3s ease, toastOut 0.3s ease 2.5s forwards;
  white-space: nowrap;
  max-width: 90vw;
  text-align: center;
}

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

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

/* =============================================
   BLESSING OVERLAY
   ============================================= */
.blessing-overlay {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle, rgba(255,200,0,0.12) 0%, transparent 70%);
  z-index: 150;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s;
}

.blessing-overlay.active {
  opacity: 1;
  animation: blessingPulse 1.5s ease forwards;
}

@keyframes blessingPulse {
  0%   { opacity: 0; }
  30%  { opacity: 1; }
  70%  { opacity: 1; }
  100% { opacity: 0; }
}

.blessing-content {
  text-align: center;
  font-size: clamp(1.8rem, 6vw, 3rem);
  color: var(--gold);
  text-shadow: 0 0 30px rgba(255,215,0,0.8), 0 0 60px rgba(255,200,0,0.5);
  animation: scaleBlessing 1.5s ease forwards;
  font-weight: 900;
  letter-spacing: 0.1em;
  line-height: 1.4;
}

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

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 540px) {
  .bantho-section {
    gap: 4px;
  }

  .cau-doi-inner {
    padding: 8px 5px;
    gap: 4px;
  }

  .den-long-trai { left: -5px; }
  .den-long-phai { right: -5px; }

  .action-buttons {
    gap: 8px;
  }

  .btn-thap, .btn-chuong {
    padding: 10px 18px;
  }

  .cau-nguyen-card {
    padding: 16px;
  }

  .chuong-wrapper {
    right: -10px;
    bottom: 15px;
  }

  /* Nhang không bị ẩn dưới ảnh Thần Tài trên mobile */
  .nen-nhang-container {
    position: relative;
    top: unset;
    margin-bottom: -8px;
    z-index: 5;
  }

  .bat-huong-body {
    overflow: visible;
  }
}

@media (max-width: 400px) {
  .cau-doi {
    display: none;
  }

  .item-binh-hoa {
    display: none;
  }
}

/* =============================================
   SCROLLBAR
   ============================================= */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #0a0404; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(#8B0000, #C0392B);
  border-radius: 3px;
}
