/* SIMU-DARURAT Custom Styles (Optimized for Desktop & Mobile Smartphones) */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=JetBrains+Mono:wght@500;700&display=swap');

:root {
  --primary-navy: #0B192C;
  --secondary-navy: #1E3E62;
  --accent-orange: #FF6500;
  --accent-red: #E63946;
  --accent-gold: #F4A261;
  --accent-teal: #2A9D8F;
}

* {
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: #070f1e;
  color: #f1f5f9;
  padding-bottom: env(safe-area-inset-bottom, 20px);
}

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

/* Glassmorphism Panels */
.glass-panel {
  background: rgba(15, 23, 42, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.glass-panel-glow {
  background: rgba(22, 36, 61, 0.88);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 101, 0, 0.3);
  box-shadow: 0 0 25px rgba(255, 101, 0, 0.12);
}

/* Emergency Beacon Pulsing Strobe */
@keyframes beacon-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(230, 57, 70, 0.7);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 20px 10px rgba(230, 57, 70, 0.3);
    transform: scale(1.03);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(230, 57, 70, 0);
    transform: scale(1);
  }
}

.beacon-active {
  animation: beacon-pulse 1.2s infinite ease-in-out;
}

.maritime-bg-pattern {
  background-image: radial-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 0);
  background-size: 24px 24px;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #070f1e;
}
::-webkit-scrollbar-thumb {
  background: #1e293b;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #FF6500;
}

/* Simulation Canvas Container */
#fireCanvas, #mobCanvas {
  touch-action: none;
  border-radius: 12px;
  max-width: 100%;
}

/* Earthquake Shake Animation */
@keyframes earthquake-shake {
  0% { transform: translate(1px, 1px) rotate(0deg); }
  10% { transform: translate(-1px, -2px) rotate(-1deg); }
  20% { transform: translate(-3px, 0px) rotate(1deg); }
  30% { transform: translate(3px, 2px) rotate(0deg); }
  40% { transform: translate(1px, -1px) rotate(1deg); }
  50% { transform: translate(-1px, 2px) rotate(-1deg); }
  60% { transform: translate(-3px, 1px) rotate(0deg); }
  70% { transform: translate(3px, 1px) rotate(-1deg); }
  80% { transform: translate(-1px, -1px) rotate(1deg); }
  90% { transform: translate(1px, 2px) rotate(0deg); }
  100% { transform: translate(1px, -2px) rotate(-1deg); }
}

.shake-effect {
  animation: earthquake-shake 0.35s infinite;
}

/* Mobile-Friendly Adjustments */
@media (max-width: 640px) {
  body {
    padding-bottom: 74px; /* Space for mobile bottom bar */
  }

  /* Compact header on mobile */
  .mobile-compact-title {
    font-size: 1rem !important;
  }

  /* Make certificates readable on smaller screens */
  #certificateContent {
    padding: 1.25rem !important;
    border-width: 5px !important;
  }
}

/* Certificate Styles for Printing */
@media print {
  body * {
    visibility: hidden;
  }
  #certificateModal, #certificateContent, #certificateContent * {
    visibility: visible;
  }
  #certificateModal {
    position: fixed;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background: white !important;
    display: flex !important;
    justify-content: center;
    align-items: center;
    margin: 0;
    padding: 0;
  }
  #certificateContent {
    border: 8px double #1E3E62 !important;
    box-shadow: none !important;
    color: #111827 !important;
    max-width: 95% !important;
    width: 900px !important;
  }
  .no-print {
    display: none !important;
  }
}
