/* Style Kustom Situs Pembelajaran Interaktif IPA - SRT 11 Rokan Hilir */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Lexend:wght@400;500;600;700&display=swap');

:root {
  --primary: #0284c7;
  --primary-dark: #0369a1;
  --secondary: #0d9488;
  --accent: #f59e0b;
  --oxygen: #38bdf8;
  --carbondioxide: #f43f5e;
  --success: #10b981;
  --warning: #f59e0b;
  --bg-gradient: linear-gradient(135deg, #f0fdf4 0%, #e0f2fe 50%, #f8fafc 100%);
  --panel-bg: rgba(255, 255, 255, 0.92);
  --panel-border: rgba(226, 232, 240, 0.9);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg-gradient);
  min-height: 100vh;
  color: #1e293b;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

h1, h2, h3, h4, .font-heading {
  font-family: 'Lexend', 'Plus Jakarta Sans', sans-serif;
}

/* Glass Card */
.glass-card {
  background: var(--panel-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--panel-border);
  border-radius: 1.25rem;
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.06), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
  box-shadow: 0 20px 30px -10px rgba(15, 23, 42, 0.1);
}

/* IFP Touch Optimized Button */
.touch-btn {
  touch-action: manipulation;
  user-select: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.touch-btn:active {
  transform: scale(0.97);
}

/* Hotspot Pins on Anatomy Image */
.hotspot-container {
  position: relative;
  display: inline-block;
  max-width: 100%;
}

.hotspot-pin {
  position: absolute;
  width: 32px;
  height: 32px;
  margin-left: -16px;
  margin-top: -16px;
  border-radius: 50%;
  background: #0284c7;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.4), 0 4px 10px rgba(0, 0, 0, 0.25);
  animation: pulsePin 2.2s infinite;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.2s;
  z-index: 20;
}

.hotspot-pin:hover, .hotspot-pin.active {
  transform: scale(1.28);
  background: #f43f5e;
  box-shadow: 0 0 0 6px rgba(244, 63, 94, 0.45), 0 6px 14px rgba(0, 0, 0, 0.3);
  z-index: 30;
}

@keyframes pulsePin {
  0% {
    box-shadow: 0 0 0 0 rgba(2, 132, 199, 0.7);
  }
  70% {
    box-shadow: 0 0 0 12px rgba(2, 132, 199, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(2, 132, 199, 0);
  }
}

/* Respiratory Breath Canvas Simulator */
#breathCanvas {
  background: radial-gradient(circle at center, #0f172a 0%, #020617 100%);
  border-radius: 1.25rem;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* Drag and Drop We Do Styles */
.drag-item {
  cursor: grab;
  user-select: none;
  transition: all 0.2s ease;
  touch-action: none;
}

.drag-item:active {
  cursor: grabbing;
}

.drag-item.dragging {
  opacity: 0.5;
  transform: scale(1.05);
}

.drop-slot {
  min-height: 64px;
  border: 2px dashed #94a3b8;
  border-radius: 1rem;
  background: rgba(241, 245, 249, 0.7);
  transition: all 0.2s ease;
}

.drop-slot.drag-over {
  border-color: #0284c7;
  background: rgba(224, 242, 254, 0.85);
  transform: scale(1.02);
}

.drop-slot.filled-correct {
  border-color: #10b981;
  background: rgba(209, 250, 229, 0.9);
  border-style: solid;
}

.drop-slot.filled-wrong {
  border-color: #ef4444;
  background: rgba(254, 226, 226, 0.9);
  animation: shake 0.4s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

/* Matching Card Flip */
.match-card {
  perspective: 1000px;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.match-card:hover {
  transform: translateY(-3px);
}

.match-card.selected {
  outline: 3px solid #0284c7;
  box-shadow: 0 0 15px rgba(2, 132, 199, 0.4);
}

.match-card.matched {
  outline: 3px solid #10b981;
  background: #ecfdf5;
  opacity: 0.75;
  pointer-events: none;
}

/* Quiz Option */
.quiz-opt {
  transition: all 0.2s ease;
}

.quiz-opt:hover:not(.disabled) {
  border-color: #0284c7;
  background-color: #f0f9ff;
  transform: translateX(4px);
}

.quiz-opt.correct {
  background-color: #d1fae5 !important;
  border-color: #10b981 !important;
  color: #065f46 !important;
}

.quiz-opt.wrong {
  background-color: #fee2e2 !important;
  border-color: #ef4444 !important;
  color: #991b1b !important;
}

/* Confetti Canvas overlay */
#confettiCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 9999;
}

/* Print styles for digital LKPD */
@media print {
  body {
    background: white !important;
    color: black !important;
  }
  .no-print, header, nav, footer, #confettiCanvas, .tab-nav {
    display: none !important;
  }
  .print-only {
    display: block !important;
  }
  .glass-card {
    border: 1px solid #ccc !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    background: white !important;
    page-break-inside: avoid;
  }
}
