/* 基础样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  padding: 20px;
}

#app {
  max-width: 1200px;
  margin: 0 auto;
  background: white;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

/* 头部 */
.header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 40px;
  text-align: center;
}

.header h1 {
  font-size: 32px;
  margin-bottom: 10px;
}

.subtitle {
  font-size: 16px;
  opacity: 0.9;
}

/* 搜索区域 */
.search-container {
  padding: 30px 40px;
  border-bottom: 1px solid #e0e0e0;
}

.search-box {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
}

#search-input {
  flex: 1;
  padding: 15px 20px;
  font-size: 16px;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  outline: none;
  transition: border-color 0.3s;
}

#search-input:focus {
  border-color: #667eea;
}

#search-button {
  padding: 15px 30px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

#search-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

#search-button:active {
  transform: translateY(0);
}

.search-tips {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 14px;
  color: #666;
}

.tag {
  padding: 5px 12px;
  background: #f0f0f0;
  border-radius: 15px;
  cursor: pointer;
  transition: background 0.2s;
}

.tag:hover {
  background: #667eea;
  color: white;
}

/* 结果区域 */
.results-container {
  padding: 30px 40px;
  min-height: 400px;
}

.welcome-message {
  text-align: center;
  padding: 40px 0;
}

.welcome-message h2 {
  font-size: 24px;
  margin-bottom: 15px;
  color: #333;
}

.welcome-message > p {
  font-size: 16px;
  color: #666;
  margin-bottom: 40px;
  line-height: 1.6;
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.feature {
  display: flex;
  gap: 15px;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 10px;
  text-align: left;
}

.feature-icon {
  font-size: 40px;
  flex-shrink: 0;
}

.feature h3 {
  font-size: 18px;
  margin-bottom: 5px;
  color: #333;
}

.feature p {
  font-size: 14px;
  color: #666;
}

/* 结果卡片 */
.result-card {
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 20px;
  transition: box-shadow 0.3s, transform 0.3s;
}

.result-card:hover {
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.result-title {
  font-size: 18px;
  color: #667eea;
  margin-bottom: 10px;
  font-weight: 600;
}

.result-meta {
  font-size: 14px;
  color: #999;
  margin-bottom: 10px;
  display: flex;
  gap: 15px;
}

.result-summary {
  font-size: 15px;
  color: #666;
  line-height: 1.6;
  margin-bottom: 15px;
}

.result-link {
  display: inline-block;
  padding: 8px 16px;
  background: #667eea;
  color: white;
  text-decoration: none;
  border-radius: 5px;
  font-size: 14px;
  transition: background 0.3s;
}

.result-link:hover {
  background: #764ba2;
}

/* 无结果 */
.no-results {
  text-align: center;
  padding: 60px 0;
  color: #999;
}

.no-results h3 {
  font-size: 20px;
  margin-bottom: 10px;
  color: #666;
}

/* 加载动画 */
.loading {
  text-align: center;
  padding: 60px 0;
}

.spinner {
  width: 50px;
  height: 50px;
  margin: 0 auto 20px;
  border: 4px solid #f0f0f0;
  border-top-color: #667eea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loading p {
  color: #666;
  font-size: 16px;
}

/* 响应式 */
@media (max-width: 768px) {
  body {
    padding: 10px;
  }

  .header {
    padding: 30px 20px;
  }

  .header h1 {
    font-size: 24px;
  }

  .search-container {
    padding: 20px;
  }

  .search-box {
    flex-direction: column;
  }

  #search-button {
    width: 100%;
  }

  .results-container {
    padding: 20px;
  }

  .features {
    grid-template-columns: 1fr;
  }
}
