/* ========== ПРИВЕТСТВЕННЫЙ ЭКРАН ========== */
.premium-welcome {
  max-width: 100% !important; width: 100% !important;
  padding: 60px 16px 0 !important;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  flex: 1; margin-top: 0; transition: transform 0.1s linear;
}
.welcome-title {
  font-size: 28px; font-weight: 700; line-height: 36px;
  color: var(--text-primary); margin-bottom: 12px; text-align: center;
  animation: welcomeFadeIn 0.8s ease both;
}
.welcome-title .gradient-text {
  background: linear-gradient(135deg, #0071e3, #af52de, #ff6b9d, #ff9500, #0071e3);
  background-size: 300% 300%;
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; animation: gradientShift 4s ease infinite;
  position: relative; display: inline-block;
}
.welcome-title .gradient-text::after {
  content: ''; position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%); width: 120%; height: 120%;
  background: radial-gradient(ellipse, rgba(0,113,227,0.15) 0%, transparent 70%);
  pointer-events: none; animation: glowPulse 3s ease-in-out infinite;
}

@keyframes glowPulse {
  0%, 100% { opacity: 0.5; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.15); }
}

.greeting-text { animation: greetingPulse 2s ease-in-out infinite; display: inline-block; position: relative; }
.greeting-text::before { content: '✨'; position: absolute; left: -28px; top: 50%; transform: translateY(-50%); font-size: 0.8em; }

.welcome-divider { width: 40px; height: 2px; background: var(--accent); border-radius: 1px; margin: 16px auto; opacity: 0.5; animation: welcomeFadeIn 0.8s 0.3s ease both; }

@keyframes greetingPulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.8; transform: scale(1.03); } }
@keyframes welcomeFadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes gradientShift { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }

.welcome-online { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 13px; color: var(--text-tertiary); margin-bottom: 20px; animation: welcomeFadeIn 0.8s 0.25s ease both; }
.welcome-actions { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-bottom: 20px; }

.btn-login-welcome {
  text-decoration: none; color: #fff; font-size: 15px; font-weight: 600;
  padding: 12px 32px; border-radius: var(--radius-round);
  background: linear-gradient(135deg, #0071e3, #0a84ff, #409cff, #0071e3);
  background-size: 300% 300%; box-shadow: 0 4px 16px rgba(0, 113, 227, 0.4);
  transition: all 0.4s cubic-bezier(0.22, 0.61, 0.36, 1); animation: welcomeFadeIn 0.8s 0.3s ease both;
}
.btn-login-welcome:hover {
  background-position: 100% 50%; box-shadow: 0 12px 36px rgba(0, 113, 227, 0.7), 0 0 60px rgba(0, 113, 227, 0.3);
  transform: translateY(-3px) scale(1.03);
}

.welcome-free-badge { font-size: 12px; color: var(--text-tertiary); animation: welcomeFadeIn 0.8s 0.35s ease both; }
.welcome-subtitle { font-size: 14px; color: var(--text-secondary); margin-bottom: 16px; text-align: center; animation: welcomeFadeIn 0.8s 0.2s ease both; max-width: 460px; margin-left: auto; margin-right: auto; }

.welcome-scroll-hint {
  display: flex; align-items: center; justify-content: center; gap: 4px;
  font-size: 12px; color: var(--text-tertiary); margin-bottom: 16px;
  animation: welcomeFadeIn 0.8s 0.4s ease both, bounceDown 2s ease-in-out infinite; cursor: default;
}
.welcome-scroll-hint i { width: 14px; height: 14px; }

@keyframes bounceDown { 0%, 100% { transform: translateY(0); opacity: 0.6; } 50% { transform: translateY(6px); opacity: 1; } }

/* ========== КАРУСЕЛЬ КАТЕГОРИЙ ========== */
.premium-categories-wrapper {
  position: relative;
  width: 100%;
  max-width: 900px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0 auto 14px;
  animation: welcomeFadeIn 0.8s 0.4s ease both;
  padding: 0 8px;
}
.premium-categories-wrapper::before,
.premium-categories-wrapper::after {
  content: ''; position: absolute; top: 0; bottom: 0; width: 30px; z-index: 3; pointer-events: none;
}
.premium-categories-wrapper::before { left: 0; background: linear-gradient(to right, var(--bg-base), transparent); }
.premium-categories-wrapper::after { right: 0; background: linear-gradient(to left, var(--bg-base), transparent); }

.premium-categories {
  display: flex; gap: 8px; overflow-x: auto; scroll-behavior: smooth;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
  padding: 6px 2px; scroll-snap-type: x mandatory; 
  width: 100%;
  max-width: 850px;
}
.premium-categories::-webkit-scrollbar { display: none; }

.premium-cat-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 16px;
  min-width: 155px;
  cursor: pointer;
  flex-shrink: 0;
  scroll-snap-align: start;
  transition: all 0.3s cubic-bezier(0.22, 0.61, 0.36, 1);
  box-sizing: border-box;
  position: relative;
}
.premium-cat-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.3);
}

.premium-cat-tag {
  font-size: 9px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.premium-cat-icon-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.premium-cat-icon {
  font-size: 24px;
  flex-shrink: 0;
  width: auto;
  height: auto;
  border-radius: 0;
  background: none;
  display: inline;
}

.premium-cat-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.premium-cat-desc {
  font-size: 10px;
  color: var(--text-tertiary);
  line-height: 1.4;
  display: block;
}

.premium-cat-info { display: none; }
.premium-cat-arrow { display: none; }

.carousel-arrow {
  width: 32px; height: 32px; border-radius: 50%; background: rgba(44, 44, 46, 0.85);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1); color: var(--text-primary);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-size: 16px; transition: all 0.2s ease; z-index: 2; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}
.carousel-arrow:hover { background: var(--bg-hover); border-color: var(--accent); transform: scale(1.1); }
.carousel-arrow:active { transform: scale(0.95); }
.carousel-arrow.prev { margin-right: 2px; }
.carousel-arrow.next { margin-left: 2px; }

.carousel-dots { display: flex; justify-content: center; gap: 6px; margin-top: 8px; }
.carousel-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--border-l2); transition: all 0.3s ease; cursor: pointer; }
.carousel-dot.active { background: var(--accent); width: 18px; border-radius: 3px; }

.trending-questions { width: 100%; margin-top: 12px; margin-bottom: 10px; text-align: center; }
.trending-label { font-size: 12px; font-weight: 500; color: var(--orange); display: block; margin-bottom: 8px; text-align: center; animation: flicker 2s ease-in-out infinite; }
@keyframes flicker { 0%, 100% { opacity: 1; } 50% { opacity: 0.7; } }

.btn-all-categories {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--bg-input); border: 1px solid var(--border-l2);
  color: var(--text-tertiary); padding: 8px 16px; border-radius: var(--radius-round);
  cursor: pointer; font-size: 13px; font-weight: 500;
  transition: all var(--transition-duration-fast) var(--ease-in-out);
  margin-bottom: 8px; margin-top: 14px; font-family: var(--font-family);
  animation: welcomeFadeIn 0.8s 0.6s ease both, btnPulseStrong 3s 1s ease-in-out infinite;
}
.btn-all-categories:hover { background: var(--border-l2); color: var(--text-primary); }
@keyframes btnPulseStrong { 0%, 100% { box-shadow: 0 0 0 0 rgba(0, 113, 227, 0.4); } 50% { box-shadow: 0 0 0 12px rgba(0, 113, 227, 0); } }

/* ========== HEARTBEAT ========== */
@keyframes heartBeat { 0%,100%{transform:scale(1)} 15%{transform:scale(1.25)} 30%{transform:scale(1)} 45%{transform:scale(1.15)} 60%{transform:scale(1)} }
@keyframes bounceIn { 0%{transform:scale(0.3);opacity:0} 50%{transform:scale(1.05)} 70%{transform:scale(0.9)} 100%{transform:scale(1);opacity:1} }
@keyframes slideUp { from{opacity:0;transform:translateY(24px)} to{opacity:1;transform:translateY(0)} }
@keyframes dotBlink { 0%,100%{opacity:1} 50%{opacity:.3} }
@keyframes progressPulse { 0%,100%{opacity:1} 50%{opacity:.6} }

/* ========== НЕДАВНИЕ СФЕРЫ ========== */
.recent-experts-block {
  width: 100%;
  margin-top: 10px;
  margin-bottom: 4px;
}

.recent-experts-label {
  font-size: 10px;
  font-weight: 700;
  color: #8e8e93;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
  padding: 0 2px;
}

.recent-experts-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-left: 0;
}

.recent-expert-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px 8px 4px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  background: transparent;
  font-family: inherit;
  text-align: left;
  color: #8e8e93;
  transition: all 0.2s;
}

.recent-expert-item:hover {
  color: #1d1d1f;
  background: rgba(0,0,0,0.03);
}

.rc-icon {
  font-size: 16px;
  flex-shrink: 0;
}

.rc-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rc-dot, .rc-arrow { display: none; }

.num-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.recent-expert-item:nth-child(1) .num-dot { background: #0071e3; }
.recent-expert-item:nth-child(2) .num-dot { background: #af52de; }
.recent-expert-item:nth-child(3) .num-dot { background: #34c759; }

/* ========== ВИДЕО-СЕТКА 2×2 (8:5) ========== */
.welcome-video-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  width: 100%;
  max-width: 600px;
  margin: 16px auto;
  padding: 0 12px;
}

.welcome-video-card {
  transition: all 0.3s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.welcome-video-card:hover {
  transform: scale(1.03);
}

.welcome-video-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 8/5;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0,0,0,0.4);
  border: 1px solid rgba(255,255,255,0.06);
}
.welcome-video-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.welcome-video-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px 14px;
  background: linear-gradient(transparent, rgba(0,0,0,0.85));
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.02em;
}

.welcome-video-features {
  display: flex;
  gap: 10px;
  margin: 16px 0 0;
  flex-wrap: wrap;
  justify-content: center;
}
.welcome-video-features span {
  background: rgba(124, 58, 237, 0.1);
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 500;
  color: #a78bfa;
  border: 1px solid rgba(124, 58, 237, 0.2);
}

/* ========== ВИДЕО-ЛАЙТБОКС ========== */
.video-lightbox {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.video-lightbox.active {
  opacity: 1;
}
.video-lightbox-backdrop {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.9);
  backdrop-filter: blur(20px);
}
.video-lightbox-content {
  position: relative;
  z-index: 1;
  width: 90%;
  max-width: 800px;
  animation: lightboxIn 0.4s cubic-bezier(0.22, 0.61, 0.36, 1);
}
@keyframes lightboxIn {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.video-lightbox-close {
  position: absolute;
  top: -40px;
  right: 0;
  background: rgba(255,255,255,0.1);
  border: none;
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.video-lightbox-close:hover {
  background: rgba(255,255,255,0.2);
}
.video-lightbox-player {
  width: 100%;
  border-radius: 16px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
}
.video-lightbox-label {
  text-align: center;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  margin-top: 12px;
}