/* Кастомные стили для страницы реферальной программы */
.referral-hero {
  background: linear-gradient(135deg, 
    rgba(59, 130, 246, 0.15) 0%, 
    rgba(37, 99, 235, 0.2) 25%,
    rgba(29, 78, 216, 0.15) 50%,
    rgba(30, 64, 175, 0.2) 75%,
    rgba(67, 56, 202, 0.15) 100%
  );
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  border: 2px solid rgba(59, 130, 246, 0.3);
  border-radius: 24px;
  padding: 40px 48px;
  margin-bottom: 64px;
  position: relative;
  overflow: hidden;
  box-shadow: 
    0 20px 60px rgba(37, 99, 235, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  transition: transform 0.1s ease-out;
  transform-style: preserve-3d;
}

.referral-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -30%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, 
    rgba(59, 130, 246, 0.25) 0%,
    rgba(37, 99, 235, 0.15) 30%,
    transparent 70%
  );
  animation: liquidShift 12s ease-in-out infinite;
}

.referral-hero::after {
  content: '';
  position: absolute;
  bottom: -40%;
  left: -20%;
  width: 180%;
  height: 180%;
  background: radial-gradient(circle, 
    rgba(67, 56, 202, 0.20) 0%,
    rgba(30, 64, 175, 0.1) 40%,
    transparent 70%
  );
  animation: liquidShift 15s ease-in-out infinite reverse;
}

@keyframes liquidShift {
  0%, 100% { 
    opacity: 0.6; 
    transform: scale(1) rotate(0deg); 
  }
  33% { 
    opacity: 0.9; 
    transform: scale(1.15) rotate(5deg); 
  }
  66% { 
    opacity: 0.7; 
    transform: scale(0.95) rotate(-3deg); 
  }
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%) translateY(-100%) rotate(45deg);
  }
  100% {
    transform: translateX(100%) translateY(100%) rotate(45deg);
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 0.3;
  }
  50% {
    opacity: 0.6;
  }
}

.glass-card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  padding: 32px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left 0.5s;
}

.glass-card:hover {
  transform: translateY(-4px);
  border-color: rgba(67, 56, 202, 0.5);
  box-shadow: 0 20px 40px rgba(67, 56, 202, 0.2);
}

.glass-card:hover::before {
  left: 100%;
}

.step-number {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, #4338ca 0%, #2563eb 100%);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
  color: white;
  margin-bottom: 24px;
  box-shadow: 0 8px 24px rgba(67, 56, 202, 0.4);
  position: relative;
}

/* Path section стили как на n8n */
.path-section {
  padding: 2rem 2rem;
  margin-top: 0;
  margin-bottom: 64px;
  position: relative;
  overflow: hidden;
}

.path-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(ellipse at 50% 20%, rgba(102, 126, 234, 0.1) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 80%, rgba(118, 75, 162, 0.1) 0%, transparent 50%);
  animation: float-background 15s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

@keyframes float-background {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-20px) scale(1.05); }
}

.path-section .section-title {
  text-align: center;
  font-size: 2.8rem;
  font-weight: 700;
  margin-bottom: 3rem;
  position: relative;
  z-index: 1;
}

.path-steps {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  position: relative;
  margin-bottom: 30px;
}

.path-row {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  width: 100%;
  max-width: 1100px;
}

.path-step {
  position: relative;
  flex: 1;
  min-width: 200px;
  max-width: 250px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 1.5rem 1rem 1rem 1rem;
  backdrop-filter: blur(15px);
  text-align: center;
  transition: all 0.3s ease;
  z-index: 1;
}

.path-step:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(102, 126, 234, 0.15);
  border-color: rgba(67, 56, 202, 0.5);
}

.path-number {
  position: absolute;
  left: -30px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 24rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.05);
  z-index: 0;
  pointer-events: none;
  user-select: none;
  line-height: 1;
}

.path-icon {
  font-size: 2.2rem;
  width: 35px;
  height: 35px;
  margin: 0 auto 1.2rem auto;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #60a5fa;
  border-radius: 50%;
}

.path-icon svg {
  width: 35px;
  height: 35px;
  stroke: #60a5fa;
}

.path-content {
  position: relative;
  z-index: 2;
}

.path-content h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--textone);
}

.path-content p {
  color: var(--textone);
  font-size: 0.9rem;
  line-height: 1.5;
  opacity: 0.9;
}

[data-theme="light"] .path-step {
  background: rgba(255, 255, 255, 0.7);
  border: 2px solid rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .path-step:hover {
  border-color: rgba(59, 130, 246, 0.4);
  box-shadow: 0 12px 40px rgba(59, 130, 246, 0.15);
}

[data-theme="light"] .path-number {
  color: rgba(0, 0, 0, 0.05);
}

.feature-icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, rgba(67, 56, 202, 0.3), rgba(37, 99, 235, 0.3));
  border: 1px solid rgba(67, 56, 202, 0.5);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.feature-icon svg {
  width: 28px;
  height: 28px;
  stroke: #60a5fa;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.gradient-text {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

.floating-element {
  animation: float 3s ease-in-out infinite;
}

.cta-section {
  background: linear-gradient(135deg, rgba(67, 56, 202, 0.15) 0%, rgba(37, 99, 235, 0.15) 100%);
  backdrop-filter: blur(20px);
  border: 2px solid rgba(67, 56, 202, 0.3);
  border-radius: 32px;
  padding: 48px 32px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at top right, rgba(67, 56, 202, 0.2), transparent);
  pointer-events: none;
}

.bounce-in {
  animation: bounceIn 0.6s ease-out;
}

@keyframes bounceIn {
  0% {
    opacity: 0;
    transform: scale(0.3);
  }
  50% {
    opacity: 1;
    transform: scale(1.05);
  }
  70% {
    transform: scale(0.9);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.example-box {
  background: rgba(0, 100, 250, 0.1);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 2px solid rgba(0, 100, 250, 0.3);
  border-radius: 16px;
  padding: 24px;
  margin: 16px 0 32px 0;
  position: relative;
  overflow: hidden;
}

[data-theme="light"] .example-box {
  background: rgba(0, 100, 250, 0.08);
  border: 2px solid rgba(0, 100, 250, 0.2);
}

.example-content {
  border: 1px solid transparent;
}

[data-theme="light"] .example-content {
  background: rgba(255, 255, 255, 0.6) !important;
  border: 1px solid rgba(0, 100, 250, 0.2) !important;
}

.faq-item {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  margin-bottom: 16px;
  transition: all 0.3s ease;
  overflow: hidden;
}

.faq-item:hover {
  border-color: rgba(59, 130, 246, 0.4);
}

.faq-item.active {
  border-color: rgba(59, 130, 246, 0.6);
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.15);
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  background: transparent;
  border: none;
  text-align: left;
  cursor: pointer;
  font-size: 18px;
  font-weight: 600;
  color: var(--textone);
  transition: all 0.3s ease;
  gap: 16px;
}

.faq-question:hover {
  color: rgb(59, 130, 246);
}

.faq-question span {
  flex: 1;
}

.faq-icon {
  flex-shrink: 0;
  transition: transform 0.3s ease;
  color: rgb(59, 130, 246);
}

.faq-item.active .faq-icon {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  padding: 0 24px;
}

.faq-item.active .faq-answer {
  max-height: 500px;
  padding: 0 24px 20px 24px;
}

.faq-answer p {
  font-size: 16px;
  color: var(--textone);
  line-height: 1.6;
  opacity: 0.85;
  margin: 0;
}

/* Светлая тема */
[data-theme="light"] .secondary-button {
  background: rgba(59, 130, 246, 0.1);
  color: rgb(37, 99, 235);
  border: 2px solid rgba(59, 130, 246, 0.3);
}

[data-theme="light"] .secondary-button:hover {
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.5);
}

[data-theme="light"] .glass-card {
  background: rgba(255, 255, 255, 0.6);
  border: 2px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .glass-card:hover {
  border-color: rgba(59, 130, 246, 0.4);
  box-shadow: 0 20px 40px rgba(59, 130, 246, 0.2);
}

[data-theme="light"] .example-box {
  background: linear-gradient(135deg, 
    rgba(59, 130, 246, 0.08) 0%, 
    rgba(37, 99, 235, 0.12) 25%, 
    rgba(29, 78, 216, 0.08) 50%, 
    rgba(30, 64, 175, 0.12) 75%, 
    rgba(67, 56, 202, 0.08) 100%
  );
  border: 2px solid rgba(59, 130, 246, 0.2);
}

[data-theme="light"] .faq-item {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .faq-item:hover {
  border-color: rgba(59, 130, 246, 0.3);
}

[data-theme="light"] .faq-item.active {
  border-color: rgba(59, 130, 246, 0.5);
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.15);
}

[data-theme="light"] .faq-question {
  color: #1a1a1a;
}

[data-theme="light"] .faq-question:hover {
  color: rgb(37, 99, 235);
}

[data-theme="light"] .faq-icon {
  color: rgb(37, 99, 235);
}

[data-theme="light"] .faq-answer p {
  color: #4a4a4a;
  opacity: 0.9;
}

[data-theme="light"] .feature-icon {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(37, 99, 235, 0.1));
  border: 1px solid rgba(59, 130, 246, 0.3);
}

[data-theme="light"] .step-number {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.4);
}

[data-theme="light"] .cta-section {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(37, 99, 235, 0.1));
  border: 2px solid rgba(59, 130, 246, 0.2);
}

/* Мобильная адаптация */
@media (max-width: 768px) {
  main {
    padding: 80px 16px 32px !important;
  }

  /* Заголовок с иконкой */
  main > div:first-of-type {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 16px !important;
    margin-bottom: 32px !important;
  }

  main > div:first-of-type svg {
    width: 48px !important;
    height: 48px !important;
  }

  main > div:first-of-type h1 {
    font-size: 28px !important;
    line-height: 1.3 !important;
  }

  .referral-hero {
    padding: 32px 24px !important;
    border-radius: 20px !important;
  }

  .referral-hero h2 {
    font-size: 20px !important;
  }

  .glass-card {
    padding: 24px 20px !important;
  }

  .cta-section {
    padding: 32px 20px !important;
    border-radius: 24px !important;
  }

  .cta-section h2 {
    font-size: 28px !important;
  }

  .cta-section > div > div {
    flex-direction: column !important;
    gap: 12px !important;
  }

  .cta-section a,
  .cta-section button {
    width: 100%;
    padding: 16px 32px !important;
    font-size: 16px !important;
  }

  /* Path section мобильная адаптация */
  .path-section .section-title {
    font-size: 28px !important;
    margin-bottom: 32px !important;
  }

  .path-step {
    min-width: 100% !important;
    max-width: 100% !important;
    padding: 1rem !important;
  }

  .path-number {
    font-size: 12rem !important;
    left: -20px !important;
  }

  .path-icon {
    font-size: 1.8rem !important;
  }

  .path-icon svg {
    width: 28px !important;
    height: 28px !important;
  }

  .path-content h3 {
    font-size: 0.95rem !important;
  }

  .path-content p {
    font-size: 0.85rem !important;
  }

  .path-row {
    gap: 1rem !important;
  }
}

