/* 玻璃拟态效果样式 - 3D Glassmorphism */

/* 基础玻璃拟态类 */
.glass {
  background: var(--glass-white);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-light);
  transition: var(--transition-medium);
}

.glass:hover {
  background: rgba(255, 255, 255, 0.35);
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

/* 玻璃卡片变体 */
.glass-card {
  background: var(--glass-white);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  box-shadow: var(--shadow-light);
  transition: var(--transition-medium);
  position: relative;
  overflow: hidden;
}

.glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
}

.glass-card:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-5px) scale(1.02);
  box-shadow: var(--shadow-heavy);
}

/* 强化玻璃效果 */
.glass-strong {
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border: 2px solid rgba(255, 255, 255, 0.3);
  box-shadow: var(--shadow-medium);
}

/* 轻量玻璃效果 */
.glass-light {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 16px rgba(31, 38, 135, 0.2);
}

/* 玻璃按钮 */
.glass-btn {
  background: var(--glass-white);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: var(--spacing-sm) var(--spacing-lg);
  color: var(--text-primary);
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-fast);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.glass-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: var(--transition-medium);
}

.glass-btn:hover::before {
  left: 100%;
}

.glass-btn:hover {
  background: rgba(255, 255, 255, 0.35);
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

.glass-btn:active {
  transform: translateY(0);
}

/* 主要按钮变体 */
.glass-btn-primary {
  background: rgba(255, 255, 255, 0.3);
  border: 2px solid rgba(255, 255, 255, 0.4);
  font-weight: 600;
}

.glass-btn-primary:hover {
  background: rgba(255, 255, 255, 0.45);
}

/* 玻璃导航 */
.glass-nav {
  background: #ffffff;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  transition: var(--transition-medium);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.glass-nav.scrolled {
  background: #ffffff;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.15);
}

/* 玻璃模态框 */
.glass-modal {
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-heavy);
}

/* 玻璃输入框 */
.glass-input {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-sm);
  padding: var(--spacing-sm) var(--spacing-md);
  color: var(--text-primary);
  transition: var(--transition-fast);
  width: 100%;
}

.glass-input::placeholder {
  color: var(--text-light);
}

.glass-input:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

/* 3D 变换效果 */
.glass-3d {
  transform-style: preserve-3d;
  perspective: 1000px;
}

.glass-3d:hover {
  transform: rotateX(5deg) rotateY(5deg) translateZ(10px);
}

/* 浮动动画 */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

.glass-float {
  animation: float 3s ease-in-out infinite;
}

/* 脉冲效果 */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.glass-pulse {
  animation: pulse 2s ease-in-out infinite;
}

/* 渐变背景增强 - 紫色主题 */
.glass-gradient {
  background: linear-gradient(135deg,
    rgba(255, 255, 255, 0.3) 0%,
    rgba(255, 255, 255, 0.1) 100%);
}

/* 紫色主题玻璃效果变体 */
.glass-purple {
  background: linear-gradient(135deg,
    rgba(139, 92, 246, 0.2) 0%,
    rgba(168, 85, 247, 0.15) 50%,
    rgba(255, 255, 255, 0.1) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.glass-purple:hover {
  background: linear-gradient(135deg,
    rgba(139, 92, 246, 0.3) 0%,
    rgba(168, 85, 247, 0.25) 50%,
    rgba(255, 255, 255, 0.15) 100%);
}

/* 响应式玻璃效果 */
@media (max-width: 768px) {
  .glass-card {
    padding: var(--spacing-md);
  }

  .glass-btn {
    padding: var(--spacing-xs) var(--spacing-md);
  }

  .glass {
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
  }

  .enter-btn:hover {
    transform: translateY(-2px) scale(1.02);
    animation: none; /* 移动端减少动画 */
  }
}

/* 1920×1080 桌面分辨率优化 */
@media (min-width: 1600px) {
  .glass-card {
    padding: var(--spacing-xl);
    border-radius: var(--radius-xl);
  }

  .glass-btn {
    padding: var(--spacing-md) var(--spacing-xl);
    font-size: 1.1rem;
  }

  .glass-input {
    padding: var(--spacing-md) var(--spacing-lg);
    font-size: 1.1rem;
  }

  .enter-btn:hover {
    transform: translateY(-4px) scale(1.08);
    box-shadow:
      0 20px 60px rgba(139, 92, 246, 0.7),
      inset 0 1px 0 rgba(255, 255, 255, 0.4);
  }
}

/* 紫色渐变进入按钮 */
.enter-btn {
  background: linear-gradient(135deg,
    rgba(139, 92, 246, 0.8) 0%,
    rgba(168, 85, 247, 0.9) 25%,
    rgba(192, 132, 252, 0.8) 50%,
    rgba(168, 85, 247, 0.9) 75%,
    rgba(139, 92, 246, 0.8) 100%);
  background-size: 200% 200%;
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: #ffffff !important;
  font-weight: 700;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  box-shadow:
    0 8px 32px rgba(139, 92, 246, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  position: relative;
  overflow: hidden;
  animation: gradientShift 3s ease-in-out infinite;
}

.enter-btn::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: var(--transition-medium);
}

.enter-btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: all 0.6s ease;
}

.enter-btn:hover {
  background: linear-gradient(135deg,
    rgba(139, 92, 246, 1) 0%,
    rgba(168, 85, 247, 1) 25%,
    rgba(192, 132, 252, 1) 50%,
    rgba(168, 85, 247, 1) 75%,
    rgba(139, 92, 246, 1) 100%);
  transform: translateY(-3px) scale(1.05);
  box-shadow:
    0 15px 40px rgba(139, 92, 246, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  animation: pulse 1.5s ease-in-out infinite;
}

.enter-btn:hover::before {
  left: 100%;
}

.enter-btn:hover::after {
  width: 120%;
  height: 120%;
}

.enter-btn:active {
  transform: translateY(-1px) scale(1.02);
  box-shadow:
    0 8px 25px rgba(139, 92, 246, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* 渐变动画 */
@keyframes gradientShift {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

/* 脉冲动画增强 */
@keyframes pulse {
  0%, 100% {
    box-shadow:
      0 15px 40px rgba(139, 92, 246, 0.6),
      inset 0 1px 0 rgba(255, 255, 255, 0.3);
  }
  50% {
    box-shadow:
      0 20px 50px rgba(139, 92, 246, 0.8),
      inset 0 1px 0 rgba(255, 255, 255, 0.4);
  }
}

/* 降级支持 */
@supports not (backdrop-filter: blur(20px)) {
  .glass {
    background: rgba(255, 255, 255, 0.9);
  }

  .glass-card {
    background: rgba(255, 255, 255, 0.95);
  }

  .glass-nav {
    background: #ffffff;
  }
}
