/* ========================================
   APPLE LIQUID GLASS - ДОПОЛНИТЕЛЬНЫЕ СТИЛИ
======================================== */

/* Жидкие кнопки с градиентом */
.liquid-button {
  position: relative;
  background: var(--liquid-gradient-1);
  background-size: 200% 200%;
  border: none;
  border-radius: var(--radius-full);
  padding: 14px 32px;
  color: white;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  animation: liquidFlow 8s ease-in-out infinite;
}

@keyframes liquidFlow {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

.liquid-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, 
    transparent, 
    rgba(255, 255, 255, 0.4), 
    transparent);
  transition: left 0.6s;
}

.liquid-button:hover {
  transform: scale(1.05);
  box-shadow: 
    0 20px 40px rgba(0, 0, 0, 0.2),
    0 0 40px rgba(255, 107, 157, 0.4);
}

.liquid-button:hover::before {
  left: 100%;
}

.liquid-button:active {
  transform: scale(0.98);
}

/* Живые карточки с анимацией */
.liquid-card {
  background: var(--glass-bg);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-radius: var(--radius-xl);
  border: 0.5px solid rgba(255, 255, 255, 0.3);
  padding: 24px;
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.liquid-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(
    from 0deg,
    transparent 0deg,
    rgba(255, 107, 157, 0.1) 60deg,
    rgba(147, 51, 234, 0.1) 120deg,
    rgba(59, 130, 246, 0.1) 180deg,
    transparent 240deg
  );
  animation: rotate 10s linear infinite;
  opacity: 0;
  transition: opacity 0.4s;
}

.liquid-card:hover::before {
  opacity: 1;
}

@keyframes rotate {
  100% {
    transform: rotate(360deg);
  }
}

.liquid-card:hover {
  transform: translateY(-8px);
  box-shadow: 
    0 20px 60px rgba(0, 0, 0, 0.15),
    0 0 1px rgba(255, 255, 255, 0.6) inset;
}

/* Светящиеся иконки */
.glow-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--liquid-gradient-3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: 
    0 8px 24px rgba(0, 0, 0, 0.15),
    0 0 20px rgba(147, 51, 234, 0.3);
  animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    box-shadow: 
      0 8px 24px rgba(0, 0, 0, 0.15),
      0 0 20px rgba(147, 51, 234, 0.3);
  }
  50% {
    box-shadow: 
      0 8px 32px rgba(0, 0, 0, 0.2),
      0 0 40px rgba(147, 51, 234, 0.6);
  }
}

/* Размытые фоны для секций */
.section-glass {
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-xl);
  padding: 32px;
}

/* Liquid input поля */
.liquid-input {
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  font-size: 15px;
  color: var(--text-primary);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
}

.liquid-input:focus {
  background: rgba(255, 255, 255, 0.8);
  border-color: rgba(255, 107, 157, 0.5);
  box-shadow: 
    0 0 0 4px rgba(255, 107, 157, 0.1),
    0 8px 16px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.liquid-input::placeholder {
  color: var(--text-tertiary);
}

/* Frosted glass header */
.frosted-header {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 0.5px solid rgba(0, 0, 0, 0.08);
  position: sticky;
  top: 0;
  z-index: 1000;
}

/* Морфинг кнопок */
.morph-button {
  background: white;
  border: 0.5px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--radius-full);
  padding: 10px 20px;
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 
    0 1px 3px rgba(0, 0, 0, 0.06),
    0 0 0 1px rgba(255, 255, 255, 0.5) inset;
}

.morph-button:hover {
  background: var(--liquid-gradient-1);
  color: white;
  border-color: transparent;
  transform: translateY(-2px) scale(1.05);
  box-shadow: 
    0 12px 24px rgba(255, 107, 157, 0.3),
    0 0 40px rgba(255, 107, 157, 0.2);
}

.morph-button:active {
  transform: scale(0.95);
}

body.theme-night .liquid-card {
  background: rgba(20, 20, 30, 0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border: 0.5px solid rgba(255, 255, 255, 0.15);
}

body.theme-night .liquid-card:hover::before {
  opacity: 1;
}

body.theme-night .liquid-card::before {
  background: conic-gradient(
    from 0deg,
    transparent 0deg,
    rgba(168, 85, 247, 0.15) 60deg,
    rgba(255, 107, 157, 0.1) 120deg,
    rgba(147, 51, 234, 0.15) 180deg,
    transparent 240deg
  );
}

/* --- Размытые фоны (.section-glass) --- */
body.theme-night .section-glass {
  background: rgba(20, 20, 30, 0.6); 
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

/* --- Liquid input поля (.liquid-input) --- */
body.theme-night .liquid-input {
  background: rgba(30, 30, 45, 0.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text-primary);
}

body.theme-night .liquid-input:focus {
  background: rgba(30, 30, 45, 0.8);
  border-color: rgba(168, 85, 247, 0.5); 
  box-shadow: 
    0 0 0 4px rgba(168, 85, 247, 0.2), 
    0 8px 16px rgba(0, 0, 0, 0.4);
}

body.theme-night .liquid-input::placeholder {
  color: var(--text-tertiary);
}

/* --- Frosted glass header (.frosted-header) --- */
body.theme-night .frosted-header {
  background: rgba(20, 20, 30, 0.7);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.15);
}

/* --- Морфинг кнопок (.morph-button) --- */
body.theme-night .morph-button {
  background: rgba(40, 40, 50, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 0.5px solid rgba(255, 255, 255, 0.15);
  color: var(--text-primary);
  box-shadow: 
    0 1px 3px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

body.theme-night .morph-button:hover {
  background: var(--liquid-gradient-1);
  color: white;
  border-color: transparent;
  box-shadow: 
    0 12px 24px rgba(168, 85, 247, 0.4),
    0 0 40px rgba(168, 85, 247, 0.3);
}

/* --- Светящиеся иконки (.glow-icon) --- */
body.theme-night .glow-icon {
  background: var(--liquid-gradient-3);
  box-shadow: 
    0 8px 24px rgba(0, 0, 0, 0.3),
    0 0 30px rgba(168, 85, 247, 0.5);
}

@keyframes pulse-night {
  0%, 100% {
    box-shadow: 
      0 8px 24px rgba(0, 0, 0, 0.3),
      0 0 30px rgba(168, 85, 247, 0.5);
  }
  50% {
    box-shadow: 
      0 8px 32px rgba(0, 0, 0, 0.4),
      0 0 50px rgba(168, 85, 247, 0.8);
  }
}

body.theme-night .glow-icon {
  animation: pulse-night 3s ease-in-out infinite;
}

/* --- Liquid button --- */
body.theme-night .liquid-button {
  background: var(--liquid-gradient-1);
  box-shadow: 
    0 20px 40px rgba(0, 0, 0, 0.3),
    0 0 40px rgba(168, 85, 247, 0.5);
}

body.theme-night .liquid-button:hover {
  box-shadow: 
    0 20px 40px rgba(0, 0, 0, 0.4),
    0 0 60px rgba(168, 85, 247, 0.6);
}