/* ==========================================================================
   Kids Video Showcase - TikTok-Style Mobile E-Commerce Video Feed
   ========================================================================== */

:root {
  --primary: #4F46E5;
  --primary-hover: #4338CA;
  --secondary: #EC4899;
  --accent-green: #10B981;
  --bg-dark: #000000;
  --text-light: #FFFFFF;
  --text-muted: rgba(255, 255, 255, 0.82);
  --glass-bg: rgba(0, 0, 0, 0.5);
  --glass-border: rgba(255, 255, 255, 0.18);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

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

/* Background for Desktop / Web version */
html, body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background-color: #080C14;
  background-image: 
    radial-gradient(circle at 50% 10%, rgba(99, 102, 241, 0.25) 0%, transparent 45%),
    radial-gradient(circle at 80% 80%, rgba(236, 72, 153, 0.2) 0%, transparent 45%),
    radial-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 28px 28px;
  background-attachment: fixed;
  color: var(--text-light);
  display: flex;
  justify-content: center;
  align-items: center;
  user-select: none;
}

/* ==========================================================================
   Centered Smartphone Frame Container
   ========================================================================== */

.app-viewport-wrapper {
  position: relative;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background-color: #000000;
  overflow: hidden;
}

/* Desktop layout (screens wider than 480px) */
@media (min-width: 480px) {
  .app-viewport-wrapper {
    width: 420px;
    height: 92vh;
    height: 92dvh;
    max-height: 890px;
    border-radius: 40px;
    border: 5px solid rgba(255, 255, 255, 0.16);
    box-shadow: 
      0 25px 70px -10px rgba(0, 0, 0, 0.9),
      0 0 35px rgba(79, 70, 229, 0.2),
      0 0 0 1px rgba(255, 255, 255, 0.12);
  }
}

/* ==========================================================================
   Top Navigation Header (Two-Level Rubricator)
   ========================================================================== */

.app-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  padding-top: calc(var(--safe-top) + 10px);
  padding-bottom: 8px;
  background: linear-gradient(180deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.35) 75%, transparent 100%);
  pointer-events: none;
}

.header-row {
  display: flex;
  align-items: center;
  padding: 4px 12px;
  gap: 8px;
  pointer-events: auto;
}

.header-row-2 {
  padding: 2px 12px 4px 12px;
}

.btn-icon-header {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-full);
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  flex-shrink: 0;
  position: relative;
  transition: transform 0.15s ease, background 0.15s ease;
}

.btn-icon-header:active {
  transform: scale(0.92);
}

.btn-saved-filter.active {
  background: rgba(236, 72, 153, 0.45);
  border-color: #EC4899;
}

.saved-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background: #EC4899;
  color: white;
  font-size: 10px;
  font-weight: 700;
  min-width: 17px;
  height: 17px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.filter-scroll-container {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 2px 0;
  flex: 1;
}

.filter-scroll-container::-webkit-scrollbar {
  display: none;
}

.filter-pill {
  white-space: nowrap;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
}

.filter-pill.active {
  background: #FFFFFF;
  color: #000000;
  border-color: #FFFFFF;
  box-shadow: 0 2px 10px rgba(0,0,0,0.35);
  transform: scale(1.02);
}

.filter-pill-age {
  font-size: 12px;
  padding: 4px 10px;
}

/* ==========================================================================
   Full Screen Video Feed (Butter-Smooth Flex Scroll Snap)
   ========================================================================== */

.feed-container {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
  background-color: #000000;
  scrollbar-width: none;
}

.feed-container::-webkit-scrollbar {
  display: none;
}

/* Individual Slide (Strict 100% of container height - eliminates all snapping jitter) */
.video-slide {
  position: relative;
  width: 100%;
  height: 100%;
  flex: 0 0 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  overflow: hidden;
  background: radial-gradient(circle at center, #1e1b4b 0%, #0f172a 60%, #020617 100%);
}

/* Ambient blurred background layer for non-9:16 videos (square, 4:5, 16:9) */
.video-ambient-bg {
  position: absolute;
  inset: -20px;
  width: calc(100% + 40px);
  height: calc(100% + 40px);
  object-fit: cover;
  object-position: center;
  filter: blur(40px) brightness(0.35);
  opacity: 0.65;
  transform: scale(1.15);
  z-index: 0;
  pointer-events: none;
}

.video-poster,
.video-player {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.video-poster {
  z-index: 1;
  transition: opacity 0.4s ease;
}

.video-poster.fade-out {
  opacity: 0;
  pointer-events: none;
}

.video-player {
  z-index: 2;
  background-color: transparent;
}

/* Sound Hint Pill on first visit */
.sound-button-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.sound-hint-pill {
  position: absolute;
  top: 48px;
  right: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #4F46E5 0%, #EC4899 100%);
  color: #FFFFFF;
  padding: 7px 13px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: 0 4px 18px rgba(236, 72, 153, 0.45), 0 2px 8px rgba(0,0,0,0.3);
  cursor: pointer;
  z-index: 120;
  animation: hintBounce 2s infinite ease-in-out;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.sound-hint-pill::before {
  content: '';
  position: absolute;
  top: -5px;
  right: 14px;
  width: 10px;
  height: 10px;
  background: #4F46E5;
  transform: rotate(45deg);
  border-radius: 2px;
}

.sound-hint-pill.dismissed {
  opacity: 0;
  transform: translateY(-8px) scale(0.9);
  pointer-events: none;
}

@keyframes hintBounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(4px);
  }
}

/* Playback Indicator (TikTok-style Play / Pause Center Icon) */
.playback-indicator {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 12;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.indicator-circle {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  font-size: 30px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

.playback-indicator.paused {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.playback-indicator.fade-out {
  opacity: 0;
  transform: translate(-50%, -50%) scale(1.4);
}

/* Bottom Overlay */
.slide-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 5;
  background: linear-gradient(to top, rgba(0,0,0,0.92) 0%, rgba(0,0,0,0.55) 60%, transparent 100%);
  padding: 24px 16px calc(16px + var(--safe-bottom)) 16px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  pointer-events: none;
}

.slide-overlay > * {
  pointer-events: auto;
}

/* TikTok Side Actions (Right) */
.slide-actions {
  position: absolute;
  right: 14px;
  bottom: calc(86px + var(--safe-bottom));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  z-index: 10;
  pointer-events: auto;
}

.action-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.btn-action-circle {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  transition: transform 0.15s ease, background 0.15s ease;
}

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

.btn-save.saved {
  background: rgba(236, 72, 153, 0.45);
  border-color: #EC4899;
  animation: heartPop 0.35s ease;
}

@keyframes heartPop {
  0% { transform: scale(1); }
  50% { transform: scale(1.35); }
  100% { transform: scale(1); }
}

.save-count {
  font-size: 11px;
  font-weight: 700;
  color: #FFFFFF;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.85);
}

/* Slide Info (Bottom Left) */
.slide-meta-row {
  display: flex;
  gap: 6px;
  margin-bottom: 6px;
}

.meta-tag {
  display: inline-flex;
  align-self: flex-start;
  width: fit-content;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #fff;
}

.meta-tag-pages {
  background: rgba(79, 70, 229, 0.55);
}

.slide-title {
  font-size: 18px;
  font-weight: 800;
  color: #FFFFFF;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.85);
  line-height: 1.3;
  margin-bottom: 10px;
  max-width: 82%;
}

.slide-desc {
  display: none;
}

/* TikTok Shop Product Row */
/* Sound Button (High-Visibility when Muted) */
.btn-sound {
  position: relative;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Muted State: 2x larger icon and button, glowing pulse */
.btn-sound:not(.unmuted) {
  width: 52px;
  height: 52px;
  font-size: 26px;
  background: linear-gradient(135deg, #EF4444 0%, #EC4899 100%);
  border: 2px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.7), 0 4px 14px rgba(0, 0, 0, 0.5);
  animation: soundMutedPulse 1.8s infinite ease-in-out;
}

@keyframes soundMutedPulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.6), 0 4px 12px rgba(0, 0, 0, 0.4);
  }
  50% {
    transform: scale(1.12);
    box-shadow: 0 0 26px rgba(239, 68, 68, 0.95), 0 6px 18px rgba(0, 0, 0, 0.6);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.6), 0 4px 12px rgba(0, 0, 0, 0.4);
  }
}

/* Unmuted State: Normal size */
.btn-sound.unmuted {
  width: 38px;
  height: 38px;
  font-size: 16px;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid var(--glass-border);
  box-shadow: none;
  animation: none;
}

/* TikTok Shop Product Row (Reference matching) */
.slide-product-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: #0B0B0D;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 22px;
  padding: 4px 4px 4px 10px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.7);
  box-sizing: border-box;
}

.slide-footer-left {
  display: flex;
  align-items: center;
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
}

.feed-price-label-badge {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 1px;
  font-size: 11px;
  font-weight: 800;
  color: #FACC15;
  line-height: 1.15;
  text-transform: uppercase;
  letter-spacing: -0.2px;
  overflow: hidden;
  max-width: 100%;
}

.feed-price-label-badge .feed-price-label-line {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.feed-price-label-badge.legacy-fire-badge {
  flex-direction: row;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  font-weight: 900;
  color: #FACC15;
  line-height: 1.1;
  letter-spacing: -0.2px;
}

.feed-price-label-badge .fire-icon {
  font-size: 17px;
  line-height: 1;
  flex-shrink: 0;
}

.slide-footer-action-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  margin-left: auto;
}

.slide-price-box {
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  flex-shrink: 0;
}

.slide-price {
  font-size: 20px;
  font-weight: 900;
  color: #FFFFFF;
  letter-spacing: -0.4px;
  line-height: 1;
  white-space: nowrap;
}

.btn-buy {
  padding: 7px 14px 7px 12px;
  border-radius: 18px;
  border: none;
  color: #FFFFFF;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.15s ease, opacity 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-buy:active {
  transform: scale(0.96);
}

.btn-buy-paid {
  background: linear-gradient(135deg, #FF6B00 0%, #FF2200 100%);
  border: 1.5px solid #FFA040;
  box-shadow: 0 0 18px rgba(255, 77, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  animation: buyGlowPulse 2.2s infinite ease-in-out;
}

@keyframes buyGlowPulse {
  0% { box-shadow: 0 0 14px rgba(255, 77, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.35); }
  50% { box-shadow: 0 0 24px rgba(255, 77, 0, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.5); }
  100% { box-shadow: 0 0 14px rgba(255, 77, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.35); }
}

.buy-cart-icon {
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.buy-text-box {
  display: flex;
  flex-direction: column;
  text-align: left;
  line-height: 1.1;
}

.buy-main-title {
  font-size: 14px;
  font-weight: 900;
  color: #FFFFFF;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  font-style: italic;
}

.buy-subtitle {
  font-size: 9px;
  font-weight: 800;
  color: #FFE6D5;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  opacity: 0.95;
}

.buy-rays-icon {
  font-size: 13px;
  font-weight: 900;
  color: #FFFFFF;
  letter-spacing: -1px;
  opacity: 0.9;
  margin-left: 2px;
}

/* ==========================================================================
   Empty Feed State & Toasts
   ========================================================================== */

.empty-feed {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 30px;
  text-align: center;
}

.empty-icon {
  font-size: 56px;
  margin-bottom: 12px;
}

.empty-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 6px;
}

.empty-sub {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.btn-reset-filters {
  background: #fff;
  color: #0F172A;
  border: none;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
}

.toast-notification {
  position: absolute;
  top: calc(var(--safe-top) + 110px);
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: rgba(15, 23, 42, 0.92);
  color: #fff;
  padding: 10px 18px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 16px rgba(0,0,0,0.35);
  border: 1px solid var(--glass-border);
  white-space: nowrap;
}

.toast-notification.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ==========================================================================
   Legal & Meta Compliance Modal
   ========================================================================== */

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.legal-modal {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 90%;
  max-width: 380px;
  background: #FFFFFF;
  color: #1E293B;
  z-index: 250;
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  padding-top: var(--safe-top);
  box-shadow: 10px 0 30px rgba(0,0,0,0.25);
}

.legal-modal.active {
  transform: translateX(0);
}

.legal-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid #E2E8F0;
}

.legal-title {
  font-size: 18px;
  font-weight: 800;
  color: #0F172A;
}

.btn-close-modal {
  background: #F1F5F9;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  font-size: 16px;
  cursor: pointer;
}

.legal-nav {
  display: flex;
  overflow-x: auto;
  padding: 8px 16px;
  gap: 6px;
  border-bottom: 1px solid #E2E8F0;
  scrollbar-width: none;
}

.legal-nav-btn {
  white-space: nowrap;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  border: 1px solid #E2E8F0;
  background: transparent;
  font-size: 12px;
  font-weight: 600;
  color: #64748B;
  cursor: pointer;
}

.legal-nav-btn.active {
  background: #4F46E5;
  color: #fff;
  border-color: #4F46E5;
}

.legal-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.menu-categories {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.menu-cat-item {
  display: flex;
  align-items: center;
  padding: 16px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 16px;
  text-decoration: none;
  color: #0F172A;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.menu-cat-item:hover,
.menu-cat-item:active {
  background: #F1F5F9;
  border-color: #CBD5E1;
  transform: translateY(-1px);
}

.menu-cat-icon {
  font-size: 26px;
  margin-right: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.menu-cat-text {
  flex: 1;
  line-height: 1.3;
}

.menu-cat-arrow {
  color: #94A3B8;
  font-size: 20px;
  font-weight: 700;
  margin-left: 8px;
  flex-shrink: 0;
  transition: transform 0.15s ease, color 0.15s ease;
}

.menu-cat-item:hover .menu-cat-arrow,
.menu-cat-item:active .menu-cat-arrow {
  color: #0F172A;
  transform: translateX(3px);
}
/* DIAGNOSTIC TEST: Clean Video Container */
.video-ambient-bg {
  display: none !important;
}
* {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  filter: none !important;
  text-shadow: none !important;
  box-shadow: none !important;
}
.video-player {
  object-fit: cover !important;
  background: #000 !important;
}


/* Custom 3D Glass Morphism Icons (Matching Design Reference) */

/* Base circular button reset & styling */
.btn-action-circle,
.btn-icon-header.btn-saved-filter {
  position: relative;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease, border-color 0.2s ease;
}

/* 1. Share Icon (Поділитися) - Glass Circle with Curved Arrow & Blue Glow */
.btn-action-circle.btn-share {
  background: radial-gradient(circle at 35% 30%, rgba(76, 86, 106, 0.85) 0%, rgba(34, 40, 52, 0.9) 50%, rgba(13, 17, 23, 0.95) 100%) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.45) !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6), inset 0 2px 4px rgba(255, 255, 255, 0.3) !important;
}

.btn-action-circle.btn-share::before {
  content: '';
  position: absolute;
  top: 3px;
  left: 6px;
  right: 6px;
  height: 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.35) 0%, rgba(255, 255, 255, 0) 100%);
  border-radius: 20px 20px 0 0;
  pointer-events: none;
}

.btn-action-circle.btn-share .share-icon-svg {
  width: 22px;
  height: 22px;
  filter: drop-shadow(0 2px 4px rgba(29, 78, 216, 0.8)) drop-shadow(0 0 6px rgba(59, 130, 246, 0.9));
}

/* 2. Unsaved Heart Icon (В обране) - Dark Glass Circle with 3D White Outline Heart */
.btn-action-circle.btn-save:not(.saved),
.btn-saved-filter:not(.active) {
  background: radial-gradient(circle at 35% 30%, rgba(76, 86, 106, 0.85) 0%, rgba(34, 40, 52, 0.9) 50%, rgba(13, 17, 23, 0.95) 100%) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.45) !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6), inset 0 2px 4px rgba(255, 255, 255, 0.3) !important;
}

.btn-action-circle.btn-save:not(.saved)::before,
.btn-saved-filter:not(.active)::before {
  content: '';
  position: absolute;
  top: 3px;
  left: 6px;
  right: 6px;
  height: 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.35) 0%, rgba(255, 255, 255, 0) 100%);
  border-radius: 20px 20px 0 0;
  pointer-events: none;
}

.btn-action-circle.btn-save:not(.saved) .heart-icon-svg,
.btn-saved-filter:not(.active) .heart-icon-svg {
  width: 22px;
  height: 22px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5)) drop-shadow(0 0 4px rgba(255, 255, 255, 0.6));
}

/* 3. Saved Heart Icon (Обрані) - Radiant Red Glass Orb with Rays & Light Pink Filled Heart */
.btn-action-circle.btn-save.saved,
.btn-saved-filter.active {
  background: radial-gradient(circle at 35% 30%, #ff5277 0%, #e60039 55%, #990022 100%) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.7) !important;
  box-shadow: 0 0 16px rgba(255, 0, 64, 0.9), 0 4px 14px rgba(0, 0, 0, 0.5), inset 0 2px 6px rgba(255, 255, 255, 0.6) !important;
  animation: heartPopGlow 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-action-circle.btn-save.saved::before,
.btn-saved-filter.active::before {
  content: '';
  position: absolute;
  top: 3px;
  left: 6px;
  right: 6px;
  height: 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0) 100%);
  border-radius: 20px 20px 0 0;
  pointer-events: none;
}

/* Radiant Light Rays for Saved State */
.btn-action-circle.btn-save.saved::after,
.btn-saved-filter.active::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px dashed rgba(255, 77, 109, 0.85);
  box-shadow: 0 0 10px rgba(255, 0, 64, 0.7);
  pointer-events: none;
  animation: raysPulse 1.8s infinite ease-in-out;
}

.btn-action-circle.btn-save.saved .heart-icon-svg,
.btn-saved-filter.active .heart-icon-svg {
  width: 22px;
  height: 22px;
  filter: drop-shadow(0 2px 4px rgba(153, 0, 34, 0.6)) drop-shadow(0 0 6px rgba(255, 255, 255, 0.9));
}

@keyframes heartPopGlow {
  0% { transform: scale(1); }
  50% { transform: scale(1.25); box-shadow: 0 0 25px rgba(255, 0, 64, 1); }
  100% { transform: scale(1); }
}

@keyframes raysPulse {
  0%, 100% { opacity: 0.7; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.08); }
}


/* --- Unified Hamburger Menu & Legal Accordion --- */
.legal-modal-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 16px;
}

.menu-categories {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.menu-cat-item {
  display: flex;
  align-items: center;
  padding: 16px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 16px;
  text-decoration: none;
  color: #0F172A;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.menu-cat-item:hover,
.menu-cat-item:active {
  background: #F1F5F9;
  border-color: #CBD5E1;
  transform: translateY(-1px);
}

.menu-cat-icon {
  font-size: 26px;
  margin-right: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.menu-cat-text {
  flex: 1;
  line-height: 1.3;
}

.menu-cat-arrow {
  color: #94A3B8;
  font-size: 20px;
  font-weight: 700;
  margin-left: 8px;
  flex-shrink: 0;
  transition: transform 0.15s ease, color 0.15s ease;
}

.menu-legal-section {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #E2E8F0;
}

.menu-legal-title {
  font-size: 13px;
  font-weight: 700;
  color: #64748B;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

.menu-accordion {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.accordion-item {
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  background: #F8FAFC;
  overflow: hidden;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.accordion-item.active {
  background: #FFFFFF;
  border-color: #CBD5E1;
}

.accordion-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: none;
  border: none;
  font-size: 15px;
  font-weight: 600;
  color: #0F172A;
  cursor: pointer;
  text-align: left;
  user-select: none;
  outline: none;
  font-family: inherit;
}

.accordion-header:hover {
  background: #F1F5F9;
}

.accordion-arrow {
  font-size: 18px;
  color: #94A3B8;
  transition: transform 0.2s ease;
  font-weight: 700;
  display: inline-block;
}

.accordion-item.active .accordion-arrow {
  transform: rotate(90deg);
  color: #0F172A;
}

.accordion-content {
  display: none;
  padding: 0 16px 14px 16px;
  font-size: 13px;
  line-height: 1.6;
  color: #334155;
  border-top: 1px solid #F1F5F9;
}

.accordion-item.active .accordion-content {
  display: block;
}

.accordion-body-text h3 {
  font-size: 14px;
  font-weight: 700;
  color: #0F172A;
  margin: 10px 0 8px 0;
}

.accordion-body-text p {
  margin-bottom: 8px;
}

.accordion-body-text p:last-child {
  margin-bottom: 0;
}
