/* -------------------------------------------------------------
 * Canva Element Kodlari — Apple VisionOS / iOS 18 Premium UI
 * Background: #FFF9FC / #FFF7FA
 * Primary Accent: Pink Gradient (#FF2D8D → #FF4FA3)
 * Author: Zuhra Olimova & Yaxshi Bola
 * ------------------------------------------------------------- */

:root {
  /* Color Palette */
  --primary-pink: #FF2D8D;
  --primary-pink-light: #FF4FA3;
  --primary-pink-dark: #E01E75;
  --pink-gradient: linear-gradient(135deg, #FF2D8D 0%, #FF4FA3 100%);
  --pink-soft-bg: rgba(255, 45, 141, 0.06);
  --pink-chip-bg: rgba(255, 45, 141, 0.08);

  /* Backgrounds & Glassmorphism */
  --bg-main: #FFF9FC;
  --card-bg: #FFFFFF;
  --glass-bg: rgba(255, 255, 255, 0.88);
  --card-border: rgba(255, 45, 141, 0.10);
  --border-subtle: rgba(0, 0, 0, 0.05);

  /* Typography */
  --text-primary: #1E1B24;
  --text-secondary: #6E6877;
  --text-muted: #9E96A8;

  /* Shadows & Radius */
  --shadow-soft: 0 6px 24px rgba(255, 45, 141, 0.08);
  --shadow-card: 0 4px 16px rgba(0, 0, 0, 0.03), 0 1px 3px rgba(0, 0, 0, 0.02);
  --shadow-float: 0 10px 30px rgba(255, 45, 141, 0.18), 0 4px 12px rgba(0, 0, 0, 0.04);
  
  --radius-xl: 26px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --radius-pill: 99px;

  /* Emil Kowalski Design Engineering Easing Curves */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);

  --transition-fast: transform 160ms var(--ease-out), opacity 160ms var(--ease-out), background-color 160ms ease-out, box-shadow 160ms ease-out;
  --transition-smooth: transform 220ms var(--ease-out), opacity 220ms var(--ease-out), background-color 220ms ease-out, box-shadow 220ms ease-out;
  --transition: var(--transition-smooth);
}

/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

body.apple-vision-theme {
  background: var(--bg-main);
  color: var(--text-primary);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  padding-bottom: 96px; /* Space for Floating Bottom Navbar */
}

/* Background Soft Glow Orbs */
.bg-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(90px);
  z-index: -1;
  pointer-events: none;
  opacity: 0.35;
}

.orb-1 {
  width: 280px;
  height: 280px;
  background: rgba(255, 45, 141, 0.2);
  top: -60px;
  left: -40px;
}

.orb-2 {
  width: 260px;
  height: 260px;
  background: rgba(255, 79, 163, 0.15);
  top: 50%;
  right: -50px;
}

/* HEADER SECTION */
.app-header {
  padding: 16px 16px 8px;
  background: transparent;
}

.header-container {
  max-width: 540px;
  margin: 0 auto;
}

.top-nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

/* Author Badge */
.author-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  padding: 4px 12px 4px 6px;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-card);
  cursor: pointer;
  transition: var(--transition);
}

.author-badge:active {
  transform: scale(0.97);
}

.avatar-ring {
  width: 28px;
  height: 28px;
  background: var(--pink-gradient);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  font-weight: 800;
  font-size: 11px;
}

.author-info {
  display: flex;
  flex-direction: column;
}

.author-name {
  font-weight: 700;
  font-size: 12px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 4px;
}

.verified-icon {
  color: var(--primary-pink);
  font-size: 11px;
}

.author-title {
  font-size: 10px;
  color: var(--text-secondary);
  font-weight: 500;
}

.header-right-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.element-count-badge {
  background: var(--pink-soft-bg);
  color: var(--primary-pink);
  border: 1px solid rgba(255, 45, 141, 0.15);
  font-size: 11px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  gap: 5px;
}

.header-icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
  box-shadow: var(--shadow-card);
  transition: var(--transition);
}

.header-icon-btn:active {
  transform: scale(0.92);
}

/* Main Title */
.main-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.4px;
  color: var(--text-primary);
  margin-top: 4px;
  margin-bottom: 4px;
}

.gradient-text {
  background: var(--pink-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* STICKY SEARCH & CATEGORY CHIPS */
.sticky-search-section {
  position: sticky;
  top: 0;
  z-index: 90;
  background: rgba(255, 249, 252, 0.90);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 8px 16px 12px;
  border-bottom: 1px solid rgba(255, 45, 141, 0.05);
}

.search-wrapper {
  position: relative;
  max-width: 540px;
  margin: 0 auto 12px;
}

.search-wrapper input {
  width: 100%;
  height: 48px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 0 42px 0 46px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  box-shadow: var(--shadow-soft);
  outline: none;
  transition: var(--transition);
}

.search-wrapper input:focus {
  border-color: var(--primary-pink);
  box-shadow: 0 0 0 3px rgba(255, 45, 141, 0.15);
}

.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--primary-pink);
  font-size: 16px;
}

.clear-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.05);
  border: none;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  cursor: pointer;
}

/* Horizontal Category Chips Filter */
.hot-filters-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  max-width: 540px;
  margin: 0 auto;
  padding-bottom: 2px;
}

.hot-filters-scroll::-webkit-scrollbar {
  display: none;
}

.tag-chip {
  flex-shrink: 0;
  height: 36px;
  padding: 0 16px;
  border-radius: var(--radius-pill);
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  box-shadow: var(--shadow-card);
  transition: var(--transition);
}

.tag-chip i {
  color: var(--primary-pink);
  font-size: 12px;
}

.tag-chip.active {
  background: var(--pink-gradient);
  border-color: transparent;
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(255, 45, 141, 0.28);
}

.tag-chip.active i {
  color: #FFFFFF;
}

.tag-chip:active {
  transform: scale(0.95);
}

/* MAIN CONTENT AREA & TAB VIEWS */
.main-content {
  max-width: 540px;
  margin: 0 auto;
  padding: 16px 16px 24px;
}

.tab-view {
  display: block;
  animation: fadeIn 0.3s ease-out;
}

.tab-view.hidden {
  display: none !important;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* FEATURED AUTO-SLIDING CAROUSEL BANNER */
.featured-carousel-card {
  position: relative;
  width: 100%;
  aspect-ratio: 2.35 / 1;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  margin-bottom: 20px;
  background: var(--card-bg);
  border: 1px solid rgba(255, 45, 141, 0.12);
}

.carousel-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.carousel-slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.banner-full-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  image-rendering: -webkit-optimize-contrast;
  backface-visibility: hidden;
  transform: translateZ(0);
}

.carousel-dots {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 10;
  background: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}

.carousel-dots .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  transition: var(--transition);
  cursor: pointer;
}

.carousel-dots .dot.active {
  width: 16px;
  border-radius: 10px;
  background: #FFFFFF;
}

/* SECTION HEADERS & TITLE ROWS */
.section-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.current-category-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-primary);
}

.view-all-btn {
  background: transparent;
  border: none;
  color: var(--primary-pink);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* 2-COLUMN ELEMENT CARDS GRID */
.elements-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

/* Individual Element Card */
.element-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 12px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: var(--transition);
  position: relative;
}

.element-card:active {
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
}

/* Card Header Row */
.card-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 8px;
  gap: 6px;
}

.category-tag-badge {
  background: var(--pink-soft-bg);
  color: var(--primary-pink);
  font-size: 9px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 105px;
  border: 1px solid rgba(255, 45, 141, 0.12);
}

.fav-star-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 14px;
  cursor: pointer;
  padding: 2px;
  transition: var(--transition);
}

.fav-star-btn.active {
  color: #FF2D8D;
}

/* Card Content */
.element-card-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
  margin-bottom: 8px;
  min-height: 34px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Code Container Block */
.code-block-container {
  background: #F7F5F9;
  border: 1px solid rgba(0, 0, 0, 0.04);
  border-radius: var(--radius-sm);
  padding: 7px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  cursor: pointer;
  transition: var(--transition);
}

.code-block-container:active {
  background: var(--pink-soft-bg);
  border-color: rgba(255, 45, 141, 0.2);
}

.code-text {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.code-copy-icon {
  color: var(--text-muted);
  font-size: 11px;
  margin-left: 6px;
  flex-shrink: 0;
}

/* Card Bottom Buttons Row */
.card-bottom-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-copy-action {
  flex: 1;
  height: 38px;
  background: var(--pink-gradient);
  border: none;
  border-radius: var(--radius-md);
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(255, 45, 141, 0.22);
  transition: var(--transition);
}

.btn-copy-action:active {
  transform: scale(0.97);
  opacity: 0.92;
  transition: transform 160ms var(--ease-out), opacity 160ms var(--ease-out);
}

.btn-share-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: #FFFFFF;
  border: 1px solid var(--card-border);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: var(--shadow-card);
  transition: var(--transition-smooth);
}

.btn-share-icon:active {
  transform: scale(0.95);
  background: var(--pink-soft-bg);
  transition: transform 160ms var(--ease-out), background-color 160ms var(--ease-out);
}

/* CATEGORIES VIEW TAB */
.tab-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.tab-page-header h2 {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.back-btn {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  font-size: 14px;
  cursor: pointer;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.category-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: var(--shadow-card);
  cursor: pointer;
  transition: var(--transition);
}

.category-card:active {
  transform: scale(0.97);
  box-shadow: var(--shadow-soft);
}

.cat-icon-wrapper {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--pink-soft-bg);
  color: var(--primary-pink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  margin-bottom: 10px;
}

.cat-card-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
  line-height: 1.25;
}

.cat-card-count {
  font-size: 11px;
  font-weight: 600;
  color: var(--primary-pink);
}

/* FAVORITES EMPTY STATE & VIEW */
.fav-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
}

.fav-heart-glow {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: rgba(255, 45, 141, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-pink);
  font-size: 40px;
  margin-bottom: 16px;
  box-shadow: 0 0 30px rgba(255, 45, 141, 0.2);
  animation: pulseGlow 2s infinite ease-in-out;
}

@keyframes pulseGlow {
  0% { transform: scale(1); box-shadow: 0 0 20px rgba(255, 45, 141, 0.15); }
  50% { transform: scale(1.05); box-shadow: 0 0 35px rgba(255, 45, 141, 0.3); }
  100% { transform: scale(1); box-shadow: 0 0 20px rgba(255, 45, 141, 0.15); }
}

.fav-empty-state h3 {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.fav-empty-state p {
  font-size: 12px;
  color: var(--text-secondary);
  max-width: 260px;
  margin-bottom: 20px;
  line-height: 1.4;
}

.btn-primary-gradient {
  height: 44px;
  padding: 0 24px;
  border-radius: var(--radius-pill);
  background: var(--pink-gradient);
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 700;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(255, 45, 141, 0.3);
}

/* ADMIN PANEL VIEW (VERTICAL ACTION LIST) */
.admin-header-icon {
  color: var(--primary-pink);
}

.admin-actions-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}

.admin-action-row {
  width: 100%;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-card);
  cursor: pointer;
  transition: var(--transition);
}

.admin-action-row:active {
  transform: scale(0.98);
  background: var(--pink-soft-bg);
}

.action-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.action-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
}

.action-icon.add-icon { background: rgba(255, 45, 141, 0.12); color: var(--primary-pink); }
.action-icon.users-icon { background: rgba(14, 165, 233, 0.12); color: #0ea5e9; }
.action-icon.backup-icon { background: rgba(168, 85, 247, 0.12); color: #a855f7; }
.action-icon.refresh-icon { background: rgba(34, 197, 94, 0.12); color: #22c55e; }
.action-icon.settings-icon { background: rgba(245, 158, 11, 0.12); color: #f59e0b; }
.action-icon.exit-icon { background: rgba(239, 68, 68, 0.12); color: #ef4444; }

.action-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

.action-arrow {
  color: var(--text-muted);
  font-size: 12px;
}

.admin-sub-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.admin-search-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.admin-search-bar input {
  flex: 1;
  height: 42px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  padding: 0 12px;
  font-size: 12px;
}

/* CUSTOM VISIONOS DROPDOWN TRIGGER BUTTON (Replaces ugly browser select) */
.custom-select-trigger {
  height: 42px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
  box-shadow: var(--shadow-card);
  transition: var(--transition);
  width: 100%;
}

.custom-select-trigger:active {
  background: var(--pink-soft-bg);
  border-color: var(--primary-pink);
}

.custom-select-trigger span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.custom-select-trigger i {
  color: var(--primary-pink);
  font-size: 11px;
}

/* CUSTOM CATEGORIES LIST IN MODAL */
.custom-categories-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 340px;
  overflow-y: auto;
  margin-top: 10px;
}

.custom-cat-item {
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: var(--card-bg);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: var(--transition);
}

.custom-cat-item:active, .custom-cat-item.selected {
  background: var(--pink-soft-bg);
  border-color: var(--primary-pink);
}

.cat-item-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cat-item-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--pink-soft-bg);
  color: var(--primary-pink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.cat-item-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}

.cat-item-count {
  font-size: 11px;
  font-weight: 600;
  color: var(--primary-pink);
  background: rgba(255, 45, 141, 0.1);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}

.admin-elements-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 400px;
  overflow-y: auto;
}

.admin-item-row {
  background: var(--card-bg);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.admin-item-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.admin-item-code { font-family: monospace; font-size: 11px; font-weight: 700; color: var(--primary-pink); }
.admin-item-desc { font-size: 12px; font-weight: 600; }
.admin-item-cat { font-size: 10px; color: var(--text-muted); }

.admin-item-right {
  display: flex;
  gap: 6px;
}

.btn-admin-edit, .btn-admin-delete {
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  border: none;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.btn-admin-edit { background: var(--pink-soft-bg); color: var(--primary-pink); }
.btn-admin-delete { background: rgba(239, 68, 68, 0.1); color: #ef4444; }

/* FLOATING GLASSMORPHISM BOTTOM NAVIGATION BAR */
.bottom-nav-bar {
  position: fixed;
  bottom: 12px;
  left: 12px;
  right: 12px;
  max-width: 480px;
  margin: 0 auto;
  z-index: 100;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 45, 141, 0.15);
  border-radius: var(--radius-pill);
  padding: 6px;
  box-shadow: var(--shadow-float);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-around;
}

.nav-item {
  position: relative;
  border: none;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  gap: 3px;
}

.nav-item i {
  font-size: 16px;
}

.nav-item span {
  display: none;
}

.nav-item.active {
  background: var(--pink-gradient);
  color: #FFFFFF;
  padding: 8px 16px;
  box-shadow: 0 4px 14px rgba(255, 45, 141, 0.35);
  flex-direction: row;
  gap: 6px;
}

.nav-item.active i {
  font-size: 14px;
}

.nav-item.active span {
  display: inline;
  font-size: 11px;
  font-weight: 700;
}

.nav-badge-news {
  position: absolute;
  top: 2px;
  right: 6px;
  background: #FF2D8D;
  color: #FFFFFF;
  font-size: 7px;
  font-weight: 800;
  padding: 1px 4px;
  border-radius: var(--radius-pill);
}

/* BACKUP & SETTINGS MODALS STYLES */
.backup-stats-box {
  background: var(--pink-soft-bg);
  border: 1px solid rgba(255, 45, 141, 0.15);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;

}

.backup-stat-row {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.backup-stat-row i { color: var(--primary-pink); }

.backup-textarea {
  width: 100%;
  height: 110px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--card-border);
  background: #F7F5F9;
  padding: 8px 10px;
  font-family: monospace;
  font-size: 10px;
  color: var(--text-primary);
  resize: none;
  outline: none;
}

.form-help {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 4px;
  display: block;
}

/* Checkbox container styling */
.checkbox-container {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
}

/* MODALS & OVERLAYS (Emil Kowalski Origin-Aware Scale Entry) */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(8px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: modalOverlayFadeIn 200ms var(--ease-out);
}

.modal-card {
  width: 100%;
  max-width: 440px;
  background: var(--card-bg);
  border-radius: var(--radius-xl);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  transform-origin: center;
  animation: modalCardScaleIn 220ms var(--ease-out);
}

@keyframes modalOverlayFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modalCardScaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-primary);
}

.modal-close-btn {
  background: rgba(0, 0, 0, 0.05);
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  cursor: pointer;
  transition: transform 160ms var(--ease-out);
}

.modal-close-btn:active {
  transform: scale(0.92);
}

.modal-body {
  padding: 16px 20px;
  max-height: 70vh;
  overflow-y: auto;
}

.modal-search-box {
  position: relative;
  margin-bottom: 10px;
}

.modal-search-box input {
  width: 100%;
  height: 40px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--card-border);
  padding: 0 12px 0 34px;
  font-size: 12px;
}

.modal-search-box i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--primary-pink);
  font-size: 12px;
}

.form-group {
  margin-bottom: 14px;
}

.form-group label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-group input, .form-group select {
  width: 100%;
  height: 42px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--card-border);
  padding: 0 12px;
  font-size: 13px;
  outline: none;
}

.modal-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.btn-modal-cancel, .btn-modal-save {
  height: 38px;
  padding: 0 16px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 160ms var(--ease-out), opacity 160ms var(--ease-out);
}

.btn-modal-cancel:active, .btn-modal-save:active {
  transform: scale(0.96);
}

.btn-modal-cancel { background: #F3F0F6; border: none; color: var(--text-secondary); }
.btn-modal-save { background: var(--pink-gradient); border: none; color: #FFFFFF; }

/* Toast Notification (Micro-Pill Apple Dynamic Island Style) */
.toast-notification {
  position: fixed;
  bottom: calc(74px + env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%);
  background: rgba(18, 14, 28, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #FFFFFF;
  padding: 5px 12px;
  border-radius: 9999px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.24);
  z-index: 9999;
  width: auto;
  max-width: fit-content;
  pointer-events: none;
  transform-origin: center bottom;
}

.toast-notification.toast-anim {
  animation: toastSlideUp 160ms var(--ease-out);
}

@keyframes toastSlideUp {
  from {
    opacity: 0;
    transform: translate(-50%, 8px) scale(0.94);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
  }
}

.toast-content {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.toast-icon {
  color: #10B981;
  font-size: 11px;
  flex-shrink: 0;
}

.toast-title {
  color: #FFFFFF;
  font-size: 11px;
  letter-spacing: -0.1px;
}

.toast-code {
  display: none !important;
}

/* Tactile in-place button copy feedback */
.btn-copy-action.copied-active {
  background: linear-gradient(135deg, #10B981, #059669) !important;
  color: #FFFFFF !important;
  transform: scale(0.98);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
}

.code-block-container.copied-active {
  border-color: #10B981 !important;
  background: rgba(16, 185, 129, 0.08) !important;
}

.hidden { display: none !important; }

/* ==========================================================================
   MANDATORY SUBSCRIPTION LOCK GATE (Apple VisionOS Glassmorphism)
   ========================================================================== */
.sub-gate-overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 999999;
  background: rgba(15, 12, 29, 0.88);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: modalOverlayFadeIn 250ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
  user-select: none;
  -webkit-user-select: none;
}

.sub-gate-overlay.hidden {
  display: none !important;
}

.sub-gate-overlay.fade-out {
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 250ms ease, transform 250ms ease;
  pointer-events: none;
}

.sub-gate-card {
  width: 100%;
  max-width: 360px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35), 0 0 40px rgba(255, 78, 80, 0.15);
  border-radius: 28px;
  padding: 28px 22px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
  animation: subGateScaleIn 300ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes subGateScaleIn {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(12px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.sub-gate-card.shake-anim {
  animation: subGateShake 400ms ease;
}

@keyframes subGateShake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}

.sub-gate-icon-wrapper {
  width: 68px;
  height: 68px;
  margin: 0 auto 16px;
  border-radius: 22px;
  background: linear-gradient(135deg, #FF6B8B 0%, #FF8E53 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 28px;
  box-shadow: 0 10px 25px rgba(255, 107, 139, 0.35);
  position: relative;
}

.sub-gate-icon-wrapper::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 26px;
  border: 2px dashed rgba(255, 107, 139, 0.4);
  animation: spinSlow 12s linear infinite;
}

@keyframes spinSlow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.sub-gate-title {
  font-size: 20px;
  font-weight: 800;
  color: #1a1a2e;
  margin-bottom: 8px;
  letter-spacing: -0.3px;
}

.sub-gate-desc {
  font-size: 13.5px;
  color: #64748b;
  line-height: 1.5;
  margin-bottom: 20px;
  padding: 0 4px;
}

.sub-gate-channels {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
}

.sub-gate-channel-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 13px 16px;
  background: linear-gradient(135deg, #0088cc 0%, #00a8e8 100%);
  color: #ffffff;
  text-decoration: none;
  border-radius: 16px;
  font-weight: 700;
  font-size: 14.5px;
  box-shadow: 0 4px 15px rgba(0, 136, 204, 0.28);
  transition: transform 150ms ease, box-shadow 150ms ease;
  cursor: pointer;
  border: none;
}

.sub-gate-channel-btn:active {
  transform: scale(0.97);
  box-shadow: 0 2px 8px rgba(0, 136, 204, 0.2);
}

.sub-gate-btn-check {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 16px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  border: none;
  border-radius: 16px;
  font-weight: 800;
  font-size: 15px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
  transition: transform 150ms ease, opacity 150ms ease;
}

.sub-gate-btn-check:active {
  transform: scale(0.97);
}

.sub-gate-btn-check:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.sub-gate-footer-note {
  font-size: 11.5px;
  color: #94a3b8;
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}


