/* ==========================================================================
   Telegram Search Application - Premium Glassmorphism Stylesheet
   ========================================================================== */

:root {
  /* Dark Theme (Default) */
  --bg-color: #0b1118;
  --bg-gradient: radial-gradient(circle at 50% 0%, #152538 0%, #0b1118 70%);
  --surface-1: rgba(22, 32, 46, 0.65);
  --surface-2: rgba(30, 44, 62, 0.8);
  --surface-3: rgba(38, 55, 77, 0.9);
  --surface-border: rgba(255, 255, 255, 0.08);
  --surface-border-hover: rgba(42, 171, 238, 0.4);
  
  --text-primary: #f0f4f8;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --tg-blue: #229ED9;
  --tg-blue-hover: #2AABEE;
  --tg-blue-glow: rgba(42, 171, 238, 0.35);
  
  --cyan-accent: #00e5ff;
  --green-badge: #10b981;
  --purple-badge: #a855f7;
  --orange-badge: #f59e0b;
  --danger-color: #ef4444;

  --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.45);
  --shadow-glow: 0 0 25px rgba(34, 158, 217, 0.25);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --transition-fast: 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-normal: 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="light"] {
  --bg-color: #f1f5f9;
  --bg-gradient: radial-gradient(circle at 50% 0%, #e2e8f0 0%, #f1f5f9 80%);
  --surface-1: rgba(255, 255, 255, 0.75);
  --surface-2: rgba(255, 255, 255, 0.9);
  --surface-3: #ffffff;
  --surface-border: rgba(0, 0, 0, 0.08);
  --surface-border-hover: rgba(34, 158, 217, 0.5);

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;

  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.12);
  --shadow-glow: 0 0 25px rgba(34, 158, 217, 0.2);
}

/* Base Resets */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-color);
  background-image: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.5;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

/* Ambient Glowing Blobs */
.bg-glow {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(120px);
  z-index: 0;
  opacity: 0.35;
  transition: opacity 0.5s ease;
}
.glow-1 {
  width: 500px;
  height: 500px;
  top: -100px;
  left: 20%;
  background: radial-gradient(circle, #229ED9, transparent 70%);
}
.glow-2 {
  width: 450px;
  height: 450px;
  top: 30%;
  right: -50px;
  background: radial-gradient(circle, #00e5ff, transparent 70%);
  opacity: 0.25;
}
.glow-3 {
  width: 400px;
  height: 400px;
  bottom: -50px;
  left: -50px;
  background: radial-gradient(circle, #a855f7, transparent 70%);
  opacity: 0.18;
}

/* Container */
.app-container {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header & Navbar */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  position: sticky;
  top: 12px;
  background: rgba(13, 20, 32, 0.82);
  backdrop-filter: blur(28px) saturate(190%);
  -webkit-backdrop-filter: blur(28px) saturate(190%);
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 12px 36px -8px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  z-index: 100;
  margin-bottom: 26px;
  transition: all 0.3s ease;
  position: relative;
}
.app-header::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 12%;
  right: 12%;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(34, 158, 217, 0.6) 20%, rgba(0, 229, 255, 0.85) 50%, rgba(34, 158, 217, 0.6) 80%, transparent 100%);
  pointer-events: none;
  opacity: 0.85;
}
[data-theme="light"] .app-header {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 10px 30px -6px rgba(0, 0, 0, 0.08), inset 0 1px 0 #ffffff;
}
[data-theme="light"] .app-header::after {
  background: linear-gradient(90deg, transparent 0%, rgba(34, 158, 217, 0.3) 25%, rgba(0, 168, 232, 0.6) 50%, rgba(34, 158, 217, 0.3) 75%, transparent 100%);
}

.logo-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  text-decoration: none;
}
.logo-icon-wrap {
  position: relative;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}
.logo-icon-glow {
  position: absolute;
  inset: -2px;
  border-radius: 14px;
  background: linear-gradient(135deg, #0088cc, #00e5ff);
  filter: blur(8px);
  opacity: 0.45;
  transition: opacity 0.3s ease, filter 0.3s ease;
}
.logo-wrapper:hover .logo-icon-glow {
  opacity: 0.85;
  filter: blur(12px);
}
.logo-icon {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 12px;
  background: linear-gradient(145deg, #2AABEE 0%, #229ED9 50%, #0077b5 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.45), 0 4px 14px rgba(34, 158, 217, 0.4);
  transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.logo-wrapper:hover .logo-icon {
  transform: scale(1.06) rotate(-2deg);
}
.logo-icon svg {
  width: 24px;
  height: 24px;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

.logo-text {
  display: flex;
  flex-direction: column;
}
.logo-brand-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.logo-title {
  font-size: 1.3rem;
  font-weight: 900;
  letter-spacing: -0.5px;
  color: var(--text-primary);
  line-height: 1.2;
}
.pro-badge {
  background: linear-gradient(135deg, rgba(34, 158, 217, 0.25) 0%, rgba(0, 229, 255, 0.25) 100%);
  color: #38bdf8;
  font-size: 0.65rem;
  font-weight: 900;
  letter-spacing: 1px;
  padding: 2px 7px;
  border-radius: 6px;
  border: 1px solid rgba(56, 189, 248, 0.45);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.25);
  text-transform: uppercase;
  display: inline-block;
}
[data-theme="light"] .pro-badge {
  background: rgba(34, 158, 217, 0.12);
  color: #0284c7;
  border-color: rgba(34, 158, 217, 0.35);
}
.logo-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}
.live-dot-pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: dotPulse 2s infinite;
}
.logo-subtitle {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

/* Nav Tabs */
.nav-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(0, 0, 0, 0.3);
  padding: 4px 6px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}
[data-theme="light"] .nav-tabs {
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.07);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}
.nav-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}
.nav-tab:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.07);
}
[data-theme="light"] .nav-tab:hover {
  background: rgba(0, 0, 0, 0.05);
}
.nav-tab.active {
  color: #ffffff;
  background: linear-gradient(135deg, #24A1DE 0%, #0088cc 100%);
  box-shadow: 0 4px 14px rgba(36, 161, 222, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.badge-count {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
  font-size: 0.68rem;
  padding: 1px 6px;
  border-radius: 999px;
  font-weight: 700;
}

/* Header Right */
.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}
.header-status-badge {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px;
  border-radius: 11px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: #34d399;
  font-size: 0.775rem;
  font-weight: 700;
  letter-spacing: 0.2px;
  white-space: nowrap;
}
[data-theme="light"] .header-status-badge {
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
  border-color: rgba(16, 185, 129, 0.3);
}
.stat-pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: dotPulse 2s infinite;
}
@keyframes dotPulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
    box-shadow: 0 0 8px #10b981;
  }
  50% {
    transform: scale(1.3);
    opacity: 0.7;
    box-shadow: 0 0 14px #10b981;
  }
}
.btn-icon-export {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 11px;
  padding: 8px 14px;
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  transition: all 0.2s ease;
}
[data-theme="light"] .btn-icon-export {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.08);
}
.btn-icon-export:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(34, 158, 217, 0.4);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  transform: translateY(-1px);
}
.dropdown-chevron {
  color: var(--text-muted);
  transition: transform 0.2s ease;
}
.dropdown.active .dropdown-chevron {
  transform: rotate(180deg);
}
.theme-toggle-btn {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.25s ease;
}
[data-theme="light"] .theme-toggle-btn {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.08);
}
.theme-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  border-color: rgba(34, 158, 217, 0.4);
  transform: rotate(15deg) scale(1.06);
  box-shadow: 0 0 12px rgba(34, 158, 217, 0.3);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  border: none;
  transition: all var(--transition-fast);
  text-decoration: none;
}
.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
}
.btn-primary {
  background: linear-gradient(135deg, var(--tg-blue), var(--tg-blue-hover));
  color: #ffffff;
  box-shadow: 0 4px 14px var(--tg-blue-glow);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px var(--tg-blue-glow);
}
.btn-secondary {
  background: var(--surface-2);
  color: var(--text-primary);
  border: 1px solid var(--surface-border);
}
.btn-secondary:hover {
  background: var(--surface-3);
  border-color: var(--surface-border-hover);
}
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}
.btn-ghost:hover {
  background: var(--surface-2);
  color: var(--text-primary);
}
.btn-icon-round {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
}
[data-theme="dark"] .sun-icon { display: block; }
[data-theme="dark"] .moon-icon { display: none; }
[data-theme="light"] .sun-icon { display: none; }
[data-theme="light"] .moon-icon { display: block; }

/* Dropdown */
.dropdown {
  position: relative;
}
.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--surface-3);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  padding: 8px;
  width: 240px;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(16px);
  display: none;
  flex-direction: column;
  gap: 4px;
  z-index: 100;
  animation: dropdownIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.dropdown.active .dropdown-menu {
  display: flex;
}
.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  width: 100%;
  text-align: left;
  transition: background var(--transition-fast);
}
.dropdown-item:hover {
  background: rgba(42, 171, 238, 0.15);
  color: var(--tg-blue);
}

/* Language Dropdown */
.btn-icon-lang {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 11px;
  padding: 8px 12px;
  font-size: 0.825rem;
  font-weight: 700;
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  transition: all 0.2s ease;
}
[data-theme="light"] .btn-icon-lang {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.08);
}
.btn-icon-lang:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(34, 158, 217, 0.4);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  transform: translateY(-1px);
}
.lang-flag {
  font-size: 1.05rem;
  line-height: 1;
}
.lang-dropdown-menu {
  width: 180px;
}
.lang-item.active-lang {
  background: rgba(34, 158, 217, 0.15);
  color: var(--tg-blue);
  font-weight: 700;
}

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

/* ================= HERO & SEARCH BOX ================= */
.search-hero {
  text-align: center;
  padding: 24px 0 28px;
  max-width: 900px;
  margin: 0 auto;
}
.search-title {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 10px;
  background: linear-gradient(135deg, var(--text-primary) 30%, var(--tg-blue) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.search-desc {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 28px;
}

.search-box-card {
  background: var(--surface-1);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-md);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.search-box-card:focus-within {
  border-color: var(--tg-blue);
  box-shadow: var(--shadow-glow);
}

.search-input-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface-2);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  padding: 6px 8px 6px 16px;
  transition: all var(--transition-fast);
}
.search-icon-lens {
  color: var(--text-muted);
  display: flex;
  align-items: center;
}
.search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-family: inherit;
  font-size: 1.05rem;
  color: var(--text-primary);
}
.search-input::placeholder {
  color: var(--text-muted);
  font-size: 0.95rem;
}
.btn-clear {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  display: flex;
  align-items: center;
}
.btn-clear:hover {
  color: var(--text-primary);
}
.keyboard-hint {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 2px 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
}
.btn-search {
  padding: 10px 24px;
}

/* Quick Tags */
.quick-tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.quick-tags-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}
.tag-pill {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--surface-border);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.tag-pill:hover {
  background: var(--surface-border-hover);
  color: var(--tg-blue);
  border-color: var(--tg-blue);
  transform: translateY(-1px);
}

/* ================= FILTER PANEL ================= */
.filter-panel {
  background: var(--surface-1);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  backdrop-filter: blur(12px);
  margin-bottom: 24px;
}
.filter-row-top {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

/* Type Buttons */
.type-filter-group {
  display: flex;
  background: var(--surface-2);
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid var(--surface-border);
  gap: 2px;
}
.type-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.type-btn:hover {
  color: var(--text-primary);
}
.type-btn.active {
  background: var(--surface-3);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}
.type-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.all-dot { background: var(--cyan-accent); }
.channel-dot { background: var(--tg-blue); }
.group-dot { background: var(--green-badge); }
.bot-dot { background: var(--purple-badge); }

/* Filter Items */
.filter-item {
  display: flex;
  align-items: center;
  gap: 8px;
}
.filter-item label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
}
.select-wrapper {
  position: relative;
}
.custom-select {
  appearance: none;
  background: var(--surface-2);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-sm);
  padding: 6px 28px 6px 12px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.825rem;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  transition: border-color var(--transition-fast);
}
.custom-select:focus {
  border-color: var(--tg-blue);
}
.select-wrapper::after {
  content: "▾";
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  font-size: 0.75rem;
}

/* Toggle Switch */
.toggle-item {
  cursor: pointer;
}
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 20px;
}
.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: var(--surface-2);
  border: 1px solid var(--surface-border);
  transition: .3s;
  border-radius: 20px;
}
.toggle-slider:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 2px;
  bottom: 2px;
  background-color: var(--text-secondary);
  transition: .3s;
  border-radius: 50%;
}
.toggle-switch input:checked + .toggle-slider {
  background-color: var(--tg-blue);
  border-color: var(--tg-blue);
}
.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(16px);
  background-color: #ffffff;
}
.toggle-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* ================= RESULTS HEADER ================= */
.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 4px 18px;
  margin-bottom: 6px;
}
.results-count-text {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
}
.search-query-tag {
  font-size: 0.85rem;
  color: var(--tg-blue);
  margin-left: 8px;
  font-weight: 600;
}
.batch-actions {
  display: flex;
  gap: 8px;
}

/* ================= CHANNEL GRID ================= */
.channel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

/* Channel Card */
.channel-card {
  background: var(--surface-1);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  transition: all var(--transition-normal);
  cursor: pointer;
  overflow: hidden;
}
.channel-card:hover {
  transform: translateY(-4px);
  border-color: var(--surface-border-hover);
  box-shadow: var(--shadow-md);
}

.card-top {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 12px;
}
.channel-avatar {
  width: 54px;
  height: 54px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #1e293b, #334155);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  font-weight: 800;
  color: #ffffff;
  flex-shrink: 0;
  overflow: hidden;
  border: 1px solid var(--surface-border);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}
.channel-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.card-header-meta {
  flex: 1;
  min-width: 0;
}
.card-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 2px;
}
.card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.verified-badge {
  color: var(--tg-blue);
  display: inline-flex;
  flex-shrink: 0;
}
.card-username {
  font-size: 0.8rem;
  color: var(--tg-blue);
  font-weight: 600;
  display: block;
  margin-bottom: 4px;
}
.card-subscribers {
  font-size: 0.75rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 500;
}

/* Badges */
.entity-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.5px;
}
.badge-channel {
  background: rgba(34, 158, 217, 0.15);
  color: var(--tg-blue);
  border: 1px solid rgba(34, 158, 217, 0.3);
}
.badge-group {
  background: rgba(16, 185, 129, 0.15);
  color: var(--green-badge);
  border: 1px solid rgba(16, 185, 129, 0.3);
}
.badge-bot {
  background: rgba(168, 85, 247, 0.15);
  color: var(--purple-badge);
  border: 1px solid rgba(168, 85, 247, 0.3);
}
.badge-adult {
  background: rgba(239, 68, 68, 0.18);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
  font-weight: 800;
}
.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
  font-weight: 600;
}
.badge-status-active {
  color: var(--green-badge);
}
.badge-status-inactive {
  color: var(--text-muted);
}
.status-mini-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}
.dot-active { background: var(--green-badge); box-shadow: 0 0 6px var(--green-badge); }
.dot-inactive { background: var(--text-muted); }
.badge-status-deleted {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.14);
  border: 1px solid rgba(239, 68, 68, 0.35);
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  font-weight: 700;
}
.dot-deleted {
  background: #ef4444;
  box-shadow: 0 0 6px #ef4444;
}
.channel-card-deleted {
  border-color: rgba(239, 68, 68, 0.3);
  background: linear-gradient(145deg, rgba(239, 68, 68, 0.04), rgba(15, 23, 42, 0.6));
}
.modal-deleted-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.35);
  border-radius: var(--radius-md);
  color: #fca5a5;
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 16px;
}

/* Adult Tag Pill */
.tag-pill-adult {
  border-color: rgba(239, 68, 68, 0.4);
  color: #f87171;
  background: rgba(239, 68, 68, 0.08);
}
.tag-pill-adult:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: #f87171;
  color: #ffffff;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.3);
}

/* Adult Toggle */
.slider-adult {
  border-color: rgba(239, 68, 68, 0.3);
}
.toggle-adult input:checked + .slider-adult {
  background-color: #dc2626;
  border-color: #ef4444;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.4);
}
.text-adult {
  color: #f87171;
  font-weight: 700;
}

.card-fav-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: 50%;
  transition: all var(--transition-fast);
}
.card-fav-btn:hover {
  color: #ef4444;
  transform: scale(1.15);
}
.card-fav-btn.is-fav {
  color: #ef4444;
}
.card-fav-btn.is-fav svg {
  fill: #ef4444;
}

.card-desc {
  font-size: 0.825rem;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 2.3em;
}

/* Latest post preview box inside card */
.card-post-preview {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  margin-bottom: 14px;
  font-size: 0.75rem;
  color: var(--text-muted);
}
.post-preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.7rem;
  color: var(--tg-blue);
  margin-bottom: 4px;
}
.post-preview-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Card Actions */
.card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--surface-border);
}
.btn-open-tg {
  flex: 1;
}

/* ================= STATE CONTAINERS ================= */
.state-container {
  text-align: center;
  padding: 60px 20px;
  background: var(--surface-1);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
  margin-bottom: 40px;
}
.state-illustration {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--tg-blue);
}
.pulse-circle {
  position: absolute;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--tg-blue-glow);
  animation: pulse 2s infinite ease-in-out;
  z-index: -1;
}
@keyframes pulse {
  0% { transform: scale(0.8); opacity: 0.6; }
  50% { transform: scale(1.3); opacity: 0.2; }
  100% { transform: scale(0.8); opacity: 0.6; }
}
.state-container h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text-primary);
}
.state-container p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  max-width: 480px;
  margin: 0 auto;
}

.loading-spinner {
  width: 44px;
  height: 44px;
  border: 3px solid var(--surface-border);
  border-top-color: var(--tg-blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 20px;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ================= MODAL PREVIEW ================= */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}
.modal-window {
  background: var(--surface-3);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 760px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  position: relative;
  animation: modalScale 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalScale {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-close-btn {
  position: absolute;
  top: 18px;
  right: 18px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--surface-border);
  color: var(--text-secondary);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all var(--transition-fast);
}
.modal-close-btn:hover {
  background: var(--danger-color);
  color: #ffffff;
  border-color: var(--danger-color);
}

.modal-header-banner {
  padding: 28px 24px 20px;
  background: linear-gradient(180deg, rgba(34, 158, 217, 0.15) 0%, transparent 100%);
  display: flex;
  align-items: center;
  gap: 20px;
  border-bottom: 1px solid var(--surface-border);
}
.channel-avatar-lg {
  width: 76px;
  height: 76px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #1e293b, #334155);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 800;
  color: #ffffff;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  flex-shrink: 0;
}
.channel-avatar-lg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.channel-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.channel-title-lg {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-primary);
}
.verified-badge-lg {
  color: var(--tg-blue);
  display: flex;
  align-items: center;
}
.channel-handle-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}
.channel-handle-lg {
  font-size: 0.95rem;
  color: var(--tg-blue);
  font-weight: 600;
}
.entity-type-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  border: 1px solid var(--surface-border);
}
.subscribers-pill {
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  background: rgba(34, 158, 217, 0.1);
  color: var(--tg-blue);
  font-weight: 600;
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}
.modal-section {
  margin-bottom: 24px;
}
.modal-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.modal-section-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.live-pulse-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--green-badge);
  background: rgba(16, 185, 129, 0.12);
  padding: 2px 8px;
  border-radius: var(--radius-full);
}
.pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green-badge);
  animation: pulse 1.5s infinite;
}

.channel-description-full {
  font-size: 0.9rem;
  color: var(--text-primary);
  line-height: 1.6;
  white-space: pre-line;
  background: var(--surface-1);
  padding: 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--surface-border);
}

.modal-actions-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

/* Post Cards inside Modal */
.posts-feed {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.post-item-card {
  background: var(--surface-1);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  transition: border-color var(--transition-fast);
}
.post-item-card:hover {
  border-color: var(--surface-border-hover);
}
.post-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 0.75rem;
  color: var(--text-muted);
}
.post-item-date {
  color: var(--tg-blue);
  font-weight: 600;
}
.post-item-text {
  font-size: 0.85rem;
  color: var(--text-primary);
  line-height: 1.5;
  white-space: pre-line;
}
.post-item-footer {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
}
.post-item-link {
  color: var(--tg-blue);
  text-decoration: none;
  font-weight: 600;
}
.post-item-link:hover {
  text-decoration: underline;
}

/* ================= CATEGORIES VIEW ================= */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.section-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-primary);
}
.section-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}
.category-card {
  background: var(--surface-1);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  backdrop-filter: blur(12px);
  cursor: pointer;
  transition: all var(--transition-normal);
}
.category-card:hover {
  transform: translateY(-4px);
  border-color: var(--tg-blue);
  box-shadow: var(--shadow-glow);
}
.category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.category-name {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
}
.category-badge {
  font-size: 0.75rem;
  font-weight: 700;
  background: rgba(34, 158, 217, 0.15);
  color: var(--tg-blue);
  padding: 3px 8px;
  border-radius: var(--radius-full);
}
.category-samples {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}
.sample-item {
  font-size: 0.8rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}
.sample-item span {
  color: var(--tg-blue);
  font-weight: 600;
}

/* ================= HISTORY VIEW ================= */
.history-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 800px;
  margin-bottom: 40px;
}
.history-item {
  background: var(--surface-1);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.history-item:hover {
  background: var(--surface-2);
  border-color: var(--tg-blue);
}
.history-query {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
}
.history-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ================= TOAST NOTIFICATIONS ================= */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 2000;
  pointer-events: none;
}
.toast {
  background: var(--surface-3);
  border: 1px solid var(--surface-border);
  color: var(--text-primary);
  padding: 12px 18px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: toastIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: auto;
}
.toast-success { border-left: 4px solid var(--green-badge); }
.toast-info { border-left: 4px solid var(--tg-blue); }
.toast-error { border-left: 4px solid var(--danger-color); }

@keyframes toastIn {
  from { opacity: 0; transform: translateY(12px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ================= FOOTER ================= */
.app-footer {
  margin-top: 60px;
  padding: 40px 0 24px;
  border-top: 1px solid var(--surface-border);
  background: rgba(13, 20, 32, 0.4);
  border-radius: 20px 20px 0 0;
  backdrop-filter: blur(12px);
}
[data-theme="light"] .app-footer {
  background: rgba(255, 255, 255, 0.5);
}
.footer-container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 10px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.footer-top-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  align-items: start;
}
.footer-brand-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 440px;
}
.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}
.logo-icon-sm {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(145deg, #2AABEE 0%, #229ED9 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}
.logo-icon-sm svg {
  width: 16px;
  height: 16px;
}
.footer-brand-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}
.footer-brand-title strong {
  color: var(--tg-blue);
}
.footer-about-text {
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text-secondary);
}
.footer-col-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 14px;
}
.footer-nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-link {
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.footer-link:hover {
  color: var(--tg-blue);
  transform: translateX(3px);
}
.footer-status-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.footer-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: #34d399;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 999px;
  width: fit-content;
}
[data-theme="light"] .footer-status-pill {
  color: #059669;
}
.footer-live-stats {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}
.footer-bottom-bar {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 0.775rem;
  color: var(--text-muted);
}
[data-theme="light"] .footer-bottom-bar {
  border-top-color: rgba(0, 0, 0, 0.06);
}
.footer-disclaimer {
  font-style: italic;
  opacity: 0.85;
}

/* ================= RESPONSIVE & MOBILE OPTIMIZATIONS ================= */
@media (max-width: 900px) {
  .app-container {
    padding: 0 16px;
  }
  .app-header {
    flex-wrap: wrap;
    gap: 12px;
    padding: 10px 14px;
    margin-bottom: 20px;
  }
  .header-left {
    flex: 1;
  }
  .nav-tabs {
    order: 3;
    width: 100%;
    justify-content: space-around;
    padding: 4px;
    gap: 4px;
  }
  .nav-tab {
    flex: 1;
    justify-content: center;
    padding: 8px 10px;
    font-size: 0.8rem;
  }
  .search-title {
    font-size: 1.7rem;
    letter-spacing: -0.5px;
  }
  .search-desc {
    font-size: 0.9rem;
    padding: 0 10px;
  }
  .search-box-card {
    padding: 16px 14px;
  }
  .filter-row-top {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .type-filter-group {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }
  .type-btn {
    flex: 1;
    white-space: nowrap;
    justify-content: center;
  }
  .channel-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}

@media (max-width: 600px) {
  /* Mobile App Shell Experience */
  body {
    -webkit-tap-highlight-color: transparent;
  }
  .app-container {
    padding: 0 12px 30px;
  }
  .app-header {
    top: 6px;
    border-radius: 14px;
    padding: 8px 12px;
    margin-bottom: 14px;
  }
  .header-status-badge {
    display: none;
  }
  .logo-title {
    font-size: 1.15rem;
  }
  .logo-icon-wrap {
    width: 36px;
    height: 36px;
  }
  .logo-icon svg {
    width: 20px;
    height: 20px;
  }
  .btn-icon-export span {
    display: none;
  }
  .btn-icon-export {
    padding: 8px 10px;
  }

  /* Mobile Search Bar */
  .search-input-wrapper {
    flex-wrap: wrap;
    padding: 6px 8px;
    border-radius: 16px;
    gap: 8px;
  }
  .search-icon-lens {
    margin-left: 4px;
  }
  .search-input {
    font-size: 0.9rem;
    min-width: 150px;
  }
  .keyboard-hint {
    display: none;
  }
  .btn-search {
    width: 100%;
    padding: 12px 18px;
    font-size: 0.95rem;
    border-radius: 12px;
    margin-top: 4px;
  }

  /* Quick Tags on Mobile */
  .quick-tags {
    gap: 6px;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
  }
  .quick-tags-label {
    display: none;
  }
  .tag-pill {
    flex-shrink: 0;
    padding: 5px 10px;
    font-size: 0.775rem;
  }

  /* Mobile Channel Cards */
  .channel-card {
    padding: 14px;
    border-radius: 16px;
  }
  .card-top {
    gap: 10px;
  }
  .channel-avatar {
    width: 46px;
    height: 46px;
    min-width: 46px;
  }
  .card-title {
    font-size: 0.95rem;
  }
  .card-actions {
    flex-wrap: wrap;
    gap: 6px;
  }
  .card-actions .btn {
    flex: 1;
    min-width: 75px;
    padding: 8px 10px;
    font-size: 0.775rem;
    justify-content: center;
  }
  .btn-card-copy {
    flex: 0 0 38px;
  }

  /* Modal on Mobile: Fullscreen Bottom Sheet */
  .modal-backdrop {
    padding: 0;
    align-items: flex-end;
  }
  .modal-window {
    width: 100%;
    max-height: 92vh;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
    margin: 0;
  }
  .modal-header-banner {
    padding: 24px 16px 16px;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
  }
  .channel-title-row, .channel-handle-row {
    justify-content: center;
    flex-wrap: wrap;
  }
  .modal-actions-bar {
    flex-direction: column;
    gap: 8px;
  }
  .modal-actions-bar .btn {
    width: 100%;
    padding: 12px;
  }

  /* Footer on Mobile */
  .footer-top-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .footer-brand-col {
    max-width: 100%;
  }
  .footer-bottom-bar {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }
  .app-footer {
    padding: 30px 10px env(safe-area-inset-bottom, 20px);
  }
}

