/* ==========================================================================
   InstalinAja Portal - Futuristic Cyber-Gateway Theme
   Distinct visual identity: Deep Void, Space Grotesk, HUD Specs & Ambient Light
   ========================================================================== */

/* Custom High-Tech Scrollbar */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

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

.dark ::-webkit-scrollbar-track {
  background: #050608;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 9999px;
}

.dark ::-webkit-scrollbar-thumb {
  background: #1e2436;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.dark ::-webkit-scrollbar-thumb:hover {
  background: #2b334c;
}

/* Background Cyber Grid */
.cyber-grid {
  background-image: radial-gradient(rgba(0, 0, 0, 0.06) 1px, transparent 1px);
  background-size: 24px 24px;
}

.dark .cyber-grid {
  background-image: radial-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  background-size: 24px 24px;
}

/* Glass Header */
.glass-header {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.dark .glass-header {
  background: rgba(5, 6, 8, 0.8);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

/* Futuristic Portal Gateway Card */
.portal-card {
  position: relative;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.28s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.25s ease;
  will-change: transform;
}

/* 1px inner refraction rim */
.portal-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.04);
}

.portal-card:hover {
  transform: translateY(-6px);
}

/* Portal Specific Hover Glows */
.portal-software {
  border-color: rgba(2, 132, 199, 0.2);
}
.portal-software:hover {
  border-color: rgba(56, 189, 248, 0.6);
  box-shadow: 0 25px 45px -15px rgba(2, 132, 199, 0.25),
              0 0 20px -5px rgba(56, 189, 248, 0.15);
}

.portal-games {
  border-color: rgba(16, 185, 129, 0.2);
}
.portal-games:hover {
  border-color: rgba(52, 211, 153, 0.6);
  box-shadow: 0 25px 45px -15px rgba(16, 185, 129, 0.25),
              0 0 20px -5px rgba(52, 211, 153, 0.15);
}

.portal-pilem {
  border-color: rgba(244, 63, 94, 0.2);
}
.portal-pilem:hover {
  border-color: rgba(251, 113, 133, 0.6);
  box-shadow: 0 25px 45px -15px rgba(244, 63, 94, 0.25),
              0 0 20px -5px rgba(251, 113, 133, 0.15);
}

/* Tactile push */
button:active,
a:active {
  transform: scale(0.985);
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .portal-card:hover {
    transform: none;
  }
}
