/* ==========================================================================
   BIOSIGNAL NEXUS™ - PREMIUM INSTITUTIONAL DESIGN SYSTEM
   Cinematic Hero Finish & Ultra-Premium Glassmorphism
   ========================================================================== */

:root {
  --bg-dark: #050505;
  --bg-card: rgba(18, 22, 28, 0.65);
  --border-color: rgba(255, 255, 255, 0.06);
  --text-main: #E5E7EB;
  --text-white: #FFFFFF;
  --text-muted: #9CA3AF;
  --accent-gold: #D4AF37;
  --accent-gold-glow: rgba(212, 175, 55, 0.25);
  --font-sans: "Outfit", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-serif: "Playfair Display", Georgia, serif;
}

/* Global Selection & Kintsugi Indicator */
::selection {
  background-color: var(--accent-gold);
  color: #000000;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(to right, transparent, var(--accent-gold), transparent);
  z-index: 10000;
  opacity: 0.9;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.7;
  overflow-x: hidden;
}

/* Sticky Glassmorphic Header Navigation */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: rgba(5, 5, 5, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 6%;
  z-index: 1000;
  transition: all 0.3s ease;
}

header .logo {
  font-family: var(--font-sans);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--text-white);
  text-decoration: none;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 10px;
}

header .logo img {
  border: 1px solid rgba(212, 175, 55, 0.4);
  box-shadow: 0 0 10px var(--accent-gold-glow);
}

header nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

header nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.25s ease;
}

header nav a:hover {
  color: var(--accent-gold);
  text-shadow: 0 0 8px var(--accent-gold-glow);
}

/* Premium Typography Finish */
h1, h2, h3 {
  font-family: var(--font-serif);
  color: var(--text-white);
  font-weight: 700;
  letter-spacing: 0.5px;
}

/* Stunning Glassmorphic Cards */
.module-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  margin-bottom: 32px;
  overflow: hidden;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.8);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.module-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
}

.module-card:hover {
  border-color: rgba(212, 175, 55, 0.25);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.9), 0 0 20px var(--accent-gold-glow);
}

.module-header {
  padding: 24px 32px;
  background: rgba(255, 255, 255, 0.01);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.module-header h2 {
  font-size: 1.4rem;
  margin: 0;
}

.module-content {
  padding: 32px;
}

/* Interactive Buttons */
.btn {
  padding: 12px 28px;
  border-radius: 4px;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  text-transform: uppercase;
  letter-spacing: 1px;
  text-align: center;
  text-decoration: none;
  display: inline-block;
}

.btn-primary {
  background: var(--accent-gold);
  color: #000000;
  border: 1px solid var(--accent-gold);
  box-shadow: 0 4px 15px var(--accent-gold-glow);
}

.btn-primary:hover {
  background: #FFFFFF;
  border-color: #FFFFFF;
  color: #000000;
  box-shadow: 0 4px 20px rgba(255, 255, 255, 0.3);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.03);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
  border-color: var(--accent-gold);
  color: var(--accent-gold);
  background: rgba(212, 175, 55, 0.05);
}

/* Beautiful Interactive Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 24px;
}

th, td {
  padding: 16px 20px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  font-weight: 700;
}

td {
  font-size: 0.9rem;
  color: #E5E7EB;
}

tr {
  transition: background-color 0.2s ease;
}

tr:hover td {
  background-color: rgba(255, 255, 255, 0.02);
  color: #FFFFFF;
}

/* Dynamic locked layout */
.locked-overlay {
  padding: 60px 40px;
  background: rgba(10, 10, 10, 0.85);
  border-radius: 8px;
  border: 1px dashed rgba(212, 175, 55, 0.2);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

.locked-title {
  font-size: 1.3rem;
  color: #FFFFFF;
  font-weight: 700;
  margin-bottom: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

/* Micro-animations */
.pulse {
  display: inline-block;
  width: 10px;
  height: 10px;
  background-color: #10b981;
  border-radius: 50%;
  margin-right: 8px;
  box-shadow: 0 0 10px #10b981, 0 0 20px #10b981;
  animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

/* Universal footer */
footer {
  border-top: 1px solid var(--border-color);
  padding: 64px 0;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 120px;
  background: rgba(5, 5, 5, 0.5);
  backdrop-filter: blur(12px);
}

/* Responsive Overrides */
@media (max-width: 768px) {
  header {
    height: auto;
    padding: 20px 4%;
    flex-direction: column;
    gap: 16px;
    position: absolute;
  }

  header nav {
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
  }

  body {
    padding-top: 160px;
  }

  .container {
    padding: 30px 4% !important;
  }

  table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}
