html, body {
  min-height: 100%;
  height: auto;
  scroll-padding-top: 80px; /* Fix for sticky header covering anchor links */
}

body {
  background: transparent !important;
}

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

/* Glassmorphism Utilities */
.glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.dark .glass {
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Specific Request: High Transparency Payment Modal with 3D effect */
.payment-modal-light {
    background: rgba(255, 255, 255, 0.25); /* Very high transparency */
    backdrop-filter: blur(25px); /* Strong blur */
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-top: 1px solid rgba(255, 255, 255, 0.8);
    border-left: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow:
        0 8px 32px 0 rgba(31, 38, 135, 0.15),
        inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

/* Success Animation Classes */
.success-circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 2;
    stroke-miterlimit: 10;
    stroke: #22c55e;
    fill: none;
    animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}
.success-check {
    transform-origin: 50% 50%;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
}
@keyframes stroke {
    100% { stroke-dashoffset: 0; }
}

/* Confetti Effect (Simple CSS implementation) */
.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    background-color: #f2d74e;
    animation: confetti 5s ease-in-out infinite;
}
@keyframes confetti {
    0% { transform: translateY(0) rotate(0deg); opacity: 1; }
    100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

/* Code Block Styling */
pre {
    background: #1e1e1e;
    color: #d4d4d4;
    padding: 1rem;
    border-radius: 0.5rem;
    overflow-x: auto;
}
.token.keyword { color: #569cd6; }
.token.string { color: #ce9178; }
.token.number { color: #b5cea8; }
.token.comment { color: #6a9955; }

/* Hide sections by default, show active */
.section-view {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}
.section-view.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Loading Spinner */
.spinner {
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top: 3px solid #0ea5e9;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}
.dark .spinner {
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top: 3px solid #0ea5e9;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Dashboard Chart Bars */
.bar-container {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    height: 100px;
    gap: 4px;
}
.bar {
    width: 100%;
    background: #0ea5e9;
    border-radius: 4px 4px 0 0;
    transition: height 0.5s ease;
    opacity: 0.7;
}
.bar:hover {
    opacity: 1;
}

/* =========================================
   🌙 DARK MODE (Deep Pool / Cinematic)
   ========================================= */

html.dark {
  background: radial-gradient(circle at top center,
    #102845 0%,
    #081726 25%,
    #03080f 55%,
    #010203 100%) !important;
  color: #e6f1ff;
  min-height: 100%;
  position: relative;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif; /* Keep consistent with the body style */
}

/* Atmosphere glow */
html.dark::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 50% 0%, rgba(0,153,255,0.20), transparent 60%),
    radial-gradient(circle at 80% 100%, rgba(56,189,248,0.08), transparent 70%);
  pointer-events: none;
  z-index: -1;
}

html.dark body {
  position: relative;
  z-index: 0;
}

/* Dark mode navbar sticky fix */
.dark #navbar .glass {
  background: rgba(2, 8, 23, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

/* Buttons (dark premium feel) */
.dark button,
.dark .btn {
  background: linear-gradient(180deg, #0b223a, #061421);
  border: 1px solid rgba(255,255,255,0.06);
  color: #e6f1ff;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.05),
    0 8px 25px rgba(0,0,0,0.6),
    0 0 25px rgba(14,165,233,0.15);
  transition: all 0.2s ease;
}

.dark button:hover,
.dark .btn:hover {
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.08),
    0 12px 35px rgba(0,0,0,0.75),
    0 0 40px rgba(14,165,233,0.3);
}

/* Inputs look embedded */
.dark input, .dark textarea, .dark select {
  background: linear-gradient(180deg, #050a12, #020407);
  color: #e6f1ff;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  padding: 10px 12px;
  box-shadow:
    inset 0 2px 6px rgba(0,0,0,0.8),
    0 0 0 1px rgba(0,153,255,0.05);
}

.dark input:focus, .dark textarea:focus {
  outline: none;
  box-shadow:
    inset 0 2px 6px rgba(0,0,0,0.9),
    0 0 0 1px rgba(0,153,255,0.15),
    0 0 25px rgba(0,153,255,0.25);
}


/* =========================================
   ☀️ LIGHT MODE (Sky Glow / Premium SaaS)
   ========================================= */

html:not(.dark) {
  background: radial-gradient(circle at 50% -10%,
    #cfeeff 0%,
    #e8f6ff 30%,
    #f6fbff 55%,
    #ffffff 100%) !important;
  color: #0f172a;
  min-height: 100%;
  position: relative;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif; /* Matched to Dark Mode */
}

/* Atmospheric glow (not band-like) */
html:not(.dark)::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 50% 0%,
      rgba(14,165,233,0.35),
      transparent 65%),
    radial-gradient(circle at 85% 90%,
      rgba(99,102,241,0.12),
      transparent 75%);
  pointer-events: none;
  z-index: -1;
}

/* Ensure content stays above glow */
html:not(.dark) body {
  position: relative;
  z-index: 0;
}

/* Buttons (light premium feel) */
button,
.btn {
  background: linear-gradient(180deg, #ffffff, #f1f5f9);
  border: 1px solid rgba(0,0,0,0.06);
  color: #0f172a;
  box-shadow:
    0 6px 18px rgba(0,0,0,0.10),
    inset 0 1px 0 rgba(255,255,255,0.9);
  transition: all 0.2s ease;
}

button:hover,
.btn:hover {
  transform: translateY(-1px);
  box-shadow:
    0 10px 30px rgba(0,0,0,0.15),
    inset 0 1px 0 rgba(255,255,255,1);
}

/* Inputs feel embedded, clean */
input, textarea, select {
  background: #ffffff;
  color: #0f172a;
  border: 1px solid rgba(0,0,0,0.08);
  box-shadow:
    inset 0 2px 6px rgba(0,0,0,0.04);
}

/* Utility to prevent small icon buttons (like trash can) from getting big shadows */
.icon-btn {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
}

/* Hide scrollbar but keep functionality */
.scrollbar-hide::-webkit-scrollbar {
    display: none;
}
.scrollbar-hide {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

/* --- Documentation "Cool" Styles --- */
.docs-link {
    display: block;
    padding: 0.5rem 1rem;
    border-radius: 0.75rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 3px solid transparent;
    font-size: 0.875rem;
}

.docs-link.active {
    background: rgba(14, 165, 233, 0.1);
    color: #0ea5e9 !important;
    border-left-color: #0ea5e9;
    padding-left: 1.25rem;
    font-weight: 600;
}

.docs-card {
    border-radius: 1.5rem;
    border: 1px solid rgba(0,0,0,0.05);
    background: white;
    padding: 2rem;
    margin-bottom: 2rem;
}

.dark .docs-card {
    background: #1e293b;
    border-color: rgba(255,255,255,0.05);
}

.sticky-docs-header {
    position: sticky;
    top: 4rem; /* Below navbar */
    z-index: 20;
    backdrop-filter: blur(12px);
    background: rgba(255, 255, 255, 0.8);
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.dark .sticky-docs-header {
    background: rgba(15, 23, 42, 0.8);
    border-bottom-color: rgba(255,255,255,0.05);
}

