/* ===================================================================
   MagFlux Electronics - Custom Stylesheet
   Corporate Modern Industrial Aesthetic
   =================================================================== */

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

:root {
  --primary-navy: #0A1128;
  --navy-dark: #001F54;
  --navy-card: #0F1D38;
  --accent-cyan: #00B4D8;
  --accent-blue: #0077B6;
  --accent-glow: rgba(0, 180, 216, 0.35);
  --accent-green: #10B981;
  --surface-light: #F8FAFC;
  --border-slate: #E2E8F0;
  --text-dark: #0F172A;
  --text-muted: #64748B;
}

html {
  scroll-behavior: smooth;
  font-family: 'Inter', 'Noto Sans TC', sans-serif;
}

body {
  color: #334155;
  background-color: #F8FAFC;
  overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 9px;
}
::-webkit-scrollbar-track {
  background: #0A1128;
}
::-webkit-scrollbar-thumb {
  background: #1E293B;
  border-radius: 5px;
  border: 2px solid #0A1128;
}
::-webkit-scrollbar-thumb:hover {
  background: #0077B6;
}

/* Magnetic Flux Grid Background Pattern */
.bg-flux-pattern {
  background-color: #0A1128;
  background-image: 
    radial-gradient(rgba(0, 180, 216, 0.15) 1px, transparent 1px),
    linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 32px 32px, 64px 64px, 64px 64px;
}

.bg-circuit-light {
  background-color: #F8FAFC;
  background-image: radial-gradient(rgba(0, 119, 182, 0.06) 1.5px, transparent 1.5px);
  background-size: 24px 24px;
}

/* Glassmorphism Navbar */
.nav-glass {
  background: rgba(10, 17, 40, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* Glowing Elements */
.glow-cyan {
  box-shadow: 0 0 25px rgba(0, 180, 216, 0.35);
}

.glow-blue {
  box-shadow: 0 0 30px rgba(0, 119, 182, 0.25);
}

/* Subtle Gradient Text */
.text-gradient-cyan {
  background: linear-gradient(135deg, #00B4D8 0%, #90E0EF 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gradient-primary {
  background: linear-gradient(135deg, #0F172A 0%, #0077B6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Card Hover Lift & Border Shimmer */
.card-modern {
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid #E2E8F0;
}
.card-modern:hover {
  transform: translateY(-6px);
  border-color: #93C5FD;
  box-shadow: 0 16px 36px -10px rgba(0, 119, 182, 0.15), 0 4px 12px -2px rgba(0, 0, 0, 0.04);
}

.card-dark-modern {
  background: #0F1D38;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.card-dark-modern:hover {
  transform: translateY(-6px);
  border-color: rgba(0, 180, 216, 0.4);
  box-shadow: 0 20px 40px -10px rgba(0, 180, 216, 0.2);
}

/* Product Image Frame */
.product-frame {
  background: linear-gradient(145deg, #FFFFFF, #F1F5F9);
  border: 1px solid #E2E8F0;
  transition: all 0.3s ease;
}
.card-modern:hover .product-frame {
  background: linear-gradient(145deg, #F8FAFC, #E0F2FE);
  border-color: #BAE6FD;
}
.card-modern:hover .product-img {
  transform: scale(1.08);
}

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

/* Animated Pulse Dot */
@keyframes pulse-ring {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 0.2; }
  100% { transform: scale(0.95); opacity: 0.8; }
}
.pulse-indicator {
  animation: pulse-ring 2.4s infinite cubic-bezier(0.455, 0.03, 0.515, 0.955);
}

/* Modal Transitions */
.modal-overlay {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  transform: scale(0.95) translateY(20px);
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}
.modal-overlay.active .modal-content {
  transform: scale(1) translateY(0);
  opacity: 1;
}

/* Floating Badges */
.badge-tech {
  background: rgba(0, 180, 216, 0.12);
  color: #0284C7;
  border: 1px solid rgba(0, 180, 216, 0.25);
}

/* Interactive Tabs */
.tab-btn.active {
  background-color: #0077B6;
  color: #FFFFFF;
  border-color: #0077B6;
  box-shadow: 0 4px 14px rgba(0, 119, 182, 0.3);
}

/* Toast Notification */
#toast {
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
#toast.show {
  transform: translateY(0);
  opacity: 1;
}
