/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", sans-serif;
  line-height: 1.6;
  color: #ffffff;
  overflow-x: hidden;
  min-height: 100vh;
}

/* Video Background */
.video-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  /* Added animated gradient background */
  background: linear-gradient(135deg, #667eea 0%, #764ba2 25%, #f093fb 50%, #4facfe 75%, #667eea 100%);
  background-size: 400% 400%;
  animation: gradientAnimation 15s ease infinite;
}

.video-background video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.45) 0%, rgba(30, 30, 60, 0.55) 50%, rgba(0, 0, 0, 0.45) 100%);
  backdrop-filter: blur(0.5px);
}

/* Container */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.08) 100%);
  backdrop-filter: blur(30px) saturate(180%);
  border-bottom: 1.5px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transition: all 0.3s ease;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}

.logo {
  font-family: "Anton", sans-serif;
  font-size: 1.8rem;
  font-weight: 400;
  color: #ffffff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.nav {
  display: flex;
  gap: 2rem;
}

.nav-link {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: #ffffff;
  transform: translateY(-2px);
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
  transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.mobile-menu-btn {
  display: none;
  flex-direction: column;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
}

.mobile-menu-btn span {
  width: 25px;
  height: 3px;
  background: #ffffff;
  margin: 3px 0;
  transition: 0.3s;
  border-radius: 2px;
}

/* Main Content */
.main {
  padding-top: 120px;
  padding-bottom: 60px;
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.page-title {
  text-align: center;
  margin-bottom: 4rem;
  animation: fadeInUp 1s ease;
}

.page-title h2 {
  font-family: "Anton", sans-serif;
  font-size: 4rem;
  font-weight: 400;
  margin-bottom: 1rem;
  color: #ffffff;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5), 0 2px 10px rgba(102, 126, 234, 0.4);
}

.page-title p {
  font-size: 1.3rem;
  color: rgba(255, 255, 255, 0.95);
  font-weight: 400;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

/* Category Grid */
.category-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start; /* 改为左对齐 */
  gap: 3rem;
  max-width: 1400px;
  margin: 0 auto;
  /* 添加行间距控制 */
  row-gap: 4rem;
}

/* Category Card with Liquid Glass Effect */
.category-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.08) 100%);
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  border-radius: 32px;
  padding: 3rem;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  /* 调整宽度确保每行最多3个卡片 */
  width: calc(33.333% - 2rem); /* 3个卡片减去gap */
  min-width: 320px;
  min-height: 320px;
  animation: fadeInUp 0.8s ease;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.35), inset 0 -1px 0
    rgba(255, 255, 255, 0.15);
}

.category-card::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    135deg,
    transparent 0%,
    rgba(255, 255, 255, 0.08) 45%,
    rgba(255, 255, 255, 0.12) 50%,
    rgba(255, 255, 255, 0.08) 55%,
    transparent 100%
  );
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
}

.category-card::after {
  content: "";
  position: absolute;
  inset: -1.5px;
  border-radius: 32px;
  padding: 1.5px;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.4), rgba(118, 75, 162, 0.4), rgba(102, 126, 234, 0.4));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
  background-size: 200% 200%;
  animation: gradientShift 4s ease infinite;
}

.category-card:hover {
  transform: translateY(-15px) scale(1.03);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.35), 0 12px 24px rgba(102, 126, 234, 0.25), inset 0 1px 0
    rgba(255, 255, 255, 0.45), inset 0 -1px 0 rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.45);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0.12) 100%);
}

.category-card:hover::before {
  opacity: 1;
}

.category-card:hover::after {
  opacity: 1;
}

.card-icon {
  width: 120px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2rem;
  color: #ffffff;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.category-card:hover .card-icon {
  transform: scale(1.1) rotate(5deg);
  filter: drop-shadow(0 8px 24px rgba(102, 126, 234, 0.5));
}

.card-title {
  font-size: 2rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 1rem;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  transition: all 0.3s ease;
}

.category-card:hover .card-title {
  transform: scale(1.05);
}

.card-description {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 1.5rem;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
  flex-grow: 1;
}


.card-status {
  padding: 0.6rem 1.5rem;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  backdrop-filter: blur(15px) saturate(180%);
  -webkit-backdrop-filter: blur(15px) saturate(180%);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transition: all 0.3s ease;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.category-card:hover .card-status {
  transform: scale(1.1);
}

.card-status.online {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.35) 0%, rgba(34, 197, 94, 0.25) 100%);
  color: #4ade80;
  border: 1.5px solid rgba(34, 197, 94, 0.5);
  box-shadow: 0 4px 16px rgba(34, 197, 94, 0.35), inset 0 1px 0 rgba(34, 197, 94, 0.4), 0 0 20px rgba(34, 197, 94, 0.2);
}

.card-status.ready {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.35) 0%, rgba(59, 130, 246, 0.25) 100%);
  color: #60a5fa;
  border: 1.5px solid rgba(59, 130, 246, 0.5);
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.35), inset 0 1px 0 rgba(59, 130, 246, 0.4), 0 0 20px
    rgba(59, 130, 246, 0.2);
}

.card-status.construction {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.35) 0%, rgba(251, 191, 36, 0.25) 100%);
  color: #fcd34d;
  border: 1.5px solid rgba(251, 191, 36, 0.5);
  box-shadow: 0 4px 16px rgba(251, 191, 36, 0.35), inset 0 1px 0 rgba(251, 191, 36, 0.4), 0 0 20px
    rgba(251, 191, 36, 0.2);
}

/* Added unknown status style */
.card-status.unknown {
  background: linear-gradient(135deg, rgba(209, 213, 219, 0.4) 0%, rgba(209, 213, 219, 0.3) 100%);
  color: #e5e7eb;
  border: 1.5px solid rgba(209, 213, 219, 0.6);
  box-shadow: 0 4px 16px rgba(209, 213, 219, 0.25), inset 0 1px 0 rgba(209, 213, 219, 0.5), 0 0 20px
    rgba(209, 213, 219, 0.15);
}

/* Added offline status style */
.card-status.offline {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.35) 0%, rgba(239, 68, 68, 0.25) 100%);
  color: #f87171;
  border: 1.5px solid rgba(239, 68, 68, 0.5);
  box-shadow: 0 4px 16px rgba(239, 68, 68, 0.35), inset 0 1px 0 rgba(239, 68, 68, 0.4), 0 0 20px rgba(239, 68, 68, 0.2);
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.12) 100%);
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  border-radius: 32px;
  padding: 3rem;
  max-width: 500px;
  width: 90%;
  text-align: center;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  animation: scaleIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-icon {
  color: #fcd34d;
  margin-bottom: 1.5rem;
  filter: drop-shadow(0 4px 16px rgba(251, 191, 36, 0.4));
}

.modal-content h3 {
  font-size: 2rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 1rem;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.modal-content p {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 2rem;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}
/* Buttons */
.btn {
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  text-align: center;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
  flex: 1;
  min-width: 120px;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

/* Enhanced button styles with better contrast */
.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #ffffff;
  box-shadow: 0 6px 24px rgba(102, 126, 234, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.btn-primary:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 10px 35px rgba(102, 126, 234, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.btn-secondary {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.12) 100%);
  color: #ffffff;
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(15px) saturate(180%);
  -webkit-backdrop-filter: blur(15px) saturate(180%);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.btn-secondary:hover {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.28) 0%, rgba(255, 255, 255, 0.16) 100%);
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.btn-disabled {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.5);
  cursor: not-allowed;
  border: 1.5px solid rgba(255, 255, 255, 0.15);
}

.btn-back {
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
  color: #ffffff;
  padding: 1rem 2rem;
  font-size: 1.1rem;
  box-shadow: 0 4px 20px rgba(255, 107, 107, 0.4);
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.btn-back:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(255, 107, 107, 0.5);
}

/* Back Section */
.back-section {
  text-align: center;
  margin-top: 3rem;
}

.modal-btn {
  padding: 1rem 2.5rem;
  border-radius: 16px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #ffffff;
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 6px 24px rgba(102, 126, 234, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.modal-btn:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 10px 35px rgba(102, 126, 234, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .category-grid {
    gap: 2rem;
  }

  /* Adjusted card width for tablets */
  .category-card {
    width: 320px;
  }

  .page-title h2 {
    font-size: 3rem;
  }
}

@media (max-width: 768px) {
  .nav {
    display: none;
  }

  .mobile-menu-btn {
    display: flex;
  }

  .page-title h2 {
    font-size: 2.5rem;
  }

  .category-grid {
    /* Changed to column layout for mobile */
    flex-direction: column;
    align-items: center;
    gap: 2rem;
  }

  .category-card {
    /* Full width on mobile */
    width: 100%;
    max-width: 400px;
    min-height: 280px;
    padding: 2.5rem;
	position: relative;
  }
}

@media (max-width: 1024px) {
  .category-grid {
    gap: 2rem;
  }

  /* 在平板设备上改为2列 */
  .category-card {
    width: calc(50% - 1rem); /* 2个卡片减去gap */
  }

  .page-title h2 {
    font-size: 3rem;
  }
}

@media (max-width: 768px) {
  .nav {
    display: none;
  }

  .mobile-menu-btn {
    display: flex;
  }

  .page-title h2 {
    font-size: 2.5rem;
  }

  .category-grid {
    /* 在移动设备上改为单列 */
    flex-direction: column;
    align-items: flex-start; /* 改为左对齐 */
    gap: 2rem;
  }

  .category-card {
    /* 移动设备上全宽 */
    width: 100%;
    max-width: 400px;
    min-height: 280px;
    padding: 2.5rem;
    position: relative;
  }
}

@media (max-width: 480px) {
  .main {
    padding-top: 100px;
  }

  .page-title h2 {
    font-size: 2rem;
  }

  .page-title p {
    font-size: 1rem;
  }

  .category-card {
    min-height: 260px;
    padding: 2rem;
    width: 100%;
  }
}

/* Animations */
/* Added gradient animation for background */
@keyframes gradientAnimation {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.5);
}
