/* ==============================================================================
   LILASOFT HOMEPAGE - FAN & DETAIL VIEW COMPONENTS
   ============================================================================== */

/* ==============================================================================
   1. 3D FAN STAGE & APP CARDS
   ============================================================================== */
.fan-stage-section {
  padding: 40px 0 15px;
  position: relative;
  text-align: center;
}

.fan-header {
  margin-bottom: 40px;
}

.fan-title {
  font-size: clamp(1.75rem, 4.8vw, 2.8rem);
  margin-bottom: 12px;
  letter-spacing: -0.03em;
}

.fan-pill-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  background: rgba(139, 92, 246, 0.12);
  border: 1px solid rgba(139, 92, 246, 0.3);
  color: var(--accent-primary);
  font-size: 0.825rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 14px;
}

.fan-instruction {
  font-size: 1.15rem;
  color: var(--text-secondary);
}

.fan-container-wrap {
  position: relative;
  perspective: 1400px;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 550px;
  padding: 24px 0 16px;
  margin: 0 auto;
  max-width: 860px;
}

.cards-fan {
  position: relative;
  width: 100%;
  max-width: 740px;
  height: 520px;
  display: flex;
  justify-content: center;
  align-items: center;
  transform-style: preserve-3d;
  touch-action: pan-y;
  cursor: grab;
  user-select: none;
}

.cards-fan.is-dragging {
  cursor: grabbing;
}

/* Wheel Left / Right Rotation Buttons */
.wheel-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-highlight);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 120;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-fast);
  -webkit-tap-highlight-color: transparent;
}

.wheel-nav-btn:hover {
  background: var(--bg-glass-hover);
  border-color: var(--accent-primary);
  transform: translateY(-50%) scale(1.08);
}

.wheel-nav-btn:active {
  transform: translateY(-50%) scale(0.94);
}

.wheel-nav-btn.prev {
  left: 8px;
}

.wheel-nav-btn.next {
  right: 8px;
}

.wheel-nav-btn svg {
  width: 20px;
  height: 20px;
}

.wheel-gesture-hint {
  margin: 4px auto 0;
  font-size: 0.825rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.01em;
}

/* Individual Wheel Card (Phone Screen Display) */
.fan-card {
  position: absolute;
  width: 250px;
  height: 500px;
  background: #090B10;
  border-radius: 40px;
  border: 4px solid #232738;
  box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.7);
  overflow: hidden;
  cursor: pointer;
  transform: var(--base-transform);
  transform-origin: 50% 50%;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), 
              opacity 0.35s ease,
              filter 0.35s ease,
              box-shadow 0.4s ease, 
              border-color 0.3s ease;
  will-change: transform, opacity, filter;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.cards-fan.is-dragging .fan-card {
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

/* Screen Image inside Fan Card */
.fan-card-screen {
  position: relative;
  width: 100%;
  height: 100%;
  background: #000;
  overflow: hidden;
}

.fan-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

/* Android Camera Punch Hole */
.fan-card-punchhole {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #000000;
  border: 1px solid #1C202E;
  z-index: 10;
}

/* Glass Sheen / Reflection */
.fan-card-glare {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    125deg,
    rgba(255, 255, 255, 0.12) 0%,
    rgba(255, 255, 255, 0.04) 40%,
    transparent 60%
  );
  pointer-events: none;
  z-index: 8;
}

/* Floating Bottom Info Pill on Card */
.fan-card-badge {
  position: absolute;
  bottom: 16px;
  left: 14px;
  right: 14px;
  padding: 8px 12px;
  background: rgba(13, 16, 26, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 12;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.fan-card-icon {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  flex-shrink: 0;
}

.fan-card-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #FFFFFF;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* HOVER MICRO-INTERACTION: Subtle glow on side cards (Desktop pointer devices only) */
@media (hover: hover) and (pointer: fine) {
  .fan-card:not(.active):hover {
    border-color: var(--card-accent, #6366F1);
    box-shadow: 0 25px 55px -12px rgba(0, 0, 0, 0.85),
                0 0 28px var(--card-glow, rgba(99, 102, 241, 0.35));
  }
}

/* ACTIVE SELECTED CARD IN THE MIDDLE OF THE WHEEL */
.fan-card.active {
  border-color: var(--card-accent, #6366F1);
  box-shadow: 0 30px 65px -10px rgba(0, 0, 0, 0.85),
              0 0 0 2px var(--card-accent, #6366F1),
              0 0 42px var(--card-glow, rgba(99, 102, 241, 0.45));
}

.fan-card.active .fan-card-badge {
  border-color: var(--card-accent, #6366F1);
  background: rgba(19, 23, 38, 0.95);
}

/* Quick App Switcher Pills Bar */
.app-quick-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px auto 0;
  max-width: 720px;
}

.app-quick-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  -webkit-tap-highlight-color: transparent;
  box-shadow: var(--shadow-sm);
}

.app-quick-pill:hover {
  background: var(--bg-glass-hover);
  color: var(--text-primary);
  border-color: var(--border-highlight);
}

.app-quick-pill.active {
  background: rgba(139, 92, 246, 0.14);
  border-color: var(--pill-accent, var(--accent-primary));
  color: var(--text-primary);
  box-shadow: 0 0 20px var(--pill-glow, rgba(139, 92, 246, 0.25));
}

.app-quick-pill-icon {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  flex-shrink: 0;
}

/* Indicator arrow pointing to detail view */
.fan-selection-hint {
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
}

/* ==============================================================================
   APP ITERATOR SLIDER MECHANISM (BETWEEN FAN AND DETAIL VIEW)
   ============================================================================== */
.app-slider-container {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 0 auto 28px;
  max-width: 760px;
  width: 100%;
  padding: 12px 20px;
  background: var(--bg-card);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-md), 0 0 30px rgba(0, 0, 0, 0.35);
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.slider-arrow-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.slider-arrow-btn:hover {
  background: var(--bg-glass-hover);
  border-color: var(--border-highlight);
  transform: scale(1.08);
}

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

.slider-track-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
  padding: 0 4px;
}

.app-range-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: #181C2B;
  outline: none;
  cursor: pointer;
  position: relative;
  transition: background var(--transition-fast);
}

[data-theme="light"] .app-range-slider {
  background: #CBD5E1;
}

/* Slider Thumb - WebKit */
.app-range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--slider-thumb-color, var(--accent-primary));
  border: 2.5px solid #FFFFFF;
  box-shadow: 0 0 14px var(--slider-thumb-color, var(--accent-primary));
  cursor: grab;
  transition: transform 0.15s, box-shadow 0.15s;
}

.app-range-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

.app-range-slider::-webkit-slider-thumb:active {
  cursor: grabbing;
  transform: scale(1.25);
}

/* Slider Thumb - Firefox */
.app-range-slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--slider-thumb-color, var(--accent-primary));
  border: 2.5px solid #FFFFFF;
  box-shadow: 0 0 14px var(--slider-thumb-color, var(--accent-primary));
  cursor: grab;
}

.slider-ticks {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 0 2px;
}

.slider-tick {
  font-size: 0.775rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
  user-select: none;
}

.slider-tick:hover {
  color: var(--text-primary);
  transform: translateY(-1px);
}

.slider-tick.active {
  color: var(--slider-thumb-color, var(--text-primary));
  font-weight: 700;
  transform: translateY(-1px);
}

/* ==============================================================================
   2. DETAILED VIEW SECTION (BENEATH THE FAN)
   ============================================================================== */
.detail-section {
  padding: 64px 0 100px;
  position: relative;
}

.detail-section-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.detail-card {
  position: relative;
  width: 100%;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-highlight);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg), 0 0 50px rgba(0, 0, 0, 0.4);
  padding: 48px;
  overflow: hidden;
  transition: all var(--transition-smooth);
}

.detail-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--active-accent, var(--gradient-brand));
  transition: background var(--transition-base);
}

/* Detail Card Grid Layout */
.detail-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 50px;
  align-items: start;
}

/* Left Column: Info, Badges, Features, Play Store Button */
.detail-info-col {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.detail-header-row {
  display: flex;
  align-items: center;
  gap: 20px;
}

.detail-app-icon {
  width: 80px;
  height: 80px;
  border-radius: 22px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  flex-shrink: 0;
  transition: transform var(--transition-fast);
}

.detail-app-icon:hover {
  transform: scale(1.05) rotate(-2deg);
}

.detail-title-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.detail-badges-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.detail-app-name {
  font-size: 2.3rem;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.detail-app-tagline {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--active-accent, var(--accent-light));
}

/* Stats Pill Bar */
.detail-metrics-bar {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 14px 20px;
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  flex-wrap: wrap;
}

.metric-pill {
  display: flex;
  flex-direction: column;
}

.metric-pill-val {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
}

.metric-pill-lbl {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Description Text */
.detail-desc-box {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.7;
}

/* Features Grid */
.detail-features-block {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.detail-features-title {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.detail-features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.detail-feature-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 18px;
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  transition: background var(--transition-fast), border-color var(--transition-fast);
}

.detail-feature-card:hover {
  background: var(--bg-glass-hover);
  border-color: var(--border-highlight);
}

.detail-feature-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
  margin-top: 1px;
}

.detail-feature-text h5 {
  font-size: 0.95rem;
  margin-bottom: 2px;
}

.detail-feature-text p {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* Play Store Action CTA */
.detail-cta-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 10px;
}

.btn-play-store-app {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px 28px;
  border-radius: var(--radius-pill);
  font-size: 1.025rem;
  font-weight: 700;
  background: #101420;
  border: 1.5px solid var(--active-accent, #6366F1);
  color: #FFFFFF;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4), 0 0 20px var(--card-glow, rgba(99, 102, 241, 0.25));
  transition: all var(--transition-fast);
  text-align: center;
}

.btn-play-store-app:hover {
  background: #181E30;
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 30px var(--card-glow, rgba(99, 102, 241, 0.45));
}

.btn-play-store-app img {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.btn-privacy-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: var(--radius-pill);
  font-size: 0.95rem;
  font-weight: 600;
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.btn-privacy-pill:hover {
  background: var(--bg-glass-hover);
  border-color: var(--border-highlight);
  color: var(--text-primary);
  transform: translateY(-2px);
}

/* Right Column: Screenshot Gallery */
.detail-gallery-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  width: 100%;
}

.gallery-title {
  font-size: 1.1rem;
  font-weight: 700;
  align-self: flex-start;
}

/* Gallery Stage Wrapper with Prev/Next Controls */
.gallery-stage-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Large Interactive Device Preview Frame */
.gallery-main-frame {
  position: relative;
  width: 280px;
  height: 580px;
  background: #090B10;
  border-radius: 42px;
  border: 4px solid #232738;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.85);
  overflow: hidden;
  touch-action: pan-y;
  user-select: none;
}

.gallery-main-frame-screen {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.gallery-main-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

/* Gallery Prev / Next Overlay Buttons */
.gallery-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(13, 16, 26, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 15;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
  transition: all var(--transition-fast);
  -webkit-tap-highlight-color: transparent;
}

.gallery-nav-btn:hover {
  background: rgba(25, 31, 48, 0.95);
  border-color: var(--active-accent, var(--accent-primary));
  transform: translateY(-50%) scale(1.08);
}

.gallery-nav-btn:active {
  transform: translateY(-50%) scale(0.95);
}

.gallery-nav-btn.prev {
  left: -18px;
}

.gallery-nav-btn.next {
  right: -18px;
}

.gallery-nav-btn svg {
  width: 18px;
  height: 18px;
}

/* Gallery Thumbnails Row */
.gallery-thumbnails-row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  max-width: 380px;
}

.gallery-thumb-btn {
  width: 54px;
  height: 108px;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid var(--border-subtle);
  background: #0B0E17;
  cursor: pointer;
  transition: all var(--transition-fast);
  padding: 0;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}

.gallery-thumb-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-thumb-btn:hover {
  border-color: var(--border-highlight);
  transform: scale(1.05);
}

.gallery-thumb-btn.active {
  border-color: var(--active-accent, var(--accent-primary));
  box-shadow: 0 0 16px var(--card-glow, rgba(99, 102, 241, 0.4));
  transform: scale(1.08);
}

.gallery-caption {
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-align: center;
  max-width: 320px;
  min-height: 2.6em;
}

/* ==============================================================================
   RESPONSIVE DESIGN FOR FAN & DETAIL
   ============================================================================== */
@media (max-width: 960px) {
  .fan-stage-section {
    padding: 28px 0 10px;
  }

  .fan-header {
    margin-bottom: 20px;
  }

  .detail-section {
    padding: 36px 0 72px;
  }

  .detail-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .detail-card {
    padding: 32px 24px;
    border-radius: var(--radius-lg);
  }
}

@media (max-width: 640px) {
  .fan-stage-section {
    padding: 20px 0 8px;
  }

  .fan-header {
    margin-bottom: 12px;
  }

  .fan-container-wrap {
    min-height: 380px;
    padding: 18px 0 10px;
  }

  .cards-fan {
    max-width: 100%;
    height: 350px;
  }

  .wheel-nav-btn {
    width: 36px;
    height: 36px;
  }

  .wheel-nav-btn.prev {
    left: 0;
  }

  .wheel-nav-btn.next {
    right: 0;
  }

  .wheel-nav-btn svg {
    width: 17px;
    height: 17px;
  }

  .wheel-gesture-hint {
    font-size: 0.75rem;
  }

  .fan-card {
    width: 164px;
    height: 328px;
    border-radius: 28px;
    border-width: 3px;
    --active-lift: -18px;
  }

  .fan-card-punchhole {
    top: 8px;
    width: 8px;
    height: 8px;
  }

  .fan-card-badge {
    bottom: 10px;
    left: 8px;
    right: 8px;
    padding: 5px 8px;
    gap: 6px;
  }

  .fan-card-icon {
    width: 20px;
    height: 20px;
    border-radius: 6px;
  }

  .fan-card-title {
    font-size: 0.72rem;
  }

  .app-quick-nav {
    gap: 8px;
    margin-top: 12px;
  }

  .app-quick-pill {
    padding: 7px 12px;
    font-size: 0.8rem;
    gap: 6px;
  }

  .app-quick-pill-icon {
    width: 18px;
    height: 18px;
  }

  .detail-section {
    padding: 24px 0 56px;
  }

  .detail-card {
    padding: 24px 18px;
    border-radius: var(--radius-lg);
  }

  .detail-grid {
    gap: 28px;
  }

  .detail-info-col {
    gap: 18px;
  }

  .detail-header-row {
    gap: 14px;
  }

  .detail-app-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
  }

  .detail-app-name {
    font-size: 1.6rem;
  }

  .detail-app-tagline {
    font-size: 0.925rem;
    line-height: 1.35;
  }

  .detail-desc-box {
    font-size: 0.95rem;
    line-height: 1.65;
  }

  .detail-feature-card {
    padding: 12px 14px;
    gap: 12px;
  }

  .detail-cta-row {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding-top: 4px;
  }

  .btn-play-store-app,
  .btn-privacy-pill {
    width: 100%;
    padding: 14px 20px;
    font-size: 0.95rem;
  }

  .gallery-main-frame {
    width: 224px;
    height: 464px;
    border-radius: 34px;
    border-width: 3.5px;
  }

  .gallery-nav-btn {
    width: 34px;
    height: 34px;
  }

  .gallery-nav-btn.prev {
    left: -14px;
  }

  .gallery-nav-btn.next {
    right: -14px;
  }

  .gallery-thumbnails-row {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    max-width: 100%;
    padding: 4px 6px 8px;
    gap: 8px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .gallery-thumbnails-row::-webkit-scrollbar {
    display: none;
  }

  .gallery-thumb-btn {
    width: 44px;
    height: 88px;
    border-radius: 9px;
  }
}

@media (max-width: 380px) {
  .fan-container-wrap {
    min-height: 340px;
  }

  .cards-fan {
    height: 315px;
  }

  .fan-card {
    width: 144px;
    height: 288px;
    border-radius: 24px;
  }

  .gallery-main-frame {
    width: 204px;
    height: 422px;
    border-radius: 30px;
  }
}

/* ==============================================================================
   3. PRIVACY POLICY DOCUMENT STYLES
   ============================================================================== */
.privacy-page-wrapper {
  padding: 50px 0 100px;
  min-height: calc(100vh - var(--header-height) - 150px);
}

.privacy-card {
  max-width: 860px;
  margin: 0 auto;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-highlight);
  border-radius: var(--radius-xl);
  padding: 54px;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.privacy-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--active-accent, var(--gradient-brand));
}

.privacy-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-subtle);
}

.privacy-back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.925rem;
  color: var(--text-secondary);
}

.privacy-back-link:hover {
  color: var(--text-primary);
}

.privacy-app-selector-box {
  display: flex;
  align-items: center;
  gap: 10px;
}

.privacy-select-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
}

.privacy-select {
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  background: var(--bg-secondary);
  border: 1px solid var(--border-highlight);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  transition: all var(--transition-fast);
}

.privacy-select:focus {
  border-color: var(--accent-primary);
}

.privacy-doc-header {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 36px;
}

.privacy-doc-icon {
  width: 76px;
  height: 76px;
  border-radius: 20px;
  flex-shrink: 0;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.privacy-doc-title {
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  margin-bottom: 4px;
}

.privacy-meta-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.privacy-summary-box {
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 36px;
}

.privacy-section-block {
  margin-bottom: 36px;
}

.privacy-section-block h3 {
  font-size: 1.25rem;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.privacy-section-block p {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 14px;
  overflow-wrap: break-word;
}

.permission-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 14px;
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.permission-table th, .permission-table td {
  padding: 14px 18px;
  text-align: left;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: top;
}

.permission-table th {
  background: var(--bg-glass-hover);
  color: var(--text-primary);
  font-weight: 700;
}

.permission-table tr:last-child td {
  border-bottom: none;
}

.permission-code {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.08);
  padding: 3px 8px;
  border-radius: 6px;
  word-break: break-word;
  overflow-wrap: anywhere;
}

@media (max-width: 768px) {
  .privacy-page-wrapper {
    padding: 28px 0 60px;
  }

  .privacy-card {
    padding: 28px 20px;
    border-radius: var(--radius-lg);
  }

  .privacy-doc-header {
    flex-direction: row;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
  }

  .privacy-doc-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
  }
}

@media (max-width: 640px) {
  .privacy-top-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    margin-bottom: 24px;
    padding-bottom: 18px;
  }

  .privacy-app-selector-box {
    width: 100%;
    justify-content: space-between;
  }

  .privacy-select {
    flex: 1;
    max-width: 240px;
  }

  .privacy-summary-box {
    padding: 16px;
    margin-bottom: 28px;
  }

  .privacy-section-block {
    margin-bottom: 28px;
  }

  .privacy-section-block h3 {
    font-size: 1.125rem;
  }

  .privacy-section-block p {
    font-size: 0.95rem;
  }

  /* Responsive Stacked Permission Cards on Mobile */
  .permission-table,
  .permission-table tbody,
  .permission-table tr,
  .permission-table td {
    display: block;
    width: 100%;
  }

  .permission-table thead {
    display: none;
  }

  .permission-table tr {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-subtle);
  }

  .permission-table tr:last-child {
    border-bottom: none;
  }

  .permission-table td {
    padding: 0;
    border-bottom: none;
  }

  .permission-table td:first-child {
    margin-bottom: 8px;
  }
}
