/* ==========================================================================
   HỒ GƯƠM 88 - "MỘT CHÚT HÀ NỘI GIỮA LÒNG SÀI GÒN"
   UI Sáng sủa, Tinh tế, Hiện đại theo Logo Quán
   Mobile-First, Single-Screen (100dvh No-Scroll), Siêu Mượt, Load Cực Nhanh
   ========================================================================== */

:root {
  /* Bảng màu sáng sủa, sang trọng theo Logo Hồ Gươm */
  --primary-navy: #0F2D4A;
  --primary-blue: #1A446C;
  --accent-leaf: #2A9D8F;         /* Xanh ngọc bích / Lục trúc tươi */
  --accent-leaf-bright: #10B981;  /* Xanh lá tươi sáng */
  --accent-gold: #F59E0B;         /* Vàng ấm áp */
  --bg-deep: #0C1E30;             /* Nền xanh đêm sáng sủa */
  --bg-surface: #132D46;
  --bg-card: rgba(22, 49, 74, 0.82); /* Kính mờ trong trẻo */
  --bg-card-border: rgba(255, 255, 255, 0.18);
  --text-main: #FFFFFF;
  --text-sub: #E2E8F0;
  --text-slogan: #A7F3D0;         /* Xanh cốm tươi */
  --text-muted: #94A3B8;
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius-xl: 18px;
  --radius-md: 12px;
  --safe-bottom: env(safe-area-inset-bottom, 12px);
  --safe-top: env(safe-area-inset-top, 10px);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

html, body {
  width: 100%;
  height: 100%;
  height: 100dvh;
  overflow: hidden;
  background-color: var(--bg-deep);
  font-family: var(--font-family);
  color: var(--text-main);
  position: fixed;
}

/* Background Ambient Glow - Sắc màu sáng sủa, trong trẻo */
.ambient-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background: radial-gradient(circle at 50% 20%, #163653 0%, #0C1E30 100%);
}

.ambient-blob-1 {
  position: absolute;
  top: -5%;
  left: 10%;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(0, 180, 216, 0.35) 0%, transparent 70%);
  filter: blur(50px);
  animation: floatOrb 8s ease-in-out infinite alternate;
}

.ambient-blob-2 {
  position: absolute;
  bottom: 5%;
  right: -5%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.28) 0%, transparent 70%);
  filter: blur(60px);
  animation: floatOrb 10s ease-in-out infinite alternate-reverse;
}

.ambient-blob-3 {
  position: absolute;
  top: 45%;
  left: 20%;
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.15) 0%, transparent 70%);
  filter: blur(70px);
}

@keyframes floatOrb {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-20px, 15px) scale(1.15); }
}

/* Canvas Confetti */
#confetti-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 50;
}

/* App Container - Vừa vặn 1 màn hình di động 100dvh */
.app-container {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 440px;
  height: 100%;
  height: 100dvh;
  margin: 0 auto;
  padding: calc(var(--safe-top) + 8px) 14px calc(var(--safe-bottom) + 8px) 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
}

/* 1. Header Section - Logo & Slogan Quán */
.header-section {
  display: flex;
  align-items: center;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.25);
}

.brand-info {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  cursor: pointer;
}

.brand-logo-img {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 2px solid var(--accent-leaf-bright);
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.35);
  object-fit: cover;
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1;
  min-width: 0;
}

.brand-text h1 {
  font-size: 17.5px;
  font-weight: 800;
  letter-spacing: -0.2px;
  background: linear-gradient(90deg, #FFFFFF 30%, #A7F3D0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.2;
}

.brand-slogan {
  font-size: 11.5px;
  color: var(--text-slogan);
  font-weight: 500;
  letter-spacing: 0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}

/* 2. Meme Main Stage (Trung tâm - Đã bỏ meme-header-bar) */
.meme-stage {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.35);
  position: relative;
  cursor: pointer;
}

/* Tag nổi nhỏ gọn trên meme */
.meme-tag-floating {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 20;
  background: rgba(13, 30, 48, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(245, 158, 11, 0.45);
  color: #FEF08A;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Meme Viewport */
.meme-media-wrapper {
  flex: 1;
  min-height: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #081522;
  position: relative;
  overflow: hidden;
}

.hidden {
  display: none !important;
}

.meme-img, .meme-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.25s ease;
}

.meme-video {
  pointer-events: none;
  background: #081522;
}

.meme-img.pop-in, .meme-video.pop-in {
  animation: memePop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes memePop {
  0% { transform: scale(0.88); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* Tap Hint */
.tap-hint {
  position: absolute;
  bottom: 8px;
  right: 8px;
  z-index: 20;
  background: rgba(8, 21, 34, 0.78);
  backdrop-filter: blur(4px);
  color: rgba(255, 255, 255, 0.9);
  font-size: 10.5px;
  padding: 3px 9px;
  border-radius: 20px;
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 4px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

/* Floating Hearts / Emojis */
.heart-float {
  position: absolute;
  pointer-events: none;
  font-size: 28px;
  animation: floatUpFade 1s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  z-index: 60;
}

@keyframes floatUpFade {
  0% { transform: translate(-50%, 0) scale(0.5); opacity: 1; }
  100% { transform: translate(calc(-50% + (var(--rand-x, 0) * 1px)), -120px) scale(1.4); opacity: 0; }
}

/* Caption Box */
.meme-caption-box {
  padding: 9px 12px;
  background: rgba(14, 34, 52, 0.96);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}

.meme-caption-box h3 {
  font-size: 14px;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 2px;
}

.meme-caption-box p {
  font-size: 12px;
  line-height: 1.35;
  color: var(--text-sub);
}

/* 3. Rating & 5-Star Call Section */
.rating-section {
  background: linear-gradient(135deg, rgba(26, 68, 108, 0.4), rgba(42, 157, 143, 0.25));
  border: 1px solid rgba(167, 243, 208, 0.3);
  border-radius: var(--radius-md);
  padding: 8px 10px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  position: relative;
  overflow: hidden;
}

.rating-title {
  font-size: 13px;
  font-weight: 700;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  gap: 6px;
}

.stars-row {
  display: flex;
  gap: 6px;
  cursor: pointer;
  padding: 2px 0;
}

.star-btn {
  font-size: 24px;
  color: var(--accent-gold);
  filter: drop-shadow(0 0 6px rgba(245, 158, 11, 0.7));
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: inline-block;
}

.star-btn:active {
  transform: scale(1.4) rotate(15deg);
}

.rating-desc {
  font-size: 11px;
  color: #E2E8F0;
  line-height: 1.3;
}

.rating-desc strong {
  color: #FEF08A;
}

/* 4. Support & Hotline Section (Cứu sao) */
.support-section {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.support-warning-text {
  font-size: 10.5px;
  line-height: 1.35;
  color: #CBD5E1;
  text-align: center;
}

.support-warning-text span {
  color: #F87171;
  font-weight: 700;
}

.actions-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 8px;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  border: none;
}

.action-btn:active {
  transform: scale(0.95);
}

/* Nút Hotline Xanh Lá Tươi Sáng */
.btn-hotline {
  background: linear-gradient(135deg, #10B981, #059669);
  color: #FFFFFF;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
  animation: pulseButton 2.5s infinite;
}

@keyframes pulseButton {
  0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.45); }
  50% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
}

/* Nút Zalo Xanh Biển Hồ Gươm */
.btn-zalo {
  background: linear-gradient(135deg, #0284C7, #0369A1);
  color: #FFFFFF;
  box-shadow: 0 4px 15px rgba(2, 132, 199, 0.4);
}

.btn-icon {
  font-size: 14px;
}

/* Small Screens Tweaks (Màn hình ngắn dưới 680px) */
@media (max-height: 680px) {
  .app-container {
    gap: 5px;
    padding-top: calc(var(--safe-top) + 4px);
    padding-bottom: calc(var(--safe-bottom) + 4px);
  }
  .header-section {
    padding: 6px 10px;
  }
  .brand-logo-img {
    width: 38px;
    height: 38px;
  }
  .brand-text h1 {
    font-size: 15px;
  }
  .brand-slogan {
    font-size: 10.5px;
  }
  .meme-caption-box {
    padding: 6px 10px;
  }
  .meme-caption-box h3 {
    font-size: 12px;
  }
  .meme-caption-box p {
    font-size: 10.5px;
  }
  .star-btn {
    font-size: 20px;
  }
  .action-btn {
    padding: 7px 6px;
    font-size: 11.5px;
  }
}
