/* ==========================================================================
   GLOBAL CUSTOM STYLES & GLASSMORPHISM - TECHLEARN INDONESIA
   ========================================================================== */

/* Import Google Font */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;700;900&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Fira+Code:wght@400;500;700&display=swap');

/* Base Styles */
body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-primary);
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
  background-image: 
    linear-gradient(var(--bg-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--bg-grid) 1px, transparent 1px);
  background-size: 40px 40px;
}

.font-tech {
  font-family: 'Orbitron', sans-serif;
}

.font-code {
  font-family: 'Fira Code', monospace;
}

/* Glassmorphism Styles */
.glass-panel {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--card-border);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-panel-hover:hover {
  border-color: var(--card-border-hover);
  box-shadow: var(--shadow-neon);
  transform: translateY(-4px);
}

/* Glowing Neon Text & Shadows */
.text-neon-cyan {
  color: var(--accent-cyan);
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.5);
}

.text-neon-blue {
  color: var(--accent-blue);
  text-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}

.btn-neon {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
  border: 1px solid transparent;
  color: #08090d !important;
}

.btn-neon:hover {
  box-shadow: 0 0 20px var(--accent-glow);
  transform: scale(1.03);
}

.btn-neon-outline {
  background: transparent;
  border: 2px solid var(--accent-cyan);
  color: var(--accent-cyan);
  transition: all 0.3s ease;
}

.btn-neon-outline:hover {
  background: var(--accent-cyan);
  color: #08090d;
  box-shadow: 0 0 15px var(--accent-glow);
  transform: scale(1.03);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--scrollbar-bg);
}

::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-cyan);
}

/* Sticky Navbar and Animations */
.sticky-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  transition: all 0.3s ease;
}

.sticky-nav-active {
  background: var(--navbar-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--card-border);
}

/* Loading Boot Terminal Screen */
#loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: #050608;
  z-index: 100;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  font-family: 'Fira Code', monospace;
  color: var(--accent-cyan);
}

.terminal-loader {
  width: 320px;
  padding: 20px;
  border-radius: 8px;
  background: rgba(10, 11, 16, 0.9);
  border: 1px solid var(--terminal-border);
  box-shadow: var(--shadow-neon);
}

/* Code Editor Previewer RPL */
.code-editor-header {
  background: rgba(15, 23, 42, 0.9);
  border-bottom: 1px solid var(--card-border);
}

.code-editor-body {
  background: #0f172a;
  color: #e2e8f0;
}

/* Scroll To Top Button */
#scroll-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 40;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

#scroll-to-top.show {
  opacity: 1;
  visibility: visible;
}

/* Progress bar inside reader */
.progress-ring-circle {
  transition: stroke-dashoffset 0.35s;
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
}

/* Custom Checkbox glowing */
.glow-checkbox:checked {
  background-color: var(--accent-cyan);
  box-shadow: 0 0 10px var(--accent-cyan);
  border-color: var(--accent-cyan);
}

/* Pulsing Cyber Dot */
.cyber-dot {
  width: 10px;
  height: 10px;
  background-color: var(--accent-cyan);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent-cyan);
  display: inline-block;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(0.9);
    opacity: 0.7;
  }
  50% {
    transform: scale(1.1);
    opacity: 1;
    box-shadow: 0 0 15px var(--accent-cyan);
  }
  100% {
    transform: scale(0.9);
    opacity: 0.7;
  }
}

/* Global Floating Search Overlay */
#search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 9, 13, 0.9);
  backdrop-filter: blur(12px);
  z-index: 60;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
}

#search-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* Smooth Scrolling */
html {
  scroll-behavior: smooth;
}

/* Responsive sidebar control */
@media (max-width: 1024px) {
  .sidebar-hidden {
    transform: translateX(-100%);
  }
}
