/* ==========================================================================
   POSSIBLE SOLUTIONS SDN BHD - 2026 Premium UI / UX Design System
   High-End Commercial POS Hardware & Dynamic Technology Aesthetic
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800;900&family=Noto+Sans+SC:wght@300;400;500;700;900&family=JetBrains+Mono:wght@400;500;700&display=swap');

:root {
  --brand-primary: #10b981;
  --brand-primary-hover: #059669;
  --brand-primary-light: #34d399;
  --brand-primary-glow: rgba(16, 185, 129, 0.28);
  --brand-navy-950: #060b1c;
  --brand-navy-900: #0b1330;
  --brand-navy-850: #0f1a42;
  --brand-navy-800: #162254;
  --surface-card: #ffffff;
  --surface-card-hover: #fcfdfd;
  --border-subtle: rgba(226, 232, 240, 0.85);
  --border-glow: rgba(16, 185, 129, 0.35);
  --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  scroll-behavior: smooth;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Plus Jakarta Sans', 'Noto Sans SC', system-ui, -apple-system, sans-serif;
  color: #1e293b;
  background-color: #f8fafc;
  overflow-x: hidden;
}

code, .font-mono {
  font-family: 'JetBrains Mono', monospace;
}

/* 选中文本高亮 */
::selection {
  background-color: #10b981;
  color: #ffffff;
}

/* ==========================================================================
   Modern Glassmorphism & Surface Styles
   ========================================================================== */

.glass-nav {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: all 0.3s ease;
}

.glass-nav.scrolled {
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 30px -10px rgba(11, 19, 48, 0.08), 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* 导航栏防挤压与防折行强制保护 */
#main-header nav a,
#main-header .category-tab-btn,
[data-lang-btn],
.floating-whatsapp-btn {
  white-space: nowrap !important;
}

.glass-panel {
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.6);
}

.dark-glass-panel {
  background: rgba(11, 19, 48, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* 科技网格与微点阵背景 */
.tech-dots {
  background-image: radial-gradient(rgba(16, 185, 129, 0.18) 1.25px, transparent 1.25px);
  background-size: 24px 24px;
}

.tech-grid-dark {
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 36px 36px;
}

/* ==========================================================================
   Typography & Gradient Text
   ========================================================================== */

.text-gradient {
  background: linear-gradient(135deg, #059669 0%, #10b981 45%, #0b1330 95%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gradient-aurora {
  background: linear-gradient(135deg, #34d399 0%, #10b981 50%, #60a5fa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gradient-gold {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #d97706 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ==========================================================================
   Hardware Stage & Cards Visual System
   ========================================================================== */

/* 旗舰硬件展示台光晕底座 */
.stage-pedestal {
  position: relative;
}

.stage-pedestal::after {
  content: '';
  position: absolute;
  bottom: 8px;
  left: 8%;
  right: 8%;
  height: 32px;
  background: radial-gradient(ellipse at center, rgba(16, 185, 129, 0.45) 0%, rgba(16, 185, 129, 0.15) 45%, transparent 75%);
  filter: blur(10px);
  z-index: 0;
  pointer-events: none;
  animation: pedestalBreathe 4s ease-in-out infinite alternate;
}

@keyframes pedestalBreathe {
  0% { transform: scaleX(0.92); opacity: 0.6; }
  100% { transform: scaleX(1.06); opacity: 1; }
}

/* 展台 3D 视差立体微倾斜容器 */
.tilt-card-container {
  perspective: 1000px;
  transform-style: preserve-3d;
}

.tilt-card-inner {
  transition: transform 0.25s cubic-bezier(0.2, 0, 0.2, 1);
  will-change: transform;
}

/* 慢速流光旋转光环 */
.aurora-rotating-halo {
  animation: rotateGlow 18s linear infinite;
}

@keyframes rotateGlow {
  0% { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(180deg) scale(1.08); }
  100% { transform: rotate(360deg) scale(1); }
}

/* 悬浮微徽章 */
.floating-pill {
  animation: floatSlow 4.5s ease-in-out infinite;
}

.floating-pill-reverse {
  animation: floatSlowReverse 5s ease-in-out infinite;
}

@keyframes floatSlow {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-8px) rotate(-1deg); }
}

@keyframes floatSlowReverse {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(8px) rotate(1deg); }
}

/* 硬件卡片高级立体交互动效 */
.hardware-card {
  transition: transform 0.4s var(--ease-spring), box-shadow 0.4s var(--ease-spring), border-color 0.35s ease;
  position: relative;
  background: #ffffff;
}

.hardware-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(226, 232, 240, 0.5));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.hardware-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 24px 38px -12px rgba(16, 185, 129, 0.18), 0 12px 20px -6px rgba(11, 19, 48, 0.08);
  border-color: rgba(16, 185, 129, 0.5);
}

/* 互动分类卡片 */
.category-card {
  transition: all 0.35s var(--ease-spring);
  position: relative;
  overflow: hidden;
}

.category-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(16, 185, 129, 0.15), transparent 70%);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.category-card:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 18px 30px -10px rgba(16, 185, 129, 0.22);
  border-color: #10b981;
}

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

/* 客户与合作伙伴卡片 */
.client-brand-card {
  transition: all 0.35s var(--ease-spring);
}

.client-brand-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 32px -10px rgba(15, 27, 66, 0.12), 0 8px 16px -4px rgba(16, 185, 129, 0.1);
  border-color: #10b981;
}

/* B2B Dealer Banner 奢华光晕 */
.dealer-aurora-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #080e24 0%, #0d1738 50%, #0a132e 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.dealer-aurora-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.26) 0%, transparent 65%);
  filter: blur(40px);
  pointer-events: none;
  animation: auroraPulse 6s ease-in-out infinite alternate;
}

@keyframes auroraPulse {
  0% { transform: scale(0.9) translate(0, 0); opacity: 0.7; }
  100% { transform: scale(1.15) translate(-15px, 15px); opacity: 1; }
}

/* ==========================================================================
   Buttons & Interactive Elements
   ========================================================================== */

/* 呼吸绿色发光按钮 */
.btn-glow-emerald {
  position: relative;
  transition: all 0.3s var(--ease-spring);
}

.btn-glow-emerald:hover {
  box-shadow: 0 10px 28px -4px rgba(16, 185, 129, 0.55);
  transform: translateY(-2px);
}

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

/* 按钮微波光斑效果 */
.shine-effect {
  position: relative;
  overflow: hidden;
}

.shine-effect::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -60%;
  width: 40%;
  height: 200%;
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.3) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: rotate(28deg);
  pointer-events: none;
  transition: all 0.8s ease;
}

.shine-effect:hover::after {
  left: 130%;
}

/* 周期性自动掠光效果（用于强调核心 CTA） */
.auto-shine {
  position: relative;
  overflow: hidden;
}

.auto-shine::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -70%;
  width: 45%;
  height: 200%;
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.25) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: rotate(28deg);
  pointer-events: none;
  animation: periodicShine 5s infinite ease-in-out;
}

@keyframes periodicShine {
  0%, 75% { left: -70%; }
  100% { left: 140%; }
}

/* 雷达扩散微光晕 (Radar Pulse Ring) */
.radar-ring {
  position: relative;
}

.radar-ring::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 9999px;
  border: 2px solid #10b981;
  opacity: 0.8;
  animation: radarExpand 2.4s cubic-bezier(0.24, 0, 0.38, 1) infinite;
  pointer-events: none;
}

@keyframes radarExpand {
  0% { transform: scale(0.95); opacity: 0.8; }
  70% { transform: scale(1.4); opacity: 0; }
  100% { transform: scale(1.4); opacity: 0; }
}

/* ==========================================================================
   Specs Table in Modal
   ========================================================================== */

.spec-table {
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
}

.spec-table tr:nth-child(even) {
  background-color: #f8fafc;
}

.spec-table tr:hover {
  background-color: #f0fdf4;
}

.spec-table td {
  padding: 10px 14px;
  border-bottom: 1px solid #f1f5f9;
}

.spec-table tr:last-child td {
  border-bottom: none;
}

/* ==========================================================================
   Floating Fast Action Center (WhatsApp & Back-to-Top)
   ========================================================================== */

.floating-action-center {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 45;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}

.floating-whatsapp-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 18px 11px 14px;
  background: #10b981;
  color: #ffffff;
  border-radius: 9999px;
  box-shadow: 0 10px 25px -4px rgba(16, 185, 129, 0.5), 0 4px 10px -2px rgba(0, 0, 0, 0.1);
  font-weight: 700;
  font-size: 13px;
  transition: all 0.3s var(--ease-spring);
  border: 2px solid rgba(255, 255, 255, 0.4);
  animation: floatWiggle 6s ease-in-out infinite;
}

@keyframes floatWiggle {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

.floating-whatsapp-btn:hover {
  background: #059669;
  transform: translateY(-4px) scale(1.04);
  box-shadow: 0 18px 36px -4px rgba(16, 185, 129, 0.65);
}

.back-to-top-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #0b1330;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(11, 19, 48, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.15);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px) scale(0.9);
  transition: all 0.35s var(--ease-spring);
}

.back-to-top-btn.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.back-to-top-btn:hover {
  background: #10b981;
  transform: translateY(-3px) scale(1.08);
  box-shadow: 0 12px 24px rgba(16, 185, 129, 0.4);
}

/* ==========================================================================
   Infinite Marquee Logo Carousel
   ========================================================================== */

.marquee-container {
  overflow: hidden;
  user-select: none;
  display: flex;
  gap: 1.5rem;
  mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
}

.marquee-content {
  flex-shrink: 0;
  display: flex;
  justify-content: space-around;
  gap: 1.5rem;
  min-width: 100%;
  animation: scrollMarquee 28s linear infinite;
}

.marquee-container:hover .marquee-content {
  animation-play-state: paused;
}

@keyframes scrollMarquee {
  from { transform: translateX(0); }
  to { transform: translateX(calc(-100% - 1.5rem)); }
}

/* ==========================================================================
   Scroll-Reveal Entrance Animations
   ========================================================================== */

.reveal-init {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1), transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger delay helpers */
.delay-100 { transition-delay: 100ms; }
.delay-200 { transition-delay: 200ms; }
.delay-300 { transition-delay: 300ms; }
.delay-400 { transition-delay: 400ms; }
.delay-500 { transition-delay: 500ms; }

/* ==========================================================================
   Scrollbars
   ========================================================================== */

::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 999px;
  border: 2px solid #f1f5f9;
}

::-webkit-scrollbar-thumb:hover {
  background: #10b981;
}

/* ==========================================================================
   Smooth Fade-in & Pop Animations
   ========================================================================== */

@keyframes popSpring {
  0% {
    opacity: 0;
    transform: scale(0.92) translateY(12px);
  }
  70% {
    opacity: 1;
    transform: scale(1.02) translateY(-2px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.animate-pop-spring {
  animation: popSpring 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

.animate-fade-in-up {
  animation: fadeInUp 0.55s var(--ease-spring) forwards;
}
