/* GAYA TEMA UI/UX PRO MAX • e-ULANGKAJI GBK SPP */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400;1,500&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-heading: 'Outfit', system-ui, -apple-system, sans-serif;
  --primary: #0d9488;
  --primary-dark: #0f766e;
  --primary-light: #ccfbf1;
  --accent: #f59e0b;
}

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  font-family: var(--font-sans);
  background-color: #f8fafc;
  color: #0f172a; /* slate-900 for high-contrast accessible text */
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.dark body, html.dark {
  background-color: #090d16;
  color: #f1f5f9;
}

h1, h2, h3, h4, h5, h6, .font-heading {
  font-family: var(--font-heading);
  letter-spacing: -0.02em;
}

/* Glassmorphism & Surface Elevation */
.glass-surface {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(226, 232, 240, 0.9);
}

.dark .glass-surface {
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(51, 65, 85, 0.7);
}

/* Subtle Card Glow on Hover */
.card-hover-glow {
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease;
}
.card-hover-glow:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -6px rgba(13, 148, 136, 0.12), 0 4px 10px -2px rgba(0, 0, 0, 0.04);
}
.dark .card-hover-glow:hover {
  box-shadow: 0 12px 28px -6px rgba(13, 148, 136, 0.22), 0 4px 10px -2px rgba(0, 0, 0, 0.3);
}

/* 3D Flip Card Effect for Flashcards */
.perspective-1000 {
  perspective: 1200px;
}
.transform-style-3d {
  transform-style: preserve-3d;
}
.backface-hidden {
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.rotate-y-180 {
  transform: rotateY(180deg);
}
.card-inner {
  transition: transform 0.55s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.card-flipped .card-inner {
  transform: rotateY(180deg);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 9999px;
}
.dark ::-webkit-scrollbar-thumb {
  background: #334155;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Hide scrollbar for clean horizontal pill filters */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Pulse Wave for Audio Recording */
@keyframes audioWavePulse {
  0%, 100% { height: 6px; }
  50% { height: 24px; }
}
.wave-bar {
  display: inline-block;
  width: 3.5px;
  background-color: #f43f5e;
  border-radius: 9999px;
  animation: audioWavePulse 1.2s ease-in-out infinite;
}
.wave-bar:nth-child(2) { animation-delay: 0.15s; }
.wave-bar:nth-child(3) { animation-delay: 0.3s; }
.wave-bar:nth-child(4) { animation-delay: 0.45s; }
.wave-bar:nth-child(5) { animation-delay: 0.6s; }

/* Focus Rings Accessible */
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid #0d9488;
  outline-offset: 2px;
}

/* Smooth Accordion */
.accordion-content {
  transition: max-height 0.3s ease-out, opacity 0.25s ease-out;
}

/* Print Stylesheet */
@media print {
  body {
    background-color: white !important;
    color: black !important;
  }
  .no-print, header, nav, #toast, button:not(.print-allow), .interactive-bar {
    display: none !important;
  }
  main {
    margin: 0 !important;
    padding: 0 !important;
    max-width: 100% !important;
  }
  .question-card {
    break-inside: avoid;
    border: 1px solid #d1d5db !important;
    margin-bottom: 18px !important;
    box-shadow: none !important;
  }
}
