/* ==========================================================================
   EduHD Sci-Fi / Cyberpunk Futuristic Theme for Landing Page (index.php)
   Faculty of Education and Human Development, Roi Et Rajabhat University
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Chakra+Petch:wght@300;400;500;600;700&family=Orbitron:wght@400;500;600;700;800;900&family=Sarabun:wght@300;400;500;600;700&display=swap');

/* --- Root Sci-Fi Color Variables --- */
:root {
  --scifi-bg-deep: #020611;
  --scifi-bg-card: rgba(8, 17, 36, 0.72);
  --scifi-bg-card-hover: rgba(13, 27, 56, 0.85);
  
  --scifi-cyan: #00f0ff;
  --scifi-cyan-glow: rgba(0, 240, 255, 0.5);
  --scifi-cyan-soft: rgba(0, 240, 255, 0.12);
  
  --scifi-purple: #a855f7;
  --scifi-purple-glow: rgba(168, 85, 247, 0.5);
  
  --scifi-amber: #f59e0b;
  --scifi-amber-glow: rgba(245, 158, 11, 0.5);
  --scifi-amber-soft: rgba(245, 158, 11, 0.12);
  
  --scifi-emerald: #10b981;
  --scifi-emerald-glow: rgba(16, 185, 129, 0.5);
  --scifi-emerald-soft: rgba(16, 185, 129, 0.12);
  
  --scifi-crimson: #ff2d55;
  --scifi-crimson-glow: rgba(255, 45, 85, 0.5);
  --scifi-crimson-soft: rgba(255, 45, 85, 0.12);

  --scifi-text-main: #f8fafc;
  --scifi-text-muted: #94a3b8;
  --scifi-text-dim: #64748b;
  --scifi-border: rgba(0, 240, 255, 0.22);
}

/* --- Base Body Styling --- */
body.scifi-theme {
  font-family: 'Chakra Petch', 'Sarabun', sans-serif;
  background-color: var(--scifi-bg-deep);
  color: var(--scifi-text-main);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  margin: 0;
  padding: 0;
}

/* Selection */
body.scifi-theme ::selection {
  background: var(--scifi-cyan);
  color: #020611;
}

/* --- Multi-Layered Sci-Fi Background with Building Photo --- */
.scifi-bg-container {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

/* Layer 1: Building Photo with Smooth Ambient Drift */
.scifi-bg-building {
  position: absolute;
  inset: -20px;
  background-image: url('../../images/eduhd_biulding.png');
  background-size: cover;
  background-position: center 38%;
  background-repeat: no-repeat;
  filter: brightness(0.62) contrast(1.18) saturate(1.15);
  transform: scale(1.03);
  animation: bgDrift 28s ease-in-out infinite alternate;
  will-change: transform;
}

@keyframes bgDrift {
  0% { transform: scale(1.03) translate(0, 0); }
  50% { transform: scale(1.06) translate(-10px, -6px); }
  100% { transform: scale(1.04) translate(8px, -4px); }
}

/* Layer 2: Cyber Vignette & Holographic Grading */
.scifi-bg-gradient {
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(ellipse 90% 70% at 50% 18%, rgba(2, 6, 23, 0.55) 0%, rgba(2, 6, 23, 0.88) 75%, #020611 100%),
    linear-gradient(180deg, rgba(2, 6, 23, 0.72) 0%, rgba(3, 10, 28, 0.7) 50%, rgba(2, 6, 17, 0.95) 100%);
  mix-blend-mode: multiply;
}

/* Layer 3: Cyber Tech Grid Matrix */
.scifi-bg-grid {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(to right, rgba(0, 240, 255, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0, 240, 255, 0.05) 1px, transparent 1px);
  background-size: 55px 55px;
  mask-image: radial-gradient(ellipse 80% 65% at 50% 40%, black 20%, transparent 85%);
  -webkit-mask-image: radial-gradient(ellipse 80% 65% at 50% 40%, black 20%, transparent 85%);
}

/* Layer 4: Scanning Laser Beam Sweep */
.scifi-scanline {
  position: absolute;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, rgba(0, 240, 255, 0.85), var(--scifi-cyan), rgba(0, 240, 255, 0.85), transparent);
  box-shadow: 0 0 18px var(--scifi-cyan), 0 0 35px var(--scifi-cyan-glow);
  opacity: 0.65;
  top: 0;
  animation: scanlineSweep 8s linear infinite;
  pointer-events: none;
}

@keyframes scanlineSweep {
  0% { top: -10px; opacity: 0; }
  10% { opacity: 0.75; }
  90% { opacity: 0.75; }
  100% { top: 100%; opacity: 0; }
}

/* Layer 5: Interactive Particle Canvas */
#scifiCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: auto;
}

/* --- Main Layout Wrapper --- */
.scifi-main-wrapper {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* --- Top HUD Telemetry Bar --- */
.scifi-hud-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 2rem;
  background: rgba(3, 10, 25, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0, 240, 255, 0.25);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), 0 1px 0 rgba(0, 240, 255, 0.1);
  font-family: 'Orbitron', 'Chakra Petch', sans-serif;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  z-index: 100;
  position: relative;
}

.scifi-hud-bar::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 10%;
  width: 80%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--scifi-cyan), transparent);
  box-shadow: 0 0 10px var(--scifi-cyan);
}

.scifi-hud-status {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--scifi-cyan);
}

.scifi-status-pulse {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background-color: var(--scifi-cyan);
  box-shadow: 0 0 10px var(--scifi-cyan), 0 0 20px var(--scifi-cyan);
  animation: pulseDot 1.8s ease-in-out infinite;
}

@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.4); opacity: 1; box-shadow: 0 0 16px var(--scifi-cyan), 0 0 25px var(--scifi-cyan); }
}

.scifi-telemetry-tag {
  color: #e2e8f0;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.scifi-hud-center {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  color: #94a3b8;
}

.scifi-hud-time {
  font-family: 'Orbitron', monospace;
  font-weight: 700;
  color: #f8fafc;
  background: rgba(0, 240, 255, 0.08);
  border: 1px solid rgba(0, 240, 255, 0.3);
  padding: 0.2rem 0.75rem;
  border-radius: 4px;
  box-shadow: inset 0 0 8px rgba(0, 240, 255, 0.15);
}

.scifi-hud-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Sci-Fi HUD Action Buttons */
.scifi-hud-btn {
  background: rgba(8, 20, 42, 0.8);
  border: 1px solid rgba(0, 240, 255, 0.35);
  color: var(--scifi-cyan);
  font-family: 'Orbitron', sans-serif;
  font-size: 0.76rem;
  font-weight: 600;
  padding: 0.3rem 0.65rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.22s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  position: relative;
  overflow: hidden;
  text-decoration: none;
}

.scifi-hud-btn:hover {
  background: rgba(0, 240, 255, 0.2);
  border-color: var(--scifi-cyan);
  color: #ffffff;
  box-shadow: 0 0 12px var(--scifi-cyan-glow);
  transform: translateY(-1px);
}

.scifi-hud-btn:active {
  transform: translateY(1px) scale(0.97);
}

/* --- Hero Section --- */
.scifi-hero {
  text-align: center;
  padding: 3rem 1rem 1.5rem;
  position: relative;
}

/* 3D Holographic Logo */
.scifi-logo-wrapper {
  position: relative;
  display: inline-block;
  margin-bottom: 1.5rem;
}

.scifi-logo-rings {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 250px;
  height: 250px;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.scifi-ring-1 {
  position: absolute;
  inset: 0;
  border: 1.5px dashed rgba(0, 240, 255, 0.35);
  border-radius: 50%;
  animation: ringSpin 22s linear infinite;
}

.scifi-ring-2 {
  position: absolute;
  inset: 15px;
  border: 1px dotted rgba(168, 85, 247, 0.4);
  border-radius: 50%;
  animation: ringSpinRev 16s linear infinite;
}

.scifi-ring-3 {
  position: absolute;
  inset: 30px;
  border: 1px solid rgba(0, 240, 255, 0.15);
  border-radius: 50%;
}

@keyframes ringSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes ringSpinRev {
  from { transform: rotate(360deg); }
  to { transform: rotate(0deg); }
}

.scifi-hero-logo {
  width: 175px;
  height: 175px;
  object-fit: contain;
  position: relative;
  z-index: 2;
  filter: drop-shadow(0 0 25px rgba(0, 240, 255, 0.65)) drop-shadow(0 0 50px rgba(168, 85, 247, 0.3));
  animation: scifiLogoFloat 4s ease-in-out infinite;
  transition: transform 0.4s ease, filter 0.4s ease;
  cursor: pointer;
}

.scifi-hero-logo:hover {
  transform: scale(1.08) rotate(3deg);
  filter: drop-shadow(0 0 35px rgba(0, 240, 255, 0.95)) drop-shadow(0 0 65px rgba(0, 240, 255, 0.6));
}

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

/* Sci-Fi Titles */
.scifi-hero-title {
  font-family: 'Chakra Petch', 'Orbitron', sans-serif;
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  margin: 0 0 0.5rem;
  background: linear-gradient(135deg, #ffffff 15%, #00f0ff 55%, #a855f7 95%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 30px rgba(0, 240, 255, 0.45);
  position: relative;
  display: inline-block;
}

.scifi-hero-subtitle-1 {
  font-family: 'Chakra Petch', sans-serif;
  font-size: clamp(1.15rem, 2.2vw, 1.45rem);
  font-weight: 600;
  color: #f59e0b;
  letter-spacing: 0.05em;
  margin: 0 0 0.35rem;
  text-shadow: 0 0 15px rgba(245, 158, 11, 0.4);
}

.scifi-hero-subtitle-2 {
  font-family: 'Chakra Petch', sans-serif;
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  font-weight: 500;
  color: #38bdf8;
  letter-spacing: 0.06em;
  margin: 0 0 1.25rem;
  text-shadow: 0 0 12px rgba(56, 189, 248, 0.35);
}

/* Sci-Fi Divider */
.scifi-hero-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  max-width: 480px;
  margin: 0 auto;
}

.scifi-divider-line {
  flex: 1;
  height: 1.5px;
  background: linear-gradient(90deg, transparent, var(--scifi-cyan), transparent);
  box-shadow: 0 0 8px var(--scifi-cyan);
}

.scifi-divider-node {
  width: 8px;
  height: 8px;
  background: var(--scifi-cyan);
  transform: rotate(45deg);
  box-shadow: 0 0 12px var(--scifi-cyan), 0 0 20px var(--scifi-cyan);
  animation: nodeGlow 2s ease-in-out infinite alternate;
}

@keyframes nodeGlow {
  0% { transform: rotate(45deg) scale(0.9); opacity: 0.7; }
  100% { transform: rotate(45deg) scale(1.3); opacity: 1; }
}

/* --- Section Title Label --- */
.scifi-section-header {
  text-align: center;
  margin: 1.5rem 0 2.25rem;
}

.scifi-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.45rem 1.4rem;
  background: rgba(0, 240, 255, 0.06);
  border: 1px solid rgba(0, 240, 255, 0.35);
  border-radius: 999px;
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.15), inset 0 0 12px rgba(0, 240, 255, 0.08);
  font-family: 'Orbitron', 'Chakra Petch', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--scifi-cyan);
  text-transform: uppercase;
}

.scifi-badge-pill i {
  font-size: 1.05rem;
  filter: drop-shadow(0 0 6px var(--scifi-cyan));
}

/* --- Sci-Fi Portal Cards Grid --- */
.scifi-cards-section {
  flex: 1;
  padding: 0 1.5rem 3rem;
  position: relative;
  z-index: 10;
}

.scifi-cards-container {
  max-width: 1400px;
  margin: 0 auto;
}

/* Portal Card Wrapper */
.scifi-card-wrapper {
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  perspective: 1200px;
}

/* Futuristic Sci-Fi Card Base */
.scifi-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  text-decoration: none;
  background: var(--scifi-bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  padding: 2.2rem 1.6rem 1.8rem;
  flex: 1;
  overflow: hidden;
  color: var(--scifi-text-main);
  transition: transform 0.28s cubic-bezier(0.25, 1, 0.5, 1), 
              box-shadow 0.28s ease, 
              border-color 0.28s ease, 
              background 0.28s ease;
  transform-style: preserve-3d;
  cursor: pointer;
}

/* Glowing Top Laser Stripe */
.scifi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--card-neon), transparent);
  box-shadow: 0 0 12px var(--card-neon);
  opacity: 0.5;
  transition: opacity 0.3s ease, left 0.3s ease, right 0.3s ease;
}

/* Cyber Scanning Light Sheen */
.scifi-card::after {
  content: '';
  position: absolute;
  top: -120%;
  left: -60%;
  width: 220%;
  height: 220%;
  background: linear-gradient(
    135deg,
    transparent 42%,
    rgba(255, 255, 255, 0.08) 50%,
    transparent 58%
  );
  transform: rotate(25deg);
  transition: transform 0.8s ease;
  pointer-events: none;
}

/* Sci-Fi Corner Tech Brackets (SVG or Pseudo) */
.scifi-corner {
  position: absolute;
  width: 14px;
  height: 14px;
  border-color: var(--card-neon);
  border-style: solid;
  opacity: 0.5;
  transition: all 0.3s ease;
  pointer-events: none;
}
.scifi-corner-tl { top: 7px; left: 7px; border-width: 2px 0 0 2px; border-top-left-radius: 6px; }
.scifi-corner-tr { top: 7px; right: 7px; border-width: 2px 2px 0 0; border-top-right-radius: 6px; }
.scifi-corner-bl { bottom: 7px; left: 7px; border-width: 0 0 2px 2px; border-bottom-left-radius: 6px; }
.scifi-corner-br { bottom: 7px; right: 7px; border-width: 0 2px 2px 0; border-bottom-right-radius: 6px; }

/* Portal Code Badge */
.scifi-portal-badge {
  font-family: 'Orbitron', monospace;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--card-neon);
  background: var(--card-neon-soft);
  border: 1px solid var(--card-neon);
  border-radius: 4px;
  padding: 0.2rem 0.65rem;
  margin-bottom: 1.25rem;
  text-transform: uppercase;
  box-shadow: 0 0 10px var(--card-neon-soft);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

/* Holographic Icon Ring */
.scifi-icon-chamber {
  position: relative;
  width: 86px;
  height: 86px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.35rem;
}

.scifi-icon-holo-ring {
  position: absolute;
  inset: 0;
  border: 1.5px dashed var(--card-neon);
  border-radius: 50%;
  animation: ringSpin 18s linear infinite;
  opacity: 0.6;
  box-shadow: 0 0 15px var(--card-neon-soft);
  transition: opacity 0.3s ease, border-style 0.3s ease;
}

.scifi-icon-bg {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--card-neon-soft) 20%, rgba(5, 12, 28, 0.9) 100%);
  border: 1.5px solid var(--card-neon);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--card-neon);
  font-size: 1.85rem;
  box-shadow: 0 0 22px var(--card-neon-soft), inset 0 0 14px var(--card-neon-soft);
  transition: all 0.35s ease;
  position: relative;
  z-index: 2;
}

.scifi-card-title {
  font-family: 'Chakra Petch', sans-serif;
  font-size: 1.48rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.6rem;
  letter-spacing: 0.02em;
  transition: color 0.3s ease, text-shadow 0.3s ease;
}

.scifi-card-desc {
  font-family: 'Sarabun', sans-serif;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--scifi-text-muted);
  margin-bottom: 1.35rem;
  flex: 1;
}

/* Action Gate / Enter Trigger */
.scifi-card-gate {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-family: 'Orbitron', 'Chakra Petch', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--card-neon);
}

.scifi-gate-arrow {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--card-neon-soft);
  border: 1px solid var(--card-neon);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

/* --- Card Role Color Customizations --- */
/* Card 1: Student (Cyan & Violet) */
.scifi-card-student {
  --card-neon: #00f0ff;
  --card-neon-glow: rgba(0, 240, 255, 0.55);
  --card-neon-soft: rgba(0, 240, 255, 0.14);
}

/* Card 2: Mentor (Amber Solar) */
.scifi-card-mentor {
  --card-neon: #f59e0b;
  --card-neon-glow: rgba(245, 158, 11, 0.55);
  --card-neon-soft: rgba(245, 158, 11, 0.14);
}

/* Card 3: Supervisor (Matrix Emerald) */
.scifi-card-supervisor {
  --card-neon: #10b981;
  --card-neon-glow: rgba(16, 185, 129, 0.55);
  --card-neon-soft: rgba(16, 185, 129, 0.14);
}

/* Card 4: Admin (Crimson Laser) */
.scifi-card-admin {
  --card-neon: #ff2d55;
  --card-neon-glow: rgba(255, 45, 85, 0.55);
  --card-neon-soft: rgba(255, 45, 85, 0.14);
}

/* --- Card HOVER Interactions --- */
.scifi-card:hover {
  background: var(--scifi-bg-card-hover);
  border-color: var(--card-neon);
  box-shadow: 
    0 18px 45px rgba(0, 0, 0, 0.55),
    0 0 35px var(--card-neon-glow),
    inset 0 0 20px var(--card-neon-soft);
  color: #ffffff;
  transform: translateY(-8px);
}

.scifi-card:hover::before {
  left: 0;
  right: 0;
  opacity: 1;
  box-shadow: 0 0 20px var(--card-neon);
}

.scifi-card:hover::after {
  transform: rotate(25deg) translate(20%, 30%);
}

.scifi-card:hover .scifi-corner {
  opacity: 1;
  width: 18px;
  height: 18px;
  box-shadow: 0 0 8px var(--card-neon);
}

.scifi-card:hover .scifi-icon-holo-ring {
  opacity: 1;
  animation-duration: 6s;
  border-style: solid;
}

.scifi-card:hover .scifi-icon-bg {
  transform: scale(1.1);
  background: var(--card-neon);
  color: #030a1a;
  box-shadow: 0 0 30px var(--card-neon);
}

.scifi-card:hover .scifi-card-title {
  color: var(--card-neon);
  text-shadow: 0 0 15px var(--card-neon-glow);
}

.scifi-card:hover .scifi-card-desc {
  color: #e2e8f0;
}

.scifi-card:hover .scifi-gate-arrow {
  background: var(--card-neon);
  color: #020611;
  transform: translateX(4px);
  box-shadow: 0 0 15px var(--card-neon);
}

/* Card CLICK Feedback */
.scifi-card:active {
  transform: translateY(-2px) scale(0.975);
  box-shadow: 0 0 50px var(--card-neon), inset 0 0 35px var(--card-neon);
  transition-duration: 0.08s;
}

/* Manual Action Button */
.scifi-manual-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1rem;
  border-radius: 12px;
  font-family: 'Chakra Petch', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  background: rgba(8, 20, 42, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.scifi-manual-btn i {
  color: var(--card-neon);
  font-size: 0.95rem;
  transition: transform 0.25s ease;
}

.scifi-manual-btn:hover {
  background: rgba(13, 27, 56, 0.9);
  border-color: var(--card-neon);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--card-neon-soft), 0 0 12px var(--card-neon-soft);
}

.scifi-manual-btn:hover i {
  transform: scale(1.15);
  filter: drop-shadow(0 0 6px var(--card-neon));
}

.scifi-manual-btn:active {
  transform: translateY(0) scale(0.98);
}

/* --- Sci-Fi Comms Contact Bar --- */
.scifi-comms-section {
  padding: 1.5rem 1.5rem 2.5rem;
  position: relative;
  z-index: 10;
}

.scifi-comms-console {
  max-width: 1050px;
  margin: 0 auto;
  background: rgba(6, 15, 33, 0.78);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(0, 240, 255, 0.25);
  border-radius: 16px;
  padding: 1.25rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.25rem;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4), inset 0 0 15px rgba(0, 240, 255, 0.05);
  position: relative;
}

.scifi-comms-console::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 20px;
  width: 60px;
  height: 2px;
  background: var(--scifi-cyan);
  box-shadow: 0 0 10px var(--scifi-cyan);
}

.scifi-comms-title {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-family: 'Chakra Petch', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.04em;
}

.scifi-comms-title i {
  color: var(--scifi-cyan);
  font-size: 1.25rem;
  filter: drop-shadow(0 0 8px var(--scifi-cyan));
}

.scifi-comms-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.scifi-comms-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 1.1rem;
  background: rgba(0, 240, 255, 0.06);
  border: 1px solid rgba(0, 240, 255, 0.25);
  border-radius: 999px;
  font-family: 'Chakra Petch', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  color: #e2e8f0;
  text-decoration: none;
  transition: all 0.22s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.scifi-comms-pill i {
  color: var(--scifi-cyan);
}

.scifi-comms-pill:hover {
  background: rgba(0, 240, 255, 0.2);
  border-color: var(--scifi-cyan);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 0 15px var(--scifi-cyan-glow);
}

.scifi-comms-pill.static-info {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  cursor: default;
}
.scifi-comms-pill.static-info:hover {
  transform: none;
  box-shadow: none;
  border-color: rgba(255, 255, 255, 0.2);
}

/* --- Global Click Sci-Fi Shockwave & Sparks --- */
.scifi-shockwave {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  border: 2px solid var(--scifi-cyan);
  box-shadow: 0 0 15px var(--scifi-cyan), inset 0 0 12px var(--scifi-cyan-glow);
  transform: translate(-50%, -50%) scale(0);
  animation: shockwaveExpand 0.55s cubic-bezier(0.1, 0.8, 0.3, 1) forwards;
  z-index: 99999;
}

@keyframes shockwaveExpand {
  0% { transform: translate(-50%, -50%) scale(0.1); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 0; }
}

.scifi-spark {
  position: fixed;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--scifi-cyan);
  box-shadow: 0 0 8px var(--scifi-cyan), 0 0 15px #ffffff;
  pointer-events: none;
  z-index: 99998;
  animation: sparkFade 0.6s ease-out forwards;
}

@keyframes sparkFade {
  0% { transform: translate(0, 0) scale(1); opacity: 1; }
  100% { transform: translate(var(--tx), var(--ty)) scale(0); opacity: 0; }
}

/* --- Sci-Fi Footer Adaptations --- */
.scifi-theme .site-global-footer {
  border-top: 1px solid rgba(0, 240, 255, 0.15) !important;
  background: rgba(2, 6, 17, 0.65) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  position: relative;
  z-index: 10;
  margin-top: 2rem !important;
}

.scifi-theme .footer-copyright-text {
  color: #94a3b8 !important;
  font-family: 'Chakra Petch', sans-serif !important;
}

.scifi-theme .footer-system-info {
  color: #64748b !important;
}

.scifi-theme .footer-system-info .system-title {
  color: #cbd5e1 !important;
}

.scifi-theme .footer-nav-btn,
.scifi-theme .footer-nav-link {
  background: rgba(8, 20, 42, 0.8) !important;
  border: 1px solid rgba(0, 240, 255, 0.25) !important;
  color: #e2e8f0 !important;
  font-family: 'Chakra Petch', sans-serif !important;
}

.scifi-theme .footer-nav-btn:hover,
.scifi-theme .footer-nav-link:hover {
  background: rgba(0, 240, 255, 0.18) !important;
  border-color: var(--scifi-cyan) !important;
  color: #ffffff !important;
  box-shadow: 0 0 16px var(--scifi-cyan-glow) !important;
}

.scifi-theme .dev-by-badge {
  background: rgba(0, 240, 255, 0.08) !important;
  color: var(--scifi-cyan) !important;
  border: 1px solid rgba(0, 240, 255, 0.3) !important;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.1) !important;
}

.scifi-theme .dev-by-badge:hover {
  background: rgba(0, 240, 255, 0.2) !important;
  color: #ffffff !important;
  box-shadow: 0 0 16px var(--scifi-cyan-glow) !important;
}

/* --- Responsive Adjustments --- */
@media (max-width: 991px) {
  .scifi-hud-bar {
    padding: 0.65rem 1rem;
    flex-wrap: wrap;
    gap: 0.75rem;
  }
  .scifi-hud-center {
    order: 3;
    width: 100%;
    justify-content: center;
  }
  .scifi-comms-console {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 576px) {
  .scifi-hero {
    padding-top: 1.5rem;
  }
  .scifi-hero-logo {
    width: 130px;
    height: 130px;
  }
  .scifi-logo-rings {
    width: 190px;
    height: 190px;
  }
  .scifi-card {
    padding: 1.75rem 1.25rem 1.5rem;
  }
}

/* --- Sci-Fi Landing Page PDPA Modal & Stacking Context Fix --- */
.modal-backdrop {
  z-index: 99990 !important;
}

.modal,
#globalPdpaModal {
  z-index: 100000 !important;
}

/* Modal Content: High-contrast, clean official PDPA reading experience with cyber-accent glow */
#globalPdpaModal .modal-dialog {
  max-width: 980px;
  margin: 1.75rem auto;
}

#globalPdpaModal .modal-content {
  background: #ffffff !important;
  color: #0f172a !important;
  border: 2px solid rgba(0, 240, 255, 0.75) !important;
  border-radius: 24px !important;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.75), 0 0 35px rgba(0, 240, 255, 0.35) !important;
  overflow: hidden;
}

#globalPdpaModal .modal-header {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(0, 240, 255, 0.12)) !important;
  border-bottom: 1px solid rgba(0, 240, 255, 0.25) !important;
  padding: 1.25rem 1.75rem !important;
}

#globalPdpaModal .modal-title {
  color: #1e40af !important;
  font-family: 'Chakra Petch', 'Sarabun', sans-serif !important;
  font-weight: 700 !important;
  font-size: 1.2rem !important;
  letter-spacing: 0.2px;
}

#globalPdpaModal .modal-title i {
  color: #2563eb !important;
}

#globalPdpaModal .btn-close {
  filter: none !important;
  opacity: 0.65;
  transition: all 0.2s ease;
}

#globalPdpaModal .btn-close:hover {
  opacity: 1;
  transform: rotate(90deg);
}

#globalPdpaModal .modal-body {
  background: #ffffff !important;
  color: #1e293b !important;
  font-family: 'Sarabun', sans-serif !important;
  padding: 1.75rem 2rem !important;
}

#globalPdpaModal .modal-body::-webkit-scrollbar {
  width: 8px;
}

#globalPdpaModal .modal-body::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 4px;
}

#globalPdpaModal .modal-body::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

#globalPdpaModal .modal-body::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

#globalPdpaModal .modal-body h4 {
  color: #0f172a !important;
  font-family: 'Chakra Petch', 'Sarabun', sans-serif !important;
  font-weight: 700 !important;
  font-size: 1.3rem !important;
}

#globalPdpaModal .modal-body p {
  color: #334155 !important;
  line-height: 1.75 !important;
}

#globalPdpaModal .modal-body strong {
  color: #0f172a !important;
  font-weight: 700 !important;
}

#globalPdpaModal .modal-body .text-muted {
  color: #475569 !important;
}

#globalPdpaModal .modal-body .row .rounded-4 {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#globalPdpaModal .modal-body .row .rounded-4:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08) !important;
}

#globalPdpaModal .modal-footer {
  background: #f8fafc !important;
  border-top: 1px solid #e2e8f0 !important;
  padding: 1.15rem 1.75rem !important;
}

#globalPdpaModal .modal-footer .btn-primary {
  background: linear-gradient(135deg, #2563eb, #1d4ed8) !important;
  border: none !important;
  padding: 0.65rem 2rem !important;
  border-radius: 999px !important;
  font-weight: 600 !important;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35) !important;
  transition: all 0.2s ease !important;
}

#globalPdpaModal .modal-footer .btn-primary:hover {
  background: linear-gradient(135deg, #1d4ed8, #1e40af) !important;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.45) !important;
}


