/* 增强样式文件 */

/* 品牌强化样式 */
.navbar-brand img {
  height: 50px;
  width: auto;
  max-width: 150px;
  display: block;
}

/* 增强按钮渐变效果 */
.btn {
  background: linear-gradient(to bottom, #ffffff, #f8f9fa);
  border: 1px solid #dee2e6;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.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: 0.5s;
}

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

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

.btn-search {
  background: linear-gradient(to bottom, #ffffff, #f1f8ff);
  border: 1px solid #0572f0;
  color: #0572f0;
}

.btn-login {
  background: linear-gradient(to bottom, #ffffff, #f0f8f8);
  border: 1px solid #0097a7;
  color: #0097a7;
}

.btn-register {
  background: linear-gradient(135deg, #0572f0, #045dc4);
  border: 1px solid #0572f0;
  color: white;
}

/* 增强卡片渐变效果 */
.card,
.filter-section,
.questions-section,
.question-header,
.question-content-section,
.answer-section,
.related-section {
  background: linear-gradient(to bottom, #ffffff, #fafbff);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
}

.card:hover,
.question-item:hover,
.subject-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(5, 114, 240, 0.12);
}

/* 加载状态样式 */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.loading-overlay.active {
  opacity: 1;
  visibility: visible;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #0572f0;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

.loading-text {
  margin-left: 15px;
  font-size: 18px;
  color: #0572f0;
  font-weight: 500;
}

/* 移动端手势支持增强 */
@media (max-width: 768px) {
  .swipe-indicator {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(5, 114, 240, 0.8);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    opacity: 0;
    animation: fadeInOut 3s ease-in-out;
    z-index: 1000;
  }

  @keyframes fadeInOut {
    0% { opacity: 0; }
    20% { opacity: 1; }
    80% { opacity: 1; }
    100% { opacity: 0; }
  }
}

/* 响应式增强 */
@media (max-width: 576px) {
  .mobile-enhanced {
    touch-action: manipulation;
  }
  
  .btn,
  .form-control {
    min-height: 44px; /* 符合移动端触摸目标大小 */
  }
}