/* ============================================================================
 * VeneCheck ID - Custom Styles
 * ============================================================================
 * Mobile-first design system with maroon theme (#7a0a26)
 * Based on Plus Jakarta Sans typography
 * ============================================================================
 */

/* ===== Reset & Base ===== */
* { -webkit-tap-highlight-color: transparent; }
  body { font-family: 'Plus Jakarta Sans', sans-serif; background: #faf8f7; color: #1c1917; overscroll-behavior: none; -webkit-font-smoothing: antialiased; }
  .bg-maroon { background-color: #7a0a26; }
  .bg-maroon-dark { background-color: #4a0014; }
  .bg-maroon-50 { background-color: #fdf2f4; }
  .bg-maroon-100 { background-color: #fae5ea; }
  .bg-maroon-200 { background-color: #f5ccd5; }
  .text-maroon { color: #7a0a26; }
  .text-maroon-dark { color: #4a0014; }
  .border-maroon { border-color: #7a0a26; }
  .border-maroon-200 { border-color: #f5ccd5; }
  .ring-maroon { --tw-ring-color: #7a0a26; }
  .gradient-maroon { background: linear-gradient(135deg, #9c0a32 0%, #5c0719 100%); }
  .gradient-maroon-soft { background: linear-gradient(135deg, #fdf2f4 0%, #fae5ea 100%); }
  .fade-in { animation: fadeIn 0.4s ease-out; }
  @keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
  .slide-up { animation: slideUp 0.35s ease-out; }
  @keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
  .scale-in { animation: scaleIn 0.3s ease-out; }
  @keyframes scaleIn { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }
  .pulse-dot { animation: pulse 2s infinite; }
  @keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
  ::-webkit-scrollbar { width: 0; display: none; }
  button { touch-action: manipulation; }
  .safe-bottom { padding-bottom: env(safe-area-inset-bottom, 0); }
  .card { background: white; border-radius: 20px; box-shadow: 0 1px 3px rgba(0,0,0,0.04); transition: all 0.2s; }
  .check-circle { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #d6d3d1; display: flex; align-items: center; justify-content: center; transition: all 0.2s; }
  .check-circle.checked { border-color: #7a0a26; background: #7a0a26; }
  .check-circle.checked::after { content: ''; width: 6px; height: 6px; background: white; border-radius: 50%; }
  .app-container { max-width: 480px; margin: 0 auto; min-height: 100vh; background: #faf8f7; position: relative; box-shadow: 0 0 40px rgba(0,0,0,0.05); }
  @media (min-width: 481px) { body { background: #f5f0ee; } }
  .no-scrollbar::-webkit-scrollbar { display: none; }
  .no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }
  .service-icon { width: 60px; height: 60px; border-radius: 18px; display: flex; align-items: center; justify-content: center; position: relative; box-shadow: 0 2px 8px rgba(0,0,0,0.06); transition: all 0.2s; }
  .service-icon::after { content: ''; position: absolute; top: 4px; left: 4px; right: 4px; bottom: 50%; border-radius: 14px 14px 0 0; background: linear-gradient(180deg, rgba(255,255,255,0.4), transparent); pointer-events: none; }
  .service-icon-1 { background: linear-gradient(135deg, #fae5ea 0%, #f5ccd5 100%); }
  .service-icon-2 { background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%); }
  .service-icon-3 { background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%); }
  .service-icon-4 { background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%); }
  .service-icon-5 { background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%); }
  .service-icon-6 { background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%); }
  .service-icon-7 { background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%); }
  .service-icon-8 { background: linear-gradient(135deg, #ffedd5 0%, #fed7aa 100%); }
  .service-badge { position: absolute; top: -2px; right: -2px; width: 18px; height: 18px; background: #ef4444; color: white; font-size: 9px; font-weight: 800; border-radius: 50%; display: flex; align-items: center; justify-content: center; border: 2px solid white; z-index: 2; }
  .source-cite { font-size: 10px; color: #57534e; line-height: 1.5; padding: 10px 12px; background: #f5f5f4; border-radius: 8px; border-left: 3px solid #7a0a26; }
  .source-cite strong { color: #4a0014; }
  .bar-chart { display: flex; align-items: flex-end; gap: 6px; height: 100px; }
  .bar { flex: 1; background: linear-gradient(to top, #7a0a26, #c41e3a); border-radius: 4px 4px 0 0; min-height: 4px; transition: all 0.5s; }
  .modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.5); backdrop-filter: blur(4px); z-index: 100; display: flex; align-items: flex-end; justify-content: center; animation: fadeIn 0.2s; }
  .modal-content { background: white; width: 100%; max-width: 480px; border-radius: 24px 24px 0 0; padding: 24px; animation: slideUpModal 0.3s ease-out; max-height: 90vh; overflow-y: auto; }
  @keyframes slideUpModal { from { transform: translateY(100%); } to { transform: translateY(0); } }
  .badge-virus { background: #fee2e2; color: #991b1b; }
  .badge-bakteri { background: #fef3c7; color: #92400e; }
  .badge-protozoa { background: #fce7f3; color: #9f1239; }
  .badge-jamur { background: #ede9fe; color: #5b21b6; }
  .frequency-badge { display: inline-flex; align-items: center; gap: 3px; padding: 2px 8px; border-radius: 10px; font-size: 9px; font-weight: 700; }
  .freq-very-common { background: #fee2e2; color: #991b1b; }
  .freq-common { background: #fef3c7; color: #92400e; }
  .freq-moderate { background: #e0e7ff; color: #3730a3; }

  /* ===== Glassmorphism (v3.1) ===== */
  .glass-card {
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(14px) saturate(180%);
    -webkit-backdrop-filter: blur(14px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 8px 32px rgba(122, 10, 38, 0.08), 0 1px 0 rgba(255,255,255,0.5) inset;
  }
  .glass-dark {
    background: rgba(74, 0, 20, 0.35);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.18);
  }

  /* ===== Animated maroon gradient (subtle, 18s cycle) ===== */
  .gradient-maroon-animated {
    background: linear-gradient(135deg, #9c0a32 0%, #5c0719 30%, #7a0a26 60%, #b91c4d 90%, #9c0a32 100%);
    background-size: 300% 300%;
    animation: gradientShift 18s ease infinite;
  }
  @keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
  }

  /* ===== Hero decorative blobs (soft glowing accents) ===== */
  .hero-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(50px);
    pointer-events: none;
    will-change: transform;
  }
  .hero-blob-1 { animation: blobFloat1 14s ease-in-out infinite; }
  .hero-blob-2 { animation: blobFloat2 18s ease-in-out infinite; }
  @keyframes blobFloat1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(20px, 20px) scale(1.1); }
  }
  @keyframes blobFloat2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-25px, 15px) scale(0.9); }
  }

  /* ===== Floating medical icons (decorative) ===== */
  .float-icon { animation: floatIcon 5s ease-in-out infinite; }
  .float-icon-delay { animation: floatIcon 6s ease-in-out infinite 1.5s; }
  @keyframes floatIcon {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(3deg); }
  }

  /* ===== Button press feedback (haptic-like visual) ===== */
  .btn-press { transition: transform 0.1s ease, box-shadow 0.2s ease; }
  .btn-press:active { transform: scale(0.96); box-shadow: 0 1px 2px rgba(0,0,0,0.05) !important; }

  /* ===== Ripple effect on cards/buttons ===== */
  .ripple { position: relative; overflow: hidden; }
  .ripple::after {
    content: ''; position: absolute; border-radius: 50%;
    width: 120px; height: 120px;
    transform: translate(-50%, -50%) scale(0);
    background: rgba(255,255,255,0.45);
    top: 50%; left: 50%;
    opacity: 0; pointer-events: none;
    transition: transform 0.7s ease-out, opacity 0.7s ease-out;
  }
  .ripple:active::after { transform: translate(-50%, -50%) scale(4); opacity: 1; transition: 0s; }

  /* ===== Shimmer skeleton loading ===== */
  .shimmer {
    background: linear-gradient(90deg, #f5f5f4 25%, #e7e5e4 50%, #f5f5f4 75%);
    background-size: 200% 100%;
    animation: shimmer 1.6s infinite linear;
  }
  @keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
  }

  /* ===== Card variants for depth hierarchy ===== */
  .card-elevated { box-shadow: 0 4px 16px rgba(122, 10, 38, 0.06), 0 1px 3px rgba(0,0,0,0.04); }
  .card-floating { box-shadow: 0 12px 28px rgba(122, 10, 38, 0.10), 0 2px 6px rgba(0,0,0,0.04); }
  .card-hover { transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s ease; }
  .card-hover:active { transform: translateY(2px) scale(0.99); }

  /* ===== Subtle pulse for live status ===== */
  .pulse-glow {
    animation: pulseGlow 2.4s ease-in-out infinite;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6);
  }
  @keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5); }
    50% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  }

  /* ===== Smooth scroll snap for swipe sections (mythbuster ready) ===== */
  .snap-x { scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
  .snap-start { scroll-snap-align: start; }

  /* ===== Better typography hierarchy ===== */
  .text-balance { text-wrap: balance; }
  .heading-display { font-weight: 800; letter-spacing: -0.02em; line-height: 1.05; }
  .heading-section { font-weight: 700; letter-spacing: -0.01em; }

  /* ===== Soft divider ===== */
  .soft-divider { height: 1px; background: linear-gradient(90deg, transparent, rgba(122, 10, 38, 0.12), transparent); }

  /* ===== Onboarding slide indicator dots ===== */
  .dot-indicator { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,0.4); transition: all 0.3s; }
  .dot-indicator.active { width: 24px; background: white; }