:root {
  --bg-color: #08090f;
  --bg-secondary: #0f101b;
  --card-bg: rgba(18, 19, 31, 0.85);
  --card-border: rgba(255, 255, 255, 0.08);
  --card-hover-border: rgba(168, 85, 247, 0.35);
  --card-highlight: rgba(168, 85, 247, 0.08);
  
  --brand-purple: #a855f7;
  --brand-purple-light: #c084fc;
  --brand-purple-dark: #7c3aed;
  --brand-purple-glow: rgba(168, 85, 247, 0.35);
  
  --accent: #a855f7;
  --accent-gradient: linear-gradient(135deg, #a855f7 0%, #7c3aed 100%);
  --accent-card-gradient: linear-gradient(155deg, rgba(38, 24, 66, 0.75) 0%, rgba(16, 17, 28, 0.95) 100%);
  
  --text-main: #f9fafb;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --success: #22c55e;
  --success-glow: rgba(34, 197, 94, 0.3);
  --warning: #f59e0b;
  --danger: #ef4444;
  
  --radius-xl: 20px;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: #040408;
  color: var(--text-main);
  line-height: 1.45;
  user-select: none;
  overflow-x: hidden;
  display: flex;
  justify-content: center;
  min-height: 100vh;
}

#appContent, .loader-container {
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  background-color: var(--bg-color);
  padding-bottom: 96px;
  position: relative;
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.85);
  border-left: 1px solid rgba(255, 255, 255, 0.05);
  border-right: 1px solid rgba(255, 255, 255, 0.05);
}

/* Header */
.app-header {
  padding: 10px 16px;
  background: rgba(10, 11, 18, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.header-top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: 100%;
}

.header-left {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.header-center {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.header-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.brand-logo-wrap {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #05060b;
  border: 2px solid var(--brand-purple);
  box-shadow: 0 0 16px var(--brand-purple-glow), 0 0 32px rgba(168, 85, 247, 0.4);
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s ease;
  flex-shrink: 0;
}

.brand-logo-wrap:active {
  transform: scale(0.92);
}

.brand-logo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.42);
  display: block;
  pointer-events: none;
}

.brand-name {
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.2px;
  line-height: 1.2;
  white-space: nowrap;
}

.header-user-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(168, 85, 247, 0.15);
  border: 1.5px solid rgba(168, 85, 247, 0.35);
  color: var(--brand-purple-light);
  font-weight: 700;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}

.header-user-btn:active {
  transform: scale(0.92);
}

/* Main Container */
.container {
  padding: 16px 18px;
}

.section-tag {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 1.2px;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.main-title {
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.counter-badge {
  font-size: 0.85rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  padding: 2px 9px;
  border-radius: 12px;
}

.icon-circle-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.icon-circle-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(168, 85, 247, 0.3);
  color: var(--text-main);
}

.icon-circle-btn:active {
  transform: scale(0.9);
  color: var(--brand-purple-light);
  border-color: rgba(168, 85, 247, 0.6);
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.3);
}

.icon-circle-btn.refreshing {
  border-color: rgba(168, 85, 247, 0.7);
  color: var(--brand-purple-light);
  background: rgba(168, 85, 247, 0.12);
  box-shadow: 0 0 14px rgba(168, 85, 247, 0.45);
  pointer-events: none;
}

.icon-circle-btn.refreshing svg {
  animation: spinRefreshBtn 0.75s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes spinRefreshBtn {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Top Monitoring Card */
.monitoring-card {
  background: var(--accent-card-gradient);
  border: 1px solid rgba(168, 85, 247, 0.28);
  border-radius: var(--radius-xl);
  padding: 18px 20px;
  margin-bottom: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(168, 85, 247, 0.2);
  position: relative;
  overflow: hidden;
}

.monitoring-card::before {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 140px;
  height: 140px;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.2) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.monitoring-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #f3f4f6;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--success);
  box-shadow: 0 0 10px var(--success-glow);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
  70% { transform: scale(1.1); box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.badge-pill {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(168, 85, 247, 0.15);
  color: var(--brand-purple-light);
  border: 1px solid rgba(168, 85, 247, 0.35);
  cursor: pointer;
}

.metrics-columns {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.metric-num-col {
  display: flex;
  flex-direction: column;
}

.metric-num-label {
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.metric-num-val {
  font-size: 1.9rem;
  font-weight: 800;
  color: #ffffff;
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.metric-num-total {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-dim);
}

.arrow-up {
  color: var(--brand-purple-light);
  font-size: 1.3rem;
}

.metric-v-divider {
  width: 1px;
  height: 42px;
  background: rgba(255, 255, 255, 0.1);
}

/* Glow Progress Bar */
.glow-progress {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 14px;
  position: relative;
}

.glow-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #9333ea 0%, #c084fc 100%);
  border-radius: 10px;
  box-shadow: 0 0 12px rgba(192, 132, 252, 0.8), 0 0 4px #c084fc;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 0%;
}

.monitoring-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.refresh-mini-btn {
  cursor: pointer;
  opacity: 0.7;
  transition: var(--transition);
}

.refresh-mini-btn:hover {
  opacity: 1;
  color: var(--brand-purple-light);
}

/* Primary Action Button */
.btn-primary-action {
  width: 100%;
  padding: 16px 20px;
  background: var(--accent-gradient);
  border: none;
  border-radius: var(--radius-lg);
  color: #ffffff;
  font-size: 1.05rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 8px 24px rgba(168, 85, 247, 0.4);
  cursor: pointer;
  transition: var(--transition);
  margin-bottom: 16px;
}

.btn-primary-action:active {
  transform: scale(0.98);
  box-shadow: 0 4px 14px rgba(168, 85, 247, 0.3);
}

.plus-icon {
  width: 20px;
  height: 20px;
}

/* 3 Quick Action Tiles */
.tiles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 24px;
}

.feature-tile {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 14px 8px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: var(--transition);
}

.feature-tile:active {
  transform: scale(0.96);
  border-color: rgba(168, 85, 247, 0.4);
}

.tile-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2px;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease;
}

.tile-icon.wheel-icon {
  background: radial-gradient(circle at 30% 30%, rgba(250, 204, 21, 0.18), rgba(168, 85, 247, 0.15));
  border: 1px solid rgba(250, 204, 21, 0.35);
  box-shadow: 0 0 14px rgba(250, 204, 21, 0.12), inset 0 1px 1px rgba(255, 255, 255, 0.15);
}

.tile-icon.promo-icon {
  background: radial-gradient(circle at 30% 30%, rgba(56, 189, 248, 0.18), rgba(168, 85, 247, 0.15));
  border: 1px solid rgba(56, 189, 248, 0.35);
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.12), inset 0 1px 1px rgba(255, 255, 255, 0.15);
}

.tile-icon.ref-icon {
  background: radial-gradient(circle at 30% 30%, rgba(52, 211, 153, 0.18), rgba(16, 185, 129, 0.12));
  border: 1px solid rgba(52, 211, 153, 0.35);
  box-shadow: 0 0 14px rgba(52, 211, 153, 0.12), inset 0 1px 1px rgba(255, 255, 255, 0.15);
}

.feature-tile:hover .tile-icon {
  transform: translateY(-2px) scale(1.06);
}

.tile-title {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
}

/* Section: Ваши поиски */
.section-subtitle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.subsection-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
}

.count-text {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Chips Filter */
.filter-chips {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  overflow-x: auto;
  scrollbar-width: none;
}

.filter-chips::-webkit-scrollbar {
  display: none;
}

.chip {
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.chip.active {
  background: rgba(168, 85, 247, 0.2);
  border-color: rgba(168, 85, 247, 0.45);
  color: #f3e8ff;
}

/* Filter Card (Competitor inspired) */
.filter-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 12px;
  transition: var(--transition);
  position: relative;
}

.filter-card:hover {
  border-color: var(--card-hover-border);
}

.card-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.platform-badge {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.6px;
  padding: 3px 8px;
  border-radius: 6px;
  text-transform: uppercase;
}

.platform-badge.kufar {
  background: rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
}

.platform-badge.avby {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
}

.platform-badge.auto {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
}

.platform-badge.realty {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
}

.status-dot-active {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--success);
  display: flex;
  align-items: center;
  gap: 5px;
}

.status-dot-paused {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--warning);
  display: flex;
  align-items: center;
  gap: 5px;
}

.card-main-title {
  font-size: 1.08rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-title-icon-wrapper {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.card-desc-text {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 12px;
  word-break: break-all;
}

.card-stats-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  margin-bottom: 12px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.card-stats-row strong {
  color: #ffffff;
}

.card-controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: nowrap;
}

.card-switches-group {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: nowrap;
  min-width: 0;
}

.switch-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-muted);
  user-select: none;
  cursor: pointer;
}

.switch-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}

.switch-icon.active {
  color: #c084fc;
  opacity: 1;
}

.switch-icon.inactive {
  color: var(--text-muted);
  opacity: 0.45;
}

.switch-icon:hover {
  transform: scale(1.08);
}

.switch-icon:active {
  transform: scale(0.92);
}

.switch-icon-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.switch-icon-label .switch-text {
  font-size: 0.77rem;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
  transition: color 0.2s ease;
}

.switch-icon-label.active .switch-text {
  color: var(--text-main);
}

.switch-icon-label.inactive .switch-text {
  color: var(--text-muted);
  opacity: 0.5;
}

.switch-icon-label.active .switch-icon {
  color: #c084fc;
  opacity: 1;
}

.switch-icon-label.inactive .switch-icon {
  color: var(--text-muted);
  opacity: 0.45;
}

.switch-icon-label:hover .switch-icon {
  transform: scale(1.08);
}

.switch-icon-label:active .switch-icon {
  transform: scale(0.92);
}

/* Switch Styles - Original full size */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(255, 255, 255, 0.16);
  transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--brand-purple);
}

input:checked + .slider:before {
  transform: translateX(20px);
}

.card-btn-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.card-action-btn {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: var(--transition);
}

.card-action-btn:active {
  transform: scale(0.94);
}

.card-action-btn.delete {
  color: var(--danger);
  border-color: rgba(239, 68, 68, 0.2);
  background: rgba(239, 68, 68, 0.08);
  min-width: 34px;
  height: 32px;
  padding: 6px 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Tab Switching System */
.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
  animation: fadeIn 0.24s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Bottom Navigation Bar (5 Items) */
.nav-bar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  background: rgba(11, 12, 21, 0.94);
  backdrop-filter: blur(24px);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  padding: 6px 8px 12px;
  z-index: 100;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: none;
  border: none;
  color: #71717a;
  cursor: pointer;
  padding: 4px 2px;
  transition: var(--transition);
}

.nav-icon-wrapper {
  width: 48px;
  height: 28px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.nav-label {
  font-size: 0.68rem;
  font-weight: 500;
  transition: var(--transition);
}

.nav-item.active .nav-icon-wrapper {
  background: rgba(168, 85, 247, 0.22);
  color: var(--brand-purple-light);
  box-shadow: 0 0 16px rgba(168, 85, 247, 0.35);
}

.nav-item.active .nav-label {
  color: #f3e8ff;
  font-weight: 700;
}

/* Tab 2: Подписка (Competitor style) */
.tier-hero-card {
  background: var(--accent-card-gradient);
  border: 1px solid rgba(168, 85, 247, 0.3);
  border-radius: var(--radius-xl);
  padding: 22px;
  margin-bottom: 20px;
  position: relative;
}

.tier-hero-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 12px;
}

.tier-hero-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 4px;
}

.tier-hero-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.tier-badges-row {
  display: flex;
  gap: 8px;
  margin: 16px 0;
}

.tier-chip-badge {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.78rem;
  font-weight: 600;
  color: #f3e8ff;
}

.payment-methods-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}

.payment-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 16px 14px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.payment-card.active {
  border-color: rgba(168, 85, 247, 0.6);
  background: rgba(168, 85, 247, 0.12);
}

.payment-card-title {
  font-size: 0.95rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.payment-card-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.tariff-item {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: var(--transition);
}

.tariff-item:hover {
  border-color: rgba(168, 85, 247, 0.35);
}

.tariff-info-title {
  font-size: 0.98rem;
  font-weight: 700;
  color: #ffffff;
}

.tariff-info-sub {
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.tariff-price {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--brand-purple-light);
}

/* Subscription Sub-Tabs & Tariff Cards */
.sub-tabs-container {
  display: flex;
  gap: 6px;
  background: rgba(255, 255, 255, 0.05);
  padding: 4px;
  border-radius: 12px;
  margin-bottom: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.sub-tab-btn {
  flex: 1;
  padding: 9px 4px;
  font-size: 0.84rem;
  font-weight: 700;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.sub-tab-btn.active {
  background: var(--brand-purple);
  color: #ffffff;
  box-shadow: 0 0 12px var(--brand-purple-glow);
}

.sub-pane {
  display: none;
  flex-direction: column;
  gap: 12px;
  animation: fadeIn 0.2s ease;
}

.sub-pane.active {
  display: flex;
}

.tariff-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.tariff-card:hover {
  border-color: rgba(168, 85, 247, 0.4);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

.tariff-card.featured {
  border-color: rgba(168, 85, 247, 0.45);
  background: linear-gradient(160deg, rgba(38, 24, 66, 0.6) 0%, rgba(18, 19, 31, 0.95) 100%);
}

.tariff-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.tariff-card-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.tariff-title-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.tariff-card-title {
  font-size: 1.02rem;
  font-weight: 800;
  color: #ffffff;
}

.tariff-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(168, 85, 247, 0.2);
  color: var(--brand-purple-light);
  border: 1px solid rgba(168, 85, 247, 0.35);
}

.tariff-badge.discount {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.4);
}

.tariff-badge.turbo {
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.4);
}

.tariff-card-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.35;
}

.tariff-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 2px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.tariff-card-prices {
  display: flex;
  flex-direction: column;
}

.tariff-card-stars {
  font-size: 1.25rem;
  font-weight: 900;
  color: #facc15;
  display: flex;
  align-items: center;
  gap: 4px;
}

.tariff-card-old-stars {
  font-size: 0.82rem;
  color: var(--text-dim);
  text-decoration: line-through;
  margin-right: 4px;
}

.tariff-card-byn {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.tariff-card-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-tariff-pay {
  background: var(--accent-gradient);
  color: #ffffff;
  border: none;
  border-radius: 10px;
  padding: 10px 16px;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 0 12px var(--brand-purple-glow);
  transition: var(--transition);
}

.btn-tariff-pay:active {
  transform: scale(0.96);
}

.btn-tariff-sandbox {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-muted);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-tariff-sandbox:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.btn-tariff-free {
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #4ade80;
  border-radius: 10px;
  padding: 9px 14px;
  font-size: 0.82rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: default;
  user-select: none;
  white-space: nowrap;
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.1);
}

/* Tab 3: Избранное */
.fav-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.fav-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 16px;
  transition: var(--transition);
}

.fav-card:hover {
  border-color: rgba(168, 85, 247, 0.35);
}

.fav-card-price {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--success);
  margin: 6px 0 10px;
}

.fav-link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 10px;
  border-radius: var(--radius-md);
  background: rgba(168, 85, 247, 0.15);
  border: 1px solid rgba(168, 85, 247, 0.35);
  color: #f3e8ff;
  font-weight: 600;
  font-size: 0.85rem;
  text-decoration: none;
  transition: var(--transition);
  cursor: pointer;
  font-family: inherit;
}

.fav-link-btn:active {
  background: var(--brand-purple);
  color: #ffffff;
}

/* Tab 4: Профиль (Competitor style) */
.profile-user-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-xl);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
}

.profile-avatar-large {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 800;
  color: #ffffff;
  box-shadow: 0 4px 18px var(--brand-purple-glow);
}

.profile-names h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
}

.profile-names p {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.profile-id-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--brand-purple-light);
  margin-top: 4px;
  cursor: pointer;
}

.profile-tiles-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 16px 0;
}

.profile-grid-tile {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: var(--transition);
}

.profile-grid-tile:active {
  transform: scale(0.97);
  border-color: rgba(168, 85, 247, 0.4);
}

.tile-square-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: rgba(168, 85, 247, 0.15);
  color: var(--brand-purple-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.tile-square-icon.wheel-icon {
  background: radial-gradient(circle at 30% 30%, rgba(250, 204, 21, 0.18), rgba(168, 85, 247, 0.15));
  border: 1px solid rgba(250, 204, 21, 0.35);
  box-shadow: 0 0 10px rgba(250, 204, 21, 0.12);
}

.tile-square-icon.promo-icon {
  background: radial-gradient(circle at 30% 30%, rgba(56, 189, 248, 0.18), rgba(168, 85, 247, 0.15));
  border: 1px solid rgba(56, 189, 248, 0.35);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.12);
}

.tile-square-icon.ref-icon {
  background: radial-gradient(circle at 30% 30%, rgba(52, 211, 153, 0.18), rgba(16, 185, 129, 0.12));
  border: 1px solid rgba(52, 211, 153, 0.35);
  box-shadow: 0 0 10px rgba(52, 211, 153, 0.12);
}

.tile-square-icon.insta-icon {
  background: radial-gradient(circle at 30% 30%, rgba(236, 72, 153, 0.18), rgba(168, 85, 247, 0.15));
  border: 1px solid rgba(236, 72, 153, 0.35);
  box-shadow: 0 0 10px rgba(236, 72, 153, 0.12);
}

.tile-square-icon.tiktok-icon {
  background: radial-gradient(circle at 30% 30%, rgba(0, 242, 254, 0.15), rgba(254, 9, 121, 0.15));
  border: 1px solid rgba(0, 242, 254, 0.35);
  box-shadow: 0 0 10px rgba(0, 242, 254, 0.12);
}

/* Floating Cyber Toast Notification */
.cyber-toast {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%) translateY(-35px);
  background: rgba(19, 20, 36, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(168, 85, 247, 0.45);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.65), 0 0 18px rgba(168, 85, 247, 0.25);
  color: #ffffff;
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 600;
  z-index: 999999;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: center;
  max-width: 90vw;
  white-space: nowrap;
}

.cyber-toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.settings-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Tab 5: Помощь (Help) */
.help-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 18px;
  margin-bottom: 12px;
}

.help-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.help-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: #ffffff;
}

.help-guide-pane {
  animation: helpFadeIn 0.22s ease-out;
}

@keyframes helpFadeIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.help-step-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 10px;
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.48;
}

.help-step-item strong {
  color: #ffffff;
}

.step-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(168, 85, 247, 0.2);
  color: var(--brand-purple-light);
  font-weight: 700;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.faq-item {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  margin-bottom: 8px;
  overflow: hidden;
  transition: all 0.2s ease;
}

.faq-item.open {
  border-color: rgba(168, 85, 247, 0.4);
  background: rgba(255, 255, 255, 0.035);
}

.faq-question {
  padding: 13px 16px;
  font-size: 0.88rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  gap: 10px;
}

.faq-answer {
  padding: 0 16px 14px;
  font-size: 0.81rem;
  color: var(--text-muted);
  display: none;
  line-height: 1.55;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 10px;
}

.faq-item.open .faq-answer {
  display: block;
}

.faq-item.open .faq-arrow {
  transform: rotate(180deg);
  color: var(--brand-purple-light) !important;
}

.faq-arrow {
  transition: transform 0.25s ease, color 0.2s ease;
}

/* Modal Bottom Sheets */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-sheet {
  width: 100%;
  max-width: 480px;
  background: #11121d;
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
  border: 1px solid rgba(168, 85, 247, 0.3);
  border-bottom: none;
  padding: 24px 20px 32px;
  transform: translateY(100%);
  transition: transform 0.28s cubic-bezier(0.32, 1, 0.23, 1);
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.8);
  max-height: 90vh;
  overflow-y: auto;
}

.modal-overlay.open .modal-sheet {
  transform: translateY(0);
}

.modal-handle {
  width: 40px;
  height: 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.2);
  margin: -8px auto 16px;
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.4rem;
  cursor: pointer;
}

.input-field {
  width: 100%;
  height: 44px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  padding: 0 14px;
  color: #ffffff;
  font-size: 0.9rem;
  margin-bottom: 12px;
  outline: none;
  box-sizing: border-box;
  transition: var(--transition);
}

.input-field:focus {
  border-color: var(--brand-purple);
  box-shadow: 0 0 10px var(--brand-purple-glow);
}

/* Скрываем стрелки-спиннеры у числовых инпутов для единого визуального стиля */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

/* Create Filter Tabs */
.create-filter-tabs {
  display: flex;
  gap: 6px;
  background: rgba(255, 255, 255, 0.05);
  padding: 4px;
  border-radius: 12px;
  margin-bottom: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.create-tab-btn {
  flex: 1;
  padding: 9px 4px;
  font-size: 0.84rem;
  font-weight: 700;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.create-tab-btn.active {
  background: var(--brand-purple);
  color: #ffffff;
  box-shadow: 0 0 12px var(--brand-purple-glow);
}

.create-tab-pane {
  display: none;
  animation: fadeIn 0.2s ease;
}

.create-tab-pane.active {
  display: block;
}

.segmented-control {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.segmented-btn {
  flex: 1;
  padding: 9px 10px;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.segmented-btn.active {
  background: rgba(168, 85, 247, 0.2);
  border-color: var(--brand-purple);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.3);
}

.form-group {
  margin-bottom: 12px;
}

.form-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.select-field {
  width: 100%;
  height: 44px;
  background-color: #161828;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  padding: 0 32px 0 14px;
  color: #ffffff;
  font-size: 0.9rem;
  outline: none;
  box-sizing: border-box;
  transition: var(--transition);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23a855f7' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  cursor: pointer;
}

.select-field:focus {
  border-color: var(--brand-purple);
  box-shadow: 0 0 10px var(--brand-purple-glow);
}

.select-field option {
  background: #11121d;
  color: #ffffff;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.form-row-2 .input-field,
.form-row-2 .select-field {
  margin-bottom: 0;
  height: 44px;
}

.form-row-price {
  display: grid;
  grid-template-columns: 1fr 1fr 92px;
  gap: 8px;
  align-items: center;
}

.form-row-price .input-field,
.form-row-price .select-field {
  margin-bottom: 0;
  height: 44px;
}

.currency-select {
  padding: 0 24px 0 10px;
  text-align: center;
  font-weight: 600;
  background-position: right 8px center;
}

.rooms-chips-group {
  display: flex;
  gap: 8px;
}

.room-chip {
  flex: 1;
  padding: 8px 0;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.room-chip.active {
  background: var(--brand-purple);
  border-color: var(--brand-purple-light);
  color: #ffffff;
  box-shadow: 0 0 8px rgba(168, 85, 247, 0.4);
}

/* Loader */
.loader-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 350px;
  gap: 16px;
}

.spinner {
  width: 42px;
  height: 42px;
  border: 3.5px solid rgba(168, 85, 247, 0.2);
  border-top-color: var(--brand-purple);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: 12px;
  opacity: 0.7;
}

/* ==========================================
   WHEEL OF FORTUNE (КОЛЕСО ФОРТУНЫ)
   ========================================== */
.wheel-wrapper {
  position: relative;
  width: 290px;
  height: 290px;
  margin: 12px auto 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wheel-canvas {
  width: 280px;
  height: 280px;
  border-radius: 50%;
  box-shadow: 0 0 35px rgba(168, 85, 247, 0.4), inset 0 0 16px rgba(0, 0, 0, 0.7);
  border: 4px solid rgba(168, 85, 247, 0.5);
  display: block;
}

.wheel-pointer {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 13px solid transparent;
  border-right: 13px solid transparent;
  border-top: 26px solid #facc15;
  filter: drop-shadow(0 4px 10px rgba(250, 204, 21, 0.6));
  z-index: 10;
  pointer-events: none;
}

.wheel-center-cap {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: radial-gradient(circle, #c084fc 0%, #7c3aed 70%, #4c1d95 100%);
  border: 3px solid #facc15;
  box-shadow: 0 0 18px rgba(168, 85, 247, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  z-index: 5;
  pointer-events: none;
}

.wheel-cooldown-badge {
  background: rgba(168, 85, 247, 0.12);
  border: 1px solid rgba(168, 85, 247, 0.3);
  border-radius: 20px;
  padding: 6px 16px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--brand-purple-light);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
}

.wheel-result-card {
  background: rgba(168, 85, 247, 0.12);
  border: 1px solid rgba(168, 85, 247, 0.35);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin: 10px 0 14px;
  display: none;
  animation: fadeIn 0.3s ease-out;
}

.wheel-result-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #ffffff;
}

.wheel-result-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Анимация подсветки только что созданного фильтра */
@keyframes pulseGlow {
  0% {
    box-shadow: 0 0 0 rgba(168, 85, 247, 0);
    border-color: #a855f7;
  }
  30% {
    box-shadow: 0 0 28px rgba(168, 85, 247, 0.8), 0 0 8px #c084fc;
    border-color: #c084fc;
  }
  70% {
    box-shadow: 0 0 16px rgba(168, 85, 247, 0.4);
    border-color: #a855f7;
  }
  100% {
    box-shadow: 0 0 0 rgba(168, 85, 247, 0);
    border-color: var(--card-border);
  }
}

.card-just-added {
  animation: pulseGlow 2.8s ease-out;
}

/* Микро-анимация обновления времени сканирования */
@keyframes timeGlow {
  0% {
    color: #facc15;
    text-shadow: 0 0 10px rgba(250, 204, 21, 0.9);
  }
  100% {
    color: inherit;
    text-shadow: none;
  }
}

.time-pulse {
  display: inline-block;
  animation: timeGlow 1.2s ease-out;
}


