/* 
  Stay Healthy Custom Stylesheet
  Dibuat dengan gaya sporty, neon-accent, dan premium glassmorphic
*/

:root {
  --neon-green: #CCFF00;
  --neon-green-glow: rgba(204, 255, 0, 0.4);
  --neon-orange: #FF6B00;
  --neon-orange-glow: rgba(255, 107, 0, 0.4);
  --bg-dark: #090E17;
  --bg-dark-card: rgba(15, 23, 42, 0.55);
}

body {
  background-color: var(--bg-dark);
  font-family: 'Outfit', sans-serif;
  color: #F8FAFC;
  overflow-x: hidden;
}

/* Glassmorphism Styles (iOS 26 Liquid Glass) */
.glass-panel {
  background: var(--bg-dark-card);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

.glass-modal {
  background: rgba(17, 24, 39, 0.85);
  backdrop-filter: blur(25px) saturate(220%);
  -webkit-backdrop-filter: blur(25px) saturate(220%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
}

.glass-input {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-input:focus {
  border-color: var(--neon-green);
  box-shadow: 0 0 10px rgba(204, 255, 0, 0.3);
  outline: none;
  background: rgba(15, 23, 42, 0.8);
}

/* Neon Glow Utilities */
.glow-green {
  box-shadow: 0 0 15px var(--neon-green-glow);
}

.glow-orange {
  box-shadow: 0 0 15px var(--neon-orange-glow);
}

.text-glow-green {
  text-shadow: 0 0 8px rgba(204, 255, 0, 0.6);
}

.border-glow-green:focus-within {
  border-color: var(--neon-green);
  box-shadow: 0 0 12px rgba(204, 255, 0, 0.25);
}

/* Liquid Gauge Progress Bar */
.liquid-gauge-container {
  position: relative;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  padding: 6px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.02) 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 4px 10px rgba(0, 0, 0, 0.5), 0 10px 25px rgba(0, 0, 0, 0.4);
}

.liquid-gauge {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #0f1624;
  overflow: hidden;
}

.liquid-gauge .wave {
  position: absolute;
  width: 220%;
  height: 220%;
  background: linear-gradient(180deg, var(--neon-green) 0%, #8EB300 100%);
  border-radius: 38%;
  left: -60%;
  /* 
    Top control: 
    100% = empty, 0% = full.
    Akan diubah secara dinamis melalui JS menggunakan inline variable --wave-top
  */
  top: var(--wave-top, 100%);
  transition: top 1.5s cubic-bezier(0.4, 0, 0.2, 1);
  animation: rotate-wave 12s linear infinite;
  opacity: 0.85;
  z-index: 1;
}

.liquid-gauge .wave-back {
  position: absolute;
  width: 220%;
  height: 220%;
  background: linear-gradient(180deg, rgba(204, 255, 0, 0.5) 0%, rgba(142, 179, 0, 0.4) 100%);
  border-radius: 35%;
  left: -60%;
  top: calc(var(--wave-top, 100%) - 6px);
  transition: top 1.5s cubic-bezier(0.4, 0, 0.2, 1);
  animation: rotate-wave-reverse 9s linear infinite;
  opacity: 0.45;
  z-index: 0;
}

@keyframes rotate-wave {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes rotate-wave-reverse {
  0% { transform: rotate(360deg); }
  100% { transform: rotate(0deg); }
}

.gauge-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10;
  pointer-events: none;
}

/* Skeleton Loading Animation */
@keyframes skeleton-shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.skeleton {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.05) 25%, rgba(255, 255, 255, 0.12) 37%, rgba(255, 255, 255, 0.05) 63%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s infinite;
  border-radius: 8px;
}

/* Custom Scrollbar for list history */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.3);
}

::-webkit-scrollbar-thumb {
  background: rgba(204, 255, 0, 0.2);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(204, 255, 0, 0.4);
}

/* Modern Tab Transitions */
.tab-content {
  display: none;
  opacity: 0;
  transform: translateY(12px);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.tab-content.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* Pulse Glow Animation */
@keyframes pulse-glow {
  0%, 100% { transform: scale(1); box-shadow: 0 0 15px rgba(204, 255, 0, 0.3); }
  50% { transform: scale(1.02); box-shadow: 0 0 25px rgba(204, 255, 0, 0.6); }
}

.btn-scan-pulse {
  animation: pulse-glow 3s infinite ease-in-out;
}

/* CSS fallback dialog backdrop */
dialog::backdrop {
  background-color: rgba(9, 14, 23, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* PREMIUM TOAST NOTIFICATION STYLING */
.toast-item {
  background: rgba(17, 24, 39, 0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  animation: toast-in 0.35s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  pointer-events: auto;
}

.toast-item.toast-removing {
  animation: toast-out 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes toast-out {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(15px) scale(0.95);
  }
}

/* Shimmer Screen Loading Animation */
.shimmer {
  position: relative;
  overflow: hidden;
  background-color: rgba(255, 255, 255, 0.04);
}

.shimmer::after {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  transform: translateX(-100%);
  background-image: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.05) 20%,
    rgba(255, 255, 255, 0.12) 60%,
    rgba(255, 255, 255, 0) 100%
  );
  animation: shimmer-anim 1.6s infinite;
  content: '';
}

@keyframes shimmer-anim {
  100% {
    transform: translateX(100%);
  }
}
