:root {
  --primary: #005a9c;
  --primary-light: #007acc;
  --secondary-onvif: #4a90e2;
  --secondary-rtsp: #50c878;
  --secondary-rtmp: #d9534f;
  --secondary-srt: #f0ad4e;
  --secondary-gb: #9b59b6;
  --secondary-media: #8028f8;
  --bg-light: #f8f9fa;
  --text-dark: #333;
  --text-muted: #6c757d;
  --border: #dee2e6;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
}

body {
  color:#333;
  line-height: 1.6;
  font:13px Courier, Geneva, sans-serif,serif;
  background:url(../images/bg_body.jpg) repeat-x;
  max-width: 960px;
  margin: 0 auto;
}

nav ul {
  display: flex;
  list-style: none;
  gap: 2rem;
}

nav a {
  color: var(--text-dark);
  font-weight: 500;
  transition: color 0.3s;
}

nav a:hover {
  color: var(--primary);
}

.hero {
  text-align: center;
  padding: 50px 30px;
  background: white;
  border-radius: 16px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  margin-bottom: 40px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #005a9c, #007acc);
}

.hero h1 {
  font-size: 2.8em;
  color: #005a9c;
  margin-bottom: 16px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.hero p {
  font-size: 1.2em;
  color: #666;
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.7;
}

.category-nav {
  text-align: center;
  padding: 2rem 0;
  background: white;
  border-bottom: 1px solid var(--border);
}

.category-btn {
  background: none;
  border: 2px solid var(--border);
  padding: 0.6rem 1.5rem;
  margin: 0 0.5rem 0.5rem;
  border-radius: 30px;
  cursor: pointer;
  font-weight: 500;
  transition: var(--transition);
}

.category-btn:hover,
.category-btn.active {
  border-color: var(--primary);
  color: var(--primary);
}

.category-btn[data-cat="onvif"]:hover,
.category-btn[data-cat="onvif"].active { border-color: var(--secondary-onvif); color: var(--secondary-onvif); }
.category-btn[data-cat="rtsp"]:hover,
.category-btn[data-cat="rtsp"].active { border-color: var(--secondary-rtsp); color: var(--secondary-rtsp); }
.category-btn[data-cat="rtmp"]:hover,
.category-btn[data-cat="rtmp"].active { border-color: var(--secondary-rtmp); color: var(--secondary-rtmp); }
.category-btn[data-cat="srt"]:hover,
.category-btn[data-cat="srt"].active { border-color: var(--secondary-srt); color: var(--secondary-srt); }
.category-btn[data-cat="gb28181"]:hover,
.category-btn[data-cat="gb28181"].active { border-color: var(--secondary-gb); color: var(--secondary-gb); }
.category-btn[data-cat="media"]:hover,
.category-btn[data-cat="media"].active { border-color: var(--secondary-media); color: var(--secondary-media); }

.product-body {
  padding: 20px;
  flex: 1;
}

.downloads-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  padding: 3rem 0;
}

.product-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  opacity: 1;
  transform: translateY(0);
}

.product-card.hidden {
  opacity: 0;
  transform: translateY(20px);
  visibility: hidden;
  position: absolute;
  width: 300px;
}

.product-card:not(.hidden) {
  position: relative;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.product-header {
  padding: 20px;
  background: linear-gradient(135deg, #005a9c 0%, #007acc 100%);
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.product-header h3 {
  font-size: 1.3rem;
  font-weight: 600;
}

.tag {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  border-radius: 50px;
  color: white;
}

.tag.onvif { background: linear-gradient(135deg, #FFA500 0%, #FF8C00 100%); }
.tag.rtsp { background: linear-gradient(135deg, #2E8B57 0%, #3CB371 100%); }
.tag.rtmp { background: linear-gradient(135deg, #DC143C 0%, #FF4500 100%); }
.tag.srt { background: linear-gradient(135deg, #4169E1 0%, #1E90FF 100%); }
.tag.gb28181 { background: linear-gradient(135deg, #2F4F4F 0%, #708090 100%); }
.tag.media { background: linear-gradient(135deg, #8A2BE2 0%, #9370DB 100%); }

.platforms {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid #f0f0f0;
  transition: background-color 0.2s;
}

.platforms:last-child {
  border-bottom: none;
}

.platforms:hover {
  background-color: #f9f9f9;
}

.platform {
  color: #666;
  font-size: 0.95em;
  font-weight: 500;
}

.btn-download {
  padding: 8px 16px;
  background: linear-gradient(135deg, #005a9c 0%, #007acc 100%);
  color: white;
  text-decoration: none;
  font-size: 0.9em;
  font-weight: 600;
  border-radius: 6px;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-download:hover {
  background: linear-gradient(135deg, #00447a 0%, #005a9c 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 90, 156, 0.3);
}

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

.featured-downloads {
  margin: 60px 0 50px;
  text-align: center;
}

.featured-downloads h2 {
  font-size: 2em;
  color: #005a9c;
  margin-bottom: 30px;
  font-weight: 700;
  position: relative;
  display: inline-block;
}

.featured-downloads h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, #005a9c, #007acc);
  border-radius: 2px;
}

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

.featured-item {
  background: linear-gradient(145deg, white, #f9fbff);
  padding: 35px;
  border-radius: 14px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
  text-align: left;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 1px solid #eef2f7;
}

.featured-item:hover {
  transform: translateY(-6px);
  box-shadow: 0 15px 35px rgba(0, 90, 156, 0.15);
  border-color: #005a9c22;
}

.featured-item h3 {
  font-size: 1.5em;
  color: #005a9c;
  margin-bottom: 12px;
  font-weight: 600;
}

.featured-item p {
  color: #666;
  margin-bottom: 24px;
  font-size: 1em;
  line-height: 1.7;
}

.btn-primary {
  display: inline-block;
  padding: 12px 28px;
  background: linear-gradient(135deg, #005a9c 0%, #007acc 100%);
  color: white;
  text-decoration: none;
  font-weight: 600;
  border-radius: 8px;
  transition: all 0.3s ease;
  font-size: 1em;
  box-shadow: 0 4px 15px rgba(0, 90, 156, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #00447a 0%, #005a9c 100%);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 90, 156, 0.4);
}

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

.cta-section {
  text-align: center;
  padding: 40px;
  background: linear-gradient(135deg, white, #f0f8ff);
  border-radius: 14px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
  margin: 50px 0;
  border: 1px solid #e6f0ff;
}

.cta-section h3 {
  font-size: 1.6em;
  color: #005a9c;
  margin-bottom: 15px;
  font-weight: 600;
}

.cta-section p {
  color: #666;
  font-size: 1.1em;
  margin-bottom: 20px;
  line-height: 1.7;
}

.cta-section a {
  color: #005a9c;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
}

.cta-section a:hover {
  color: #00447a;
  border-bottom-color: #005a9c;
}

@media (max-width: 768px) {
  .header-container {
    flex-direction: column;
    gap: 1rem;
  }
  nav ul {
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
  }
  .hero h1 { font-size: 2rem; }
  .hero p { font-size: 1rem; }
  .downloads-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .featured-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}
