/**
 * 爽爽官网首页（暗色 C 端）定制样式
 * 调用方：index.html（Tailwind CDN 负责工具类，本文件负责动效与质感）
 * 边界：协议页 privacy/terms 仍走 site.css，不在此文件维护
 */

html,
body {
  background-color: #030305;
  color: #f9fafb;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

.custom-scrollbar::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}

.custom-scrollbar::-webkit-scrollbar-track {
  background: #030305;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
  background: #1f1f2e;
  border-radius: 2px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: #3730a3;
}

.bg-noise {
  position: relative;
}

.bg-noise::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

.glass-panel {
  background: rgba(18, 18, 26, 0.5);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.04);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.premium-card {
  background: linear-gradient(180deg, rgba(30, 30, 45, 0.4) 0%, rgba(15, 15, 20, 0.8) 100%);
  border: 1px solid rgba(124, 58, 237, 0.1);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.4s ease;
}

@media (hover: hover) {
  .premium-card:hover {
    transform: translateY(-6px);
    border-color: rgba(124, 58, 237, 0.4);
    box-shadow: 0 20px 40px -10px rgba(124, 58, 237, 0.15);
  }
}

.text-gradient-flow {
  background: linear-gradient(to right, #ffffff 20%, #a78bfa 50%, #ffffff 80%);
  background-size: 200% auto;
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
  animation: textFlow 4s linear infinite;
}

@keyframes textFlow {
  to {
    background-position: 200% center;
  }
}

#mobile-menu {
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
}

#mobile-menu.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.mockup-3d-wrapper {
  perspective: 1500px;
  transform-style: preserve-3d;
}

.phone-body {
  width: 340px;
  height: 720px;
  background-color: #000;
  border-radius: 50px;
  box-shadow:
    inset 0 0 0 2px #3f3f5a,
    inset 0 0 0 10px #0a0a0f,
    0 40px 80px -20px rgba(124, 58, 237, 0.4);
  transform: rotateY(-15deg) rotateX(10deg);
  animation: float 6s ease-in-out infinite;
  position: relative;
}

.phone-screen {
  position: absolute;
  top: 12px;
  bottom: 12px;
  left: 12px;
  right: 12px;
  border-radius: 38px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: linear-gradient(135deg, #2e1065 0%, #030305 100%);
}

.phone-screen__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.phone-notch {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 130px;
  height: 30px;
  background-color: #000;
  border-bottom-left-radius: 16px;
  border-bottom-right-radius: 16px;
  z-index: 20;
}

@keyframes float {
  0%,
  100% {
    transform: rotateY(-15deg) rotateX(10deg) translateY(0);
  }

  50% {
    transform: rotateY(-12deg) rotateX(5deg) translateY(-25px);
  }
}

.dot-online {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 12px;
  height: 12px;
  background-color: #10b981;
  border: 2px solid #12121a;
  border-radius: 50%;
  box-shadow: 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }

  70% {
    box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

.scene-card {
  background: linear-gradient(160deg, rgba(124, 58, 237, 0.22) 0%, rgba(3, 3, 5, 0.95) 55%);
}

.scene-card--community {
  background: linear-gradient(160deg, rgba(16, 185, 129, 0.18) 0%, rgba(3, 3, 5, 0.95) 55%);
}

.updates-table-wrap {
  overflow-x: auto;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.updates-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
}

.updates-table th,
.updates-table td {
  padding: 0.875rem 1rem;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.updates-table th {
  color: #9ca3af;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.02);
}

.updates-table td {
  color: #e5e7eb;
}

.updates-table__link {
  color: #a78bfa;
  font-weight: 600;
}

.updates-table__link:hover {
  color: #c4b5fd;
}

.updates-latest__badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
  font-size: 0.6875rem;
  font-weight: 700;
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.updates-latest__badge.is-offline {
  background: rgba(156, 163, 175, 0.12);
  color: #9ca3af;
  border-color: rgba(156, 163, 175, 0.2);
}

.order-dialog {
  border: none;
  padding: 0;
  background: transparent;
  max-width: calc(100vw - 2rem);
}

.order-dialog::backdrop {
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
}

.order-dialog__panel {
  position: relative;
  width: min(420px, calc(100vw - 2rem));
  padding: 1.75rem;
  border-radius: 1.25rem;
  background: linear-gradient(180deg, rgba(30, 30, 45, 0.95) 0%, rgba(15, 15, 20, 0.98) 100%);
  border: 1px solid rgba(124, 58, 237, 0.25);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}

.order-dialog__close {
  position: absolute;
  top: 0.875rem;
  right: 0.875rem;
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  cursor: pointer;
}

.order-dialog__actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  margin-top: 1.25rem;
}

.order-dialog__btn {
  padding: 0.625rem 1.125rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
}

.order-dialog__btn--ghost {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.08);
}

.order-dialog__btn--primary {
  background: #7c3aed;
  color: #fff;
}

.order-dialog__btn--primary:hover {
  background: #6d28d9;
}

.img-overlay {
  background: linear-gradient(to top, #030305 0%, rgba(3, 3, 5, 0.6) 40%, transparent 100%);
}

.img-card img {
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (hover: hover) {
  .img-card:hover img {
    transform: scale(1.05);
  }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.nav-link {
  position: relative;
  transition: color 0.2s ease;
}

.nav-link.is-active {
  color: #f9fafb;
}

.nav-link.is-active::after {
  content: "";
  position: absolute;
  bottom: -26px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: #7c3aed;
}
