
:root {
  color-scheme: dark;
  accent-color: var(--color-primary);
  --font-title: 'Outfit', sans-serif;
  --font-body: 'Manrope', sans-serif;

  /* Dark Theme (Default) */
  --bg-main: #0c0813;
  --bg-card: rgba(22, 14, 36, 0.6);
  --bg-card-hover: rgba(30, 20, 48, 0.85);
  --bg-input: rgba(13, 7, 22, 0.7);
  --border-color: rgba(139, 92, 246, 0.2);
  --border-color-hover: rgba(217, 70, 239, 0.4);
  
  --color-text: #f3f1f6;
  --color-text-muted: #a78bfa;
  --color-primary: #8b5cf6;
  --color-primary-glow: rgba(139, 92, 246, 0.35);
  --color-secondary: #d946ef;
  --color-secondary-glow: rgba(217, 70, 239, 0.35);
  --color-accent: #f472b6;
  
  --gradient-primary: linear-gradient(135deg, #8b5cf6 0%, #d946ef 100%);
  --gradient-card: linear-gradient(135deg, rgba(22, 14, 36, 0.8) 0%, rgba(13, 7, 22, 0.9) 100%);
  --shadow-main: 0 8px 32px 0 rgba(0, 0, 0, 0.47);
  --shadow-glow: 0 0 25px var(--color-primary-glow);
  --radius: 16px;
  
  --transition-fast: 0.2s ease;
  --transition-normal: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-theme: background-color 0.32s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.32s cubic-bezier(0.4, 0, 0.2, 1), color 0.32s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.32s cubic-bezier(0.4, 0, 0.2, 1), fill 0.32s cubic-bezier(0.4, 0, 0.2, 1), stroke 0.32s cubic-bezier(0.4, 0, 0.2, 1), outline-color 0.32s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.32s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] {
  color-scheme: light;
  /* Light Theme */
  --bg-main: #faf9fc;
  --bg-card: rgba(255, 255, 255, 0.75);
  --bg-card-hover: rgba(255, 255, 255, 0.95);
  --bg-input: rgba(243, 241, 246, 0.9);
  --border-color: rgba(139, 92, 246, 0.15);
  --border-color-hover: rgba(217, 70, 239, 0.3);
  
  --color-text: #1d1829;
  --color-text-muted: #6d28d9;
  --color-primary: #7c3aed;
  --color-primary-glow: rgba(124, 58, 237, 0.15);
  --color-secondary: #c026d3;
  --color-secondary-glow: rgba(192, 38, 211, 0.15);
  --color-accent: #db2777;
  
  --gradient-primary: linear-gradient(135deg, #7c3aed 0%, #c026d3 100%);
  --gradient-card: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(245, 243, 247, 0.95) 100%);
  --shadow-main: 0 8px 32px 0 rgba(109, 40, 217, 0.08);
  --shadow-glow: 0 0 15px var(--color-primary-glow);
}

/* Prevent horizontal overflow at every level.
   overflow-x: clip is used because unlike 'hidden' it does NOT create a
   scroll container, so nested scroll areas (like the carousel) still work. */
html, body {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: pan-x pan-y;
}

html {
  /* Smooth scroll for desktop anchor jumps and JS scrollIntoView */
  scroll-behavior: smooth;
}

#app-root {
  width: 100%;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  /* scroll-behavior: smooth убран — вызывает рывки при свайпах на мобильных */
  touch-action: pan-x pan-y;
  /* Отдельный GPU-слой для контейнера скролла */
  will-change: scroll-position;
}

.page-view {
  overflow-x: clip;
  width: 100%;
  max-width: 100%;
}

/* Base resets */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  scrollbar-width: thin;
  scrollbar-color: var(--color-primary) var(--bg-main);
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

input, textarea, select, button {
  font-size: 16px !important; /* Preempt iOS auto-zoom on focus */
  touch-action: manipulation; /* Prevents double-tap zoom on buttons/inputs */
}

input, textarea, [contenteditable] {
  -webkit-user-select: auto;
  -moz-user-select: auto;
  -ms-user-select: auto;
  user-select: auto;
}

*::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
*::-webkit-scrollbar-track {
  background: var(--bg-main);
}
*::-webkit-scrollbar-thumb {
  background-color: var(--color-primary);
  border-radius: 20px;
}

/* Duplicate html, body removed */

body {
  font-family: var(--font-body);
  background-color: var(--bg-main);
  color: var(--color-text);
  overflow-x: clip;
  line-height: 1.6;
}

/* Smooth theme fade вЂ” applied to ALL elements via .theme-transitioning class on <html> */
.theme-transitioning *,
.theme-transitioning *::before,
.theme-transitioning *::after {
  transition: var(--transition-theme) !important;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-title);
  font-weight: 600;
  letter-spacing: -0.02em;
}

a {
  color: inherit;
  text-decoration: none;
}

/* App container */
#app-root {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  width: 100%;
  overflow-x: clip;
}

/* Glow Background Effects */
/* position: fixed вЂ” viewport-relative, can NEVER affect document scroll width */
.bg-glow-1, .bg-glow-2 {
  position: fixed;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  filter: blur(140px);
  z-index: -1;
  opacity: 0.15;
  pointer-events: none;
  transition: opacity var(--transition-normal);
  /* Hard cap so the blur ball can never stretch beyond half the viewport */
  max-width: 50vw;
  max-height: 50vh;
  /* Вынести на отдельный GPU-слой, чтобы не перерисовываться при скролле */
  will-change: transform;
  transform: translateZ(0);
}
.bg-glow-1 {
  background: var(--color-primary);
  top: -80px;
  right: -80px;
}
.bg-glow-2 {
  background: var(--color-secondary);
  bottom: 10%;
  left: -80px;
}

/* Navigation bar */
.nav-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 5%;
  position: sticky;
  top: 0;
  background: rgba(12, 8, 19, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 1000;
  border-bottom: 1px solid var(--border-color);
  /* Отдельный GPU-слой: sticky + backdrop-filter не должны пересчитываться при скролле */
  will-change: transform;
  transform: translateZ(0);
}

[data-theme="light"] .nav-bar {
  background: rgba(250, 249, 252, 0.75);
}

.logo-container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-title);
  font-size: 1.5rem;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}

.logo span {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.site-version {
  font-size: 0.65rem;
  color: var(--color-text-muted);
  opacity: 0.85;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-decoration: underline #f97316 wavy;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  margin-left: 2px;
  cursor: default;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-link {
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
  cursor: pointer;
  transition: color var(--transition-fast);
}
.nav-link:hover, .nav-link.active {
  color: var(--color-secondary);
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  transition: width var(--transition-fast);
}
.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

/* Theme Toggle Button */
.theme-toggle {
  background: none;
  border: 1px solid var(--border-color);
  color: var(--color-text);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
}
.theme-toggle:hover {
  border-color: var(--color-secondary);
  box-shadow: var(--shadow-glow);
  transform: scale(1.05);
}

/* Action Button */
.btn {
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: background-color var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.header-cabinet-icon {
  display: none;
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  flex-shrink: 0;
}

.btn-primary {
  background: var(--gradient-primary);
  color: #fff;
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(217, 70, 239, 0.45);
}

.btn-secondary {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--color-text);
}
.btn-secondary:hover {
  border-color: var(--color-primary);
  background: rgba(139, 92, 246, 0.08);
}

/* Hero Section */
.hero {
  padding: 6rem 5% 4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
}

.hero-subtitle {
  text-transform: uppercase;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--color-secondary);
  margin-bottom: 1.5rem;
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  line-height: 1.1;
  margin-bottom: 1.5rem;
  max-width: 900px;
}

.hero-title span {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-description {
  font-size: 1.2rem;
  color: var(--color-text-muted);
  max-width: 650px;
  margin-bottom: 2.5rem;
}

/* Glass Card components */
.glass-card {
  background: var(--bg-card);
  /* backdrop-filter убран из потоковых карточек — слишком дорого при скролле */
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 2.5rem;
  box-shadow: var(--shadow-main);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
}
.glass-card:hover {
  border-color: var(--border-color-hover);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
}

/* Info Section (Landing Blocks) */
.section {
  padding: 5rem 5%;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.section-title {
  font-size: 2.25rem;
  margin-bottom: 3rem;
  text-align: center;
  position: relative;
}
.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: var(--gradient-primary);
  margin: 10px auto 0;
  border-radius: 2px;
}

.therapy-approach {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

@media (max-width: 768px) {
  .hero-title span {
    display: block;
  }
  .therapy-approach {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .nav-links {
    display: none; /* simple burger menu can be simulated or links collapsed */
  }
}

.therapy-text p {
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
  color: var(--color-text);
  opacity: 0.95;
}

.therapy-quote {
  font-style: italic;
  border-left: 4px solid var(--color-primary);
  padding-left: 1.5rem;
  margin: 2rem 0;
  font-size: 1.2rem;
  color: var(--color-text-muted);
}

.methods-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.method-card {
  padding: 2rem;
  text-align: left;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.method-link {
  text-decoration: none;
  color: inherit;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.method-link:hover {
  transform: translateY(-5px) scale(1.02);
  border-color: var(--color-primary);
  box-shadow: 0 12px 24px rgba(139, 92, 246, 0.15);
}

.method-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--color-primary-glow);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  font-size: 1.5rem;
  transition: transform 0.3s ease;
}

.method-link:hover .method-icon {
  transform: scale(1.1) rotate(5deg);
}

.method-card h3 {
  margin-bottom: 0.75rem;
  font-size: 1.25rem;
}

.method-card p {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.method-learn-more {
  font-size: 0.95rem;
  color: var(--color-primary);
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  opacity: 0.7;
  transition: all 0.3s ease;
}

.method-link:hover .method-learn-more {
  opacity: 1;
  transform: translateX(4px);
}

/* Footer */
footer {
  margin-top: auto;
  padding: 3rem 5%;
  border-top: 1px solid var(--border-color);
  background: rgba(10, 6, 17, 0.9);
  text-align: center;
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

[data-theme="light"] footer {
  background: rgba(245, 243, 247, 0.9);
  border-top-color: rgba(139, 92, 246, 0.15);
}

footer .footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  margin-bottom: 1.5rem;
}

.footer-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: var(--color-text-muted);
  font-size: 0.9rem;
  transition: color var(--transition-fast);
  white-space: nowrap;
}
.footer-link svg {
  flex-shrink: 0;
  display: block;
}
.footer-link:hover { color: var(--color-text); }

footer .footer-link:hover {
  color: var(--color-secondary);
}

.pwa-link, .text-accent-link {
  color: var(--color-accent);
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--transition-fast);
}
.pwa-link:hover, .text-accent-link:hover {
  color: var(--color-secondary);
}

.footer-bottom-link {
  color: var(--color-text-muted);
  font-size: 0.85rem;
  text-decoration: underline;
  text-decoration-skip-ink: none;
  text-underline-offset: 3px;
  transition: color var(--transition-fast);
}
.footer-bottom-link:hover {
  color: var(--color-secondary);
}

/* Page views switcher */
.page-view {
  display: none;
  animation: fade-in 0.45s cubic-bezier(0.4, 0, 0.2, 1) both;
}
.page-view.active {
  display: block;
}

@keyframes fade-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes logo-float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
  100% { transform: translateY(0px); }
}

/* Toast Notification */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2010; /* Placed above bottom navigation (1999) and support elements (1002) */
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.toast {
  background: rgba(22, 14, 36, 0.9);
  border: 1px solid var(--color-primary);
  color: #fff;
  padding: 1rem 1.5rem;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 250px;
  animation: slide-in-toast 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}
.toast.dismissing {
  animation: toast-dismiss-anim 0.35s cubic-bezier(0.4, 0, 0.2, 1) forwards !important;
  pointer-events: none;
}
[data-theme="light"] .toast {
  background: var(--bg-card) !important;
  color: var(--color-text) !important;
  border-color: var(--color-secondary) !important;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}
@keyframes slide-in-toast {
  from { transform: translateX(120%); }
  to { transform: translateX(0); }
}
@keyframes toast-dismiss-anim {
  0% {
    transform: translateX(0) scale(1);
    opacity: 1;
  }
  100% {
    transform: translateX(150%) scale(0.9);
    opacity: 0;
  }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-5px); }
  40%, 80% { transform: translateX(5px); }
}

/* Landing Tabs */
.landing-tabs-nav {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  padding: 0 1rem;
}

.landing-tab-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--color-text);
  padding: 0.75rem 1.5rem;
  border-radius: 30px;
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.landing-tab-btn:hover {
  border-color: var(--color-secondary);
  box-shadow: var(--shadow-glow);
}

.landing-tab-btn.active {
  background: var(--gradient-primary);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.landing-tab-content {
  display: none;
  animation: fade-in 0.4s ease-out;
}

.landing-tab-content.active {
  display: block;
}

/* Text attribution underlines */
.ai-text {
  text-decoration: underline red wavy;
  text-underline-offset: 4px;
}
.user-text {
  text-decoration: underline green wavy;
  text-underline-offset: 4px;
}

/* Mobile Bottom Navigation Bar */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(70px + env(safe-area-inset-bottom, 0px));
  padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  padding-top: 10px;
  background: rgba(22, 14, 36, 0.45);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border-top: 1px solid var(--border-color);
  z-index: 1999;
  justify-content: space-around;
  align-items: center;
  box-shadow: 0 -8px 32px 0 rgba(0, 0, 0, 0.3);
}

[data-theme="light"] .mobile-bottom-nav {
  background: rgba(255, 255, 255, 0.65);
  box-shadow: 0 -8px 32px 0 rgba(139, 92, 246, 0.05);
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  cursor: pointer;
  flex: 1;
  transition: color var(--transition-fast), transform 0.2s ease;
  position: relative;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.mobile-nav-item.active {
  color: var(--color-secondary);
}

.mobile-nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
  width: 24px;
  height: 24px;
}

.mobile-nav-icon svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  overflow: visible;
  transition: stroke var(--transition-fast), filter var(--transition-fast), transform var(--transition-fast);
}

.mobile-nav-item.active .mobile-nav-icon svg {
  stroke: var(--color-secondary);
  filter: drop-shadow(0 0 5px var(--color-secondary-glow));
  transform: translateY(-2px) scale(1.08);
}

.mobile-nav-label {
  font-size: 0.68rem;
  font-weight: 700;
  font-family: var(--font-body);
  letter-spacing: 0.3px;
  transition: transform var(--transition-fast);
}

.mobile-nav-item.active .mobile-nav-label {
  transform: translateY(-1px);
}

@media (max-width: 768px) {
  #hero-cta {
    display: none !important;
  }
  
  .mobile-bottom-nav {
    display: flex;
  }
  
  /* Add padding to the body so content is not cut off by the bottom nav */
  body {
    padding-bottom: calc(90px + env(safe-area-inset-bottom, 0px)) !important;
  }

  footer {
    padding-bottom: calc(110px + env(safe-area-inset-bottom, 0px)) !important;
  }
  
  /* Adjust top nav padding on mobile */
  .nav-bar {
    padding: 0.85rem 5% !important;
  }
  /* Remove redundant hero-cta block */

  .header-cabinet-icon {
    display: block !important;
    width: 22px !important;
    height: 22px !important;
    margin: 0 !important;
  }

  .cta-text {
    display: none !important;
  }

  .toast-container {
    bottom: 84px !important;
    right: 16px !important;
    left: 16px !important;
    align-items: flex-end;
  }

  .toast {
    min-width: 200px !important;
    max-width: 100% !important;
  }
}

/* Language switch animation - base transition rules */
.nav-link,
.mobile-nav-label,
.cta-text,
.page-view,
.footer-link {
  transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1), 
              transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), 
              filter 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Lang button: always explicitly visible, no will-change to avoid GPU stale state */
#lang-btn {
  opacity: 1 !important;
  transition: background-color var(--transition-fast), border-color var(--transition-fast),
              color var(--transition-fast), transform var(--transition-fast),
              box-shadow var(--transition-fast);
}

html.lang-transitioning .nav-link,
html.lang-transitioning .mobile-nav-label,
html.lang-transitioning .cta-text,
html.lang-transitioning .page-view,
html.lang-transitioning .footer-link {
  opacity: 0 !important;
  transform: translateY(4px);
  filter: blur(4px);
}

/* Registration icon/button stretch-and-shrink animation on language change */
#m-nav-cabinet .mobile-nav-icon {
  will-change: transform;
}

html.lang-transitioning #m-nav-cabinet .mobile-nav-icon {
  animation: register-icon-bounce 0.25s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes register-icon-bounce {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(0.85); /* Smooth uniform shrink */
  }
  100% {
    transform: scale(1); /* Smooth uniform stretch back */
  }
}

/* Maintain constant registration button width on desktop to prevent menu shifting */
@media (min-width: 1025px) {
  #hero-cta {
    min-width: 210px;
    justify-content: center;
    white-space: nowrap;
  }
}


/* ============================
   MOBILE HORIZONTAL SCROLL SAFETY NET
   ============================*/
@media (max-width: 1024px), (pointer: coarse) {
  html, body {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden !important;
    touch-action: pan-y !important;
  }

  #app-root {
    max-width: 100vw;
    width: 100%;
    height: 100%;
    overflow-y: auto !important;
    /* РќРµ СЃРєСЂС‹РІР°РµРј overflow-x Р¶С‘СЃС‚РєРѕ вЂ” РїРѕР·РІРѕР»СЏРµРј РґРѕС‡РµСЂРЅРёРј СЌР»РµРјРµРЅС‚Р°Рј СЃРєСЂРѕР»Р»РёС‚СЊСЃСЏ РіРѕСЂРёР·РѕРЅС‚Р°Р»СЊРЅРѕ */
    overflow-x: clip !important;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
  }

  /* Disable pinch-to-zoom globally on all touch targets on mobile/tablet */
  *, *::before, *::after {
    touch-action: pan-y;
  }

  /* Horizontal scrollable containers must allow horizontal panning/swiping */
  .tg-carousel-track,
  .sidebar-menu,
  .sidebar-menu * {
    touch-action: pan-x pan-y !important;
  }
}

/* Interactive Payment Cards */
.pay-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 12px;
  margin: 1.2rem 0;
}

.pay-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem 0.5rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}

.pay-card:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.pay-card-icon {
  font-size: 1.6rem;
  margin-bottom: 6px;
  transition: transform 0.2s ease;
}

.pay-card:hover .pay-card-icon {
  transform: scale(1.15);
}

.pay-card-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text-muted);
  transition: color 0.2s ease;
}

.pay-card:hover .pay-card-name {
  color: var(--color-text);
}

/* Brand borders on hover */
.pay-card.card-tinkoff:hover {
  border-color: #ffdd2d;
  box-shadow: 0 8px 20px rgba(255, 221, 45, 0.15);
}
.pay-card.card-sber:hover {
  border-color: #21a038;
  box-shadow: 0 8px 20px rgba(33, 160, 56, 0.15);
}
.pay-card.card-sbp:hover {
  border-color: #ff5c5c;
  box-shadow: 0 8px 20px rgba(255, 92, 92, 0.15);
}
.pay-card.card-iban:hover, .pay-card.card-swift:hover {
  border-color: var(--color-primary);
  box-shadow: 0 8px 20px rgba(139, 92, 246, 0.15);
}
.pay-card.card-paypal:hover {
  border-color: #0070ba;
  box-shadow: 0 8px 20px rgba(0, 112, 186, 0.15);
}
.pay-card.card-usdt:hover {
  border-color: #26a17b;
  box-shadow: 0 8px 20px rgba(38, 161, 123, 0.15);
}
.pay-card.card-usdc:hover {
  border-color: #2775ca;
  box-shadow: 0 8px 20px rgba(39, 117, 202, 0.15);
}
.pay-card.card-btc:hover {
  border-color: #f7931a;
  box-shadow: 0 8px 20px rgba(247, 147, 26, 0.15);
}

/* Dynamics Chart Controls */
.dynamics-controls {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
  align-items: center;
}

.dynamics-scale-filters, .dynamics-period-filters {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  padding: 0.25rem;
  border-radius: 20px;
  border: 1px solid var(--color-glass-border);
}

.pill-btn {
  background: transparent;
  border: none;
  color: var(--color-text-muted);
  padding: 0.4rem 1rem;
  border-radius: 16px;
  font-family: 'Manrope', sans-serif;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.pill-btn:hover {
  color: var(--color-text);
  background: rgba(255, 255, 255, 0.05);
}

.pill-btn.active {
  background: var(--color-primary);
  color: #fff;
  box-shadow: 0 2px 10px rgba(139, 92, 246, 0.3);
}

.dynamics-trend-analysis {
  margin-top: 1.5rem;
  padding: 1rem;
  background: rgba(139, 92, 246, 0.05);
  border-radius: 12px;
  border-left: 3px solid var(--color-primary);
  color: var(--color-text);
  font-size: 0.95rem;
  line-height: 1.5;
  transition: opacity 0.3s ease;
}

/* Tooltip styles adjustment for better glassmorphism */
.chart-tooltip {
  position: absolute;
  pointer-events: none;
  background: var(--color-glass-bg);
  border: 1px solid var(--color-glass-border);
  box-shadow: 0 8px 32px 0 var(--color-glass-shadow);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 12px;
  padding: 12px;
  color: var(--color-text);
  font-family: 'Manrope', sans-serif;
  font-size: 0.85rem;
  z-index: 100;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  transform: translate(-50%, -100%) translateY(10px);
}

.chart-tooltip.show {
  opacity: 1;
  transform: translate(-50%, -100%) translateY(-10px);
}

@keyframes revealChart {
  0% {
    clip-path: polygon(0 0, 0 0, 0 100%, 0 100%);
  }
  100% {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
  }
}

