/**
 * 搜索弹窗样式
 * Search Modal Styles
 */

/* ==================== 搜索弹窗 ==================== */
.search-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 80px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.search-modal.active {
  opacity: 1;
  visibility: visible;
}

.search-modal.active .search-modal-content {
  transform: translateY(0);
  opacity: 1;
}

.search-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.search-modal-content {
  position: relative;
  background: white;
  border-radius: 12px;
  width: 90%;
  max-width: 600px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  transform: translateY(-20px);
  opacity: 0;
  transition: all 0.3s ease;
  max-height: calc(100vh - 100px);
  display: flex;
  flex-direction: column;
}

body.dark-mode .search-modal-content {
  background: #1a1d29;
}

/* 弹窗头部 */
.search-modal-header {
  padding: 20px;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

body.dark-mode .search-modal-header {
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

.search-modal-title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-color);
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-modal-title svg {
  color: var(--primary-color);
  flex-shrink: 0;
}

.search-modal-close {
  background: none;
  border: none;
  font-size: 28px;
  line-height: 1;
  color: #999;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-modal-close:hover {
  color: #f86538;
  transform: rotate(90deg);
}

/* 弹窗内容 */
.search-modal-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

/* 搜索表单 */
.search-form {
  margin-bottom: 24px;
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input-icon {
  position: absolute;
  left: 16px;
  width: 20px;
  height: 20px;
  color: #999;
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 14px 56px 14px 48px;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  font-size: 15px;
  font-family: inherit;
  transition: all 0.3s ease;
  background: #fafafa;
}

.search-input:focus {
  outline: none;
  border-color: var(--primary-color);
  background: white;
  box-shadow: 0 0 0 4px rgba(94, 114, 228, 0.1);
}

.search-input::placeholder {
  color: #bbb;
}

body.dark-mode .search-input {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
  color: var(--text-color);
}

body.dark-mode .search-input:focus {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--primary-color);
}

body.dark-mode .search-input::placeholder {
  color: #666;
}

.search-submit-btn {
  position: absolute;
  right: 8px;
  width: 40px;
  height: 40px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-submit-btn:hover {
  background: #4c63d2;
  transform: translateX(2px);
}

.search-submit-btn svg {
  width: 18px;
  height: 18px;
}

/* 搜索建议 */
.search-suggestions {
  animation: fadeInUp 0.4s ease;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.search-suggestions-title {
  font-size: 13px;
  font-weight: 600;
  color: #999;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.search-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.search-tag {
  display: inline-block;
  padding: 6px 14px;
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
  color: var(--text-color);
  text-decoration: none;
  border-radius: 20px;
  font-size: 13px;
  transition: all 0.3s ease;
  border: 1px solid #e0e0e0;
}

.search-tag:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(94, 114, 228, 0.3);
  border-color: var(--primary-color);
}

body.dark-mode .search-tag {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
  border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .search-tag:hover {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

/* ==================== 响应式设计 ==================== */

/* 平板 */
@media (max-width: 768px) {
  .search-modal {
    padding-top: 60px;
  }
  
  .search-modal-content {
    max-width: 95%;
    max-height: calc(100vh - 80px);
  }
  
  .search-modal-header {
    padding: 16px;
  }
  
  .search-modal-title {
    font-size: 16px;
  }
  
  .search-modal-title svg {
    width: 18px;
    height: 18px;
  }
  
  .search-modal-body {
    padding: 16px;
  }
  
  .search-input {
    padding: 12px 52px 12px 44px;
    font-size: 14px;
  }
  
  .search-input-icon {
    left: 14px;
    width: 18px;
    height: 18px;
  }
  
  .search-submit-btn {
    width: 36px;
    height: 36px;
  }
  
  .search-submit-btn svg {
    width: 16px;
    height: 16px;
  }
}

/* 手机 */
@media (max-width: 480px) {
  .search-modal {
    padding-top: 40px;
    align-items: flex-start;
  }
  
  .search-modal-content {
    width: 100%;
    max-width: 100%;
    border-radius: 12px 12px 0 0;
    max-height: calc(100vh - 40px);
  }
  
  .search-modal-header {
    padding: 14px;
  }
  
  .search-modal-title {
    font-size: 15px;
  }
  
  .search-modal-body {
    padding: 14px;
  }
  
  .search-input {
    padding: 11px 48px 11px 40px;
    font-size: 14px;
    border-radius: 8px;
  }
  
  .search-input-icon {
    left: 12px;
    width: 16px;
    height: 16px;
  }
  
  .search-submit-btn {
    right: 6px;
    width: 34px;
    height: 34px;
    border-radius: 6px;
  }
  
  .search-submit-btn svg {
    width: 15px;
    height: 15px;
  }
  
  .search-suggestions-title {
    font-size: 12px;
  }
  
  .search-tag {
    padding: 5px 12px;
    font-size: 12px;
  }
}




