:root {
  --primary-color: #2563eb;
  --secondary-color: #64748b;
  --success-color: #059669;
  --warning-color: #d97706;
  --danger-color: #dc2626;
  --light-bg: #f8fafc;
  --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --card-hover-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

body {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

.main-container {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  box-shadow: var(--card-shadow);
  margin: 20px auto;
  max-width: 1200px;
}

.header {
  background: linear-gradient(135deg, var(--primary-color), #3b82f6);
  color: white;
  padding: 2rem;
  border-radius: 20px 20px 0 0;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 100%;
}

.header-text {
  text-align: center;
  flex: 1;
}

.header h1 {
  margin: 0;
  font-size: 2.5rem;
  font-weight: 700;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header p {
  margin: 0.5rem 0 0 0;
  opacity: 0.9;
  font-size: 1.1rem;
}

.header-nav {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* 桌面端导航 */
.nav-desktop {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* 移动端导航 */
.nav-mobile {
  display: none;
  position: relative;
}

.nav-toggle {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.nav-toggle:hover {
  background: #1d4ed8;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.nav-toggle-icon {
  font-size: 1.2rem;
}

.nav-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border-radius: 10px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  border: 1px solid #e2e8f0;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  min-width: 200px;
}

.nav-dropdown.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown-item {
  display: block;
  width: 100%;
  padding: 0.75rem 1rem;
  border: none;
  background: none;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.2s ease;
  font-size: 0.9rem;
  border-bottom: 1px solid #f1f5f9;
}

.nav-dropdown-item:last-child {
  border-bottom: none;
  border-radius: 0 0 10px 10px;
}

.nav-dropdown-item:first-child {
  border-radius: 10px 10px 0 0;
}

.nav-dropdown-item:hover {
  background: #f8fafc;
}

/* 搜索面板移动端优化 */
.search-toggle-mobile {
  display: none;
}

.search-toggle-btn {
  background: var(--secondary-color);
  color: white;
  border: none;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.3s ease;
  width: 100%;
  justify-content: space-between;
}

.search-toggle-btn:hover {
  background: #475569;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(100, 116, 139, 0.3);
}

.search-panel {
  transition: all 0.3s ease;
}

.search-toggle-arrow {
  transition: transform 0.3s ease;
}

.nav-btn {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
  position: relative;
  overflow: hidden;
}

.nav-btn:hover {
  background: #1d4ed8;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

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

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

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

.content-area {
  padding: 2rem;
}

.search-section {
  margin-bottom: 2rem;
}

.search-container {
  background: white;
  border-radius: 15px;
  padding: 1.5rem;
  box-shadow: var(--card-shadow);
  border: 1px solid #e2e8f0;
}

.search-input-group {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.search-input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: #f8fafc;
}

.search-input:focus {
  outline: none;
  border-color: var(--primary-color);
  background: white;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.search-btn {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-btn:hover {
  background: #1d4ed8;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.filter-group {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.category-select {
  padding: 0.75rem 1rem;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 150px;
}

.category-select:focus {
  outline: none;
  border-color: var(--primary-color);
  background: white;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.clear-btn {
  background: var(--secondary-color);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.clear-btn:hover {
  background: #475569;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(100, 116, 139, 0.3);
}

.data-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.data-card {
  background: white;
  border-radius: 15px;
  box-shadow: var(--card-shadow);
  transition: all 0.3s ease;
  overflow: hidden;
  border: 1px solid #e2e8f0;
}

.data-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--card-hover-shadow);
}

.card-header {
  background: linear-gradient(135deg, #f8fafc, #e2e8f0);
  padding: 1.5rem;
  border-bottom: 1px solid #e2e8f0;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 0.5rem 0;
}

.card-company {
  color: var(--secondary-color);
  font-size: 0.9rem;
  margin: 0;
}

.card-body {
  padding: 1.5rem;
}

.keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.keyword-tag {
  background: var(--primary-color);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
}

.data-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1rem 0;
}

.info-item {
  text-align: center;
  padding: 0.75rem;
  background: var(--light-bg);
  border-radius: 8px;
}

.info-value {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--primary-color);
}

.info-label {
  font-size: 0.8rem;
  color: var(--secondary-color);
  margin-top: 0.25rem;
}

.ownership-section {
  margin: 1rem 0;
}

.section-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.5rem;
}

.ownership-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.ownership-item {
  padding: 0.5rem;
  background: #f1f5f9;
  border-radius: 6px;
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
  color: #475569;
}

.price-section {
  background: linear-gradient(135deg, var(--success-color), #10b981);
  color: white;
  padding: 1rem;
  border-radius: 10px;
  text-align: center;
  margin-top: 1rem;
}

.price-value {
  font-size: 1.5rem;
  font-weight: 700;
}

.price-label {
  font-size: 0.9rem;
  opacity: 0.9;
}

.payment-button {
  background: linear-gradient(135deg, #059669, #10b981);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
  margin-top: 1rem;
}

.payment-button:hover {
  background: linear-gradient(135deg, #047857, #059669);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
}

.payment-button:active {
  transform: translateY(0);
}

.loading-container {
  text-align: center;
  padding: 3rem;
}

.loading-spinner {
  width: 3rem;
  height: 3rem;
  border: 4px solid #e2e8f0;
  border-top: 4px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem;
}

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

.error-message {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: var(--danger-color);
  padding: 1rem;
  border-radius: 8px;
  text-align: center;
  margin: 1rem 0;
}

.empty-state {
  text-align: center;
  padding: 3rem;
  color: var(--secondary-color);
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

@media (max-width: 768px) {
  .main-container {
    margin: 10px;
    border-radius: 15px;
  }

  .header {
    padding: 1.5rem;
    border-radius: 15px 15px 0 0;
  }

  .header-content {
    flex-direction: column;
    gap: 1rem;
  }

  .header-text {
    text-align: center;
  }

  .header h1 {
    font-size: 2rem;
  }

  .nav-btn {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
  }

  .content-area {
    padding: 1rem;
  }

  .data-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .data-info {
    grid-template-columns: 1fr;
  }

  /* 移动端导航显示 */
  .nav-desktop {
    display: none;
  }

  .nav-mobile {
    display: block;
    width: 100%;
  }

  /* 移动端搜索显示 */
  .search-toggle-mobile {
    display: block;
    margin-bottom: 1rem;
  }

  .search-panel {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
  }

  .search-panel.show {
    max-height: 500px;
    opacity: 1;
    margin-top: 1rem;
  }

  .header-nav {
    flex-direction: column;
    gap: 0.5rem;
  }

  .nav-btn {
    width: 100%;
    text-align: center;
  }

  .search-input-group {
    flex-direction: column;
    gap: 0.75rem;
  }

  .filter-group {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .category-select {
    min-width: auto;
    width: 100%;
  }

  .clear-btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .header {
    padding: 1rem;
  }

  .header h1 {
    font-size: 1.5rem;
  }

  .search-container {
    padding: 1rem;
  }

  .nav-btn {
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
  }
}

/* 角色导航按钮颜色样式 */
/* 平台运营方 - 深蓝色 */
.nav-btn-platform {
  background: linear-gradient(135deg, #1e40af, #3b82f6);
}

.nav-btn-platform:hover {
  background: linear-gradient(135deg, #1e3a8a, #2563eb);
  box-shadow: 0 4px 12px rgba(30, 64, 175, 0.4);
}

/* 数据卖家 - 绿色 */
.nav-btn-data-owner {
  background: linear-gradient(135deg, #059669, #10b981);
}

.nav-btn-data-owner:hover {
  background: linear-gradient(135deg, #047857, #059669);
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.4);
}

/* 数据买家 - 橙色 */
.nav-btn-data-buyer {
  background: linear-gradient(135deg, #ea580c, #f97316);
}

.nav-btn-data-buyer:hover {
  background: linear-gradient(135deg, #c2410c, #ea580c);
  box-shadow: 0 4px 12px rgba(234, 88, 12, 0.4);
}

/* 程序开发者 - 紫色 */
.nav-btn-developer {
  background: linear-gradient(135deg, #7c3aed, #a855f7);
}

.nav-btn-developer:hover {
  background: linear-gradient(135deg, #6d28d9, #7c3aed);
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.4);
}

/* 可信空间运营商 - 红色 */
.nav-btn-tee {
  background: linear-gradient(135deg, #dc2626, #ef4444);
}

.nav-btn-tee:hover {
  background: linear-gradient(135deg, #b91c1c, #dc2626);
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.4);
}

/* 移动端下拉菜单项颜色样式 */
.nav-dropdown-platform {
  border-left: 4px solid #1e40af;
}

.nav-dropdown-platform:hover {
  background-color: rgba(30, 64, 175, 0.1);
}

.nav-dropdown-data-owner {
  border-left: 4px solid #059669;
}

.nav-dropdown-data-owner:hover {
  background-color: rgba(5, 150, 105, 0.1);
}

.nav-dropdown-data-buyer {
  border-left: 4px solid #ea580c;
}

.nav-dropdown-data-buyer:hover {
  background-color: rgba(234, 88, 12, 0.1);
}

.nav-dropdown-developer {
  border-left: 4px solid #7c3aed;
}

.nav-dropdown-developer:hover {
  background-color: rgba(124, 58, 237, 0.1);
}

.nav-dropdown-tee {
  border-left: 4px solid #dc2626;
}

.nav-dropdown-tee:hover {
  background-color: rgba(220, 38, 38, 0.1);
}