/* General Styles */
body {
    margin: 0;
    font-family: Arial, sans-serif;
    background-color: #0b1220;
    color: white;
}

img {
    user-select: none;
    pointer-events: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    /* iOS Safari */
}


html {
    scroll-padding-top: 88px;
    scroll-behavior: smooth;
    /* Adjust this value to match your header's height */
}

/* Hover effects for interactive images/badges */
.store-badge,
.web-badge,
.btn {
    transition: transform 0.2s ease-in-out;
    pointer-events: auto;
    /* Ensure hover works even with global image pointer-events restriction */
}

.store-badge:hover,
.web-badge:hover {
    transform: scale(1.05);
}


.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Header */
header {
    background-color: rgba(3, 7, 18, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #1f2937;
    padding: 0.85rem 0;
    min-height: 72px;
    width: 100%;
    position: fixed;
    top: 0;
    z-index: 1000;
}

header h1 {
    color: #FFC107;
    margin: 0;
}

header nav ul {
    list-style: none;
    padding: 0;
    display: flex;
    gap: 1rem;
}

header nav ul li a {
    color: #9ca3af;
    text-decoration: none;
    font-size: 0.95rem;
    letter-spacing: 0.01em;
}

header nav ul li a:hover {
    color: #ffffff;
}

/* Hero Section */
#hero {
    text-align: center;
    padding: 2rem 0;
    background-color: #0f1626;
}

#hero h2 {
    color: #FFC107;
}

/* Features and Screenshots */
section {
    padding: 2rem 0;
}

section h2 {
    color: #FFC107;
    text-align: center;
    margin-bottom: 1rem;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

/* Page Loader Spinner */
.loader-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border-top-color: #FFC107;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}


.placeholder {
    background-color: #1F2430;
    color: #B3B1AD;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 150px;
    border: 1px solid #FFC107;
    border-radius: 8px;
}

/* Footer */
footer {
    background-color: #1F2430;
    text-align: center;
    padding: 1rem 0;
    color: #B3B1AD;
}

/* Light mode styles */
body.light-mode {
    background-color: #f9f9f8;
    color: #000000;
}

header.light-mode {
    background-color: rgba(255, 255, 255, 0.8);
    color: #000000;
    border-bottom: 1px solid #E5E5E2;
}

header.light-mode nav ul li a {
    color: #666662;
}

header.light-mode nav ul li a:hover {
    color: #1A1A18;
}

h1 {
    color: #FFFFFF;
}

h1.light-mode {
    color: #000000;
}

.nav-link.light-mode {
    color: #000000;
}

.placeholder.light-mode {
    background-color: #E9ECEF;
    color: #000000;
}

.btn-warning.light-mode {
    background-color: #FFC107;
    color: #000000;
}

.form-check-input {
    background-color: #FFC107;
    border-color: #FFC107;
}

.form-check-input.light-mode {
    background-color: #FFC107;
    border-color: #FFC107;
}

.pageicon img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: none;
    /* image should not draw its own border; container draws the border */
    border-radius: 6px;
    /* slightly smaller than container radius so the border is visible */
}

/* Pageicon container: show border in dark mode, hide in light mode */
.pageicon {
    border: 2px solid #FFC107;
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    overflow: hidden;
}

header.light-mode .pageicon {
    border: none;
    background: #1F2430;
    /* keep inner dark square for contrast */
}

/* Inner boxed container to mirror test.html's dark square */
.pageicon-box {
    width: 36px;
    height: 36px;
    background-color: #1A1A18;
    border-radius: 8px;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Ensure the outer pageicon keeps its yellow border while the inner box provides contrast */
.pageicon {
    background: transparent;
}

/* In light mode keep the inner square dark for contrast */
body.light-mode header .pageicon-box {
    background-color: #1F2430 !important;
}

.hidden {
    display: none !important;
}

.visible {
    display: block !important;
}

#qa {
    padding: 2rem 0;
    background-color: var(--background-color, #f9f9f9);
    color: var(--text-color, #333);
}

#qa h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--heading-color, #333);
}

@keyframes heroFadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes heroFadeInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes heroFadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-anim-1 {
    opacity: 0;
}

.hero-anim-2 {
    opacity: 0;
}

.hero-anim-3 {
    opacity: 0;
}

.hero-anim-4 {
    opacity: 0;
}

body.loaded .hero-anim-1 {
    animation: heroFadeInUp 0.8s ease-out 0.1s forwards;
}

body.loaded .hero-anim-2 {
    animation: heroFadeInRight 0.8s ease-out 0.3s forwards, heroFloat 6s ease-in-out 1.2s infinite;
}

body.loaded .hero-anim-3 {
    animation: heroFadeInUp 0.8s ease-out 0.5s forwards;
}

body.loaded .hero-anim-4 {
    animation: heroFadeInUp 0.8s ease-out 0.7s forwards;
}

@keyframes heroFloat {
    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }
}

.fade-in-section {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    will-change: opacity, transform;
}

.fade-in-section.is-visible {
    opacity: 1;
    transform: none;
}

/* Reserve space for screenshots to avoid layout shift when images load */
.screenshot-img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
}

/* Ensure hero images don't cause vertical layout jumps during animation */
.hero-anim-2 {
    display: inline-block;
    min-height: 200px;
}

.faq-item {
    margin-bottom: 1.5rem;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    background-color: var(--card-background-color, #2C2F3A);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.faq-item h3 {
    margin-bottom: 0.5rem;
    color: var(--link-color, #007bff);
}

.faq-item p {
    margin: 0;
    color: var(--text-color, #555);
}

/* Light mode variables */
body.light-mode {
    --background-color: #f9f9f9;
    --text-color: #333;
    --heading-color: #333;
    --border-color: #ddd;
    --card-background-color: #fff;
    --link-color: black;
}

/* Theme toggle boxed button (match test.html appearance) */
#themeToggle.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    border-radius: 8px;
    background-color: rgba(255,255,255,0.06);
    color: #B3B1AD;
    border: none;
    cursor: pointer;
    transition: background-color 160ms ease, color 160ms ease;
}

/* Hover/focus states */
#themeToggle.theme-toggle:hover,
#themeToggle.theme-toggle:focus {
    background-color: rgba(255,255,255,0.10);
    outline: none;
}

/* Light mode appearance: light background with dark icon */
body.light-mode #themeToggle.theme-toggle {
    background-color: #E6E6E2;
    color: #1A1A18;
}

/* Ensure svg uses currentColor */
#themeToggle.theme-toggle svg { fill: currentColor; }

/* Prevent Bootstrap link styles from making it blue */
#themeToggle.theme-toggle,
#themeToggle.theme-toggle * { color: inherit !important; }

/* Reduce visual intensity of FAQ / card shadows in light mode */
body.light-mode .faq-item {
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08) !important;
    border: 1px solid rgba(0, 0, 0, 0.06) !important;
    background-color: var(--card-background-color, #fff) !important;
}

/* Slightly adjust FAQ heading color in light mode for better contrast */
body.light-mode .faq-item h3 {
    color: #1a1a18 !important;
}

/* Dark mode variables */
body {
    --background-color: #1F2430;
    --text-color: #B3B1AD;
    --heading-color: #FFC107;
    --border-color: #333;
    --card-background-color: #2C2F3A;
    --link-color: #FFC107;
}

/* Strong overrides for light mode to ensure Bootstrap utilities do not win */
body.light-mode {
    background-color: #f9f9f8 !important;
    color: #000000 !important;
}

/* Ensure header and nav links match the light header in test.html */
header.light-mode,
body.light-mode header {
    background-color: rgba(255, 255, 255, 0.9) !important;
    color: #000000 !important;
    border-bottom-color: #E5E5E2 !important;
}

header.light-mode .nav-link,
header.light-mode .nav-link.text-light,
body.light-mode .nav-link.light-mode {
    color: #666662 !important;
}

/* Remove Bootstrap's .text-light forcing white in light mode */
body.light-mode .text-light {
    color: #666662 !important;
}

/* Make hero and major sections transparent so body background shows through in light mode */
body.light-mode #hero,
body.light-mode section,
body.light-mode footer {
    background-color: transparent !important;
}

/* Adjust placeholder/footer/link colors in light mode */
body.light-mode footer,
body.light-mode footer a {
    color: #333333 !important;
}

/* --- Showcase Layout Grid --- */
.cndb-showcase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Kept your original row-width span */
  
  /* 1. Sets a strict uniform height boundary for all boxes */
  grid-auto-rows: 240px; 
  
  gap: 1.5rem;
  width: 100%;
  max-width: 1100px;
  margin: 2rem auto;
  padding: 0 1rem;
}

/* --- Individual Feature Grid Cards --- */
.feature-card {
  background-color: transparent;
  cursor: pointer;
  border-radius: 12px;
  border: 1px solid rgba(255, 191, 0, 0.15);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;

  /* 2. Flex column alignment forces compressed vertical stacking */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  
  /* 3. Minimized padding to maximize text/graphic vertical space inside the height constraint */
  padding: 1rem; 
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 191, 0, 1);
  box-shadow: 0 6px 20px rgba(255, 191, 0, 0.05);
}

/* 4. Optimized asset sizes to prevent overflow within the shorter container */
.feature-card .dark-mode-svg {
  max-height: 55px !important; /* Brought down from 80px to cleanly fit the shorter height */
  margin-bottom: 0.5rem !important;
}

.feature-card h3 {
  color: #ffbf00;
  font-size: 1.35rem;
  margin-top: 0.25rem;
  margin-bottom: 0.25rem;
  font-weight: 600;
}

.feature-card p {
  color: #8b949e;
  font-size: 0.95rem;
  line-height: 1.4;
  max-width: 90%; /* Prevents text from crowding the card borders */
}.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(4, 6, 10, 0.85);
  backdrop-filter: blur(4px);
  
  /* Centers the content window directly in the middle of the screen */
  display: flex;
  justify-content: center;
  align-items: center;
  
  /* Performance rendering toggles */
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 99999; 
}

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

.popup-content {
  background: #161b22;
  border: 2px solid #ffbf00;
  border-radius: 16px;
  width: 90%;
  max-width: 650px;
  padding: 2.5rem;
  position: relative;
  
  /* Zoom scale transition handles the fluid expansion from viewport center */
  transform: scale(0.92);
  transition: transform 0.25s cubic-bezier(0.34, 1.3, 0.64, 1);
}

.popup-overlay.active .popup-content {
  transform: scale(1);
}

.close-btn {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: #8b949e;
  font-size: 2.2rem;
  cursor: pointer;
  line-height: 1;
}

#popup-title {
  color: #ffbf00;
  margin-bottom: 1.5rem;
  font-size: 1.6rem;
  font-weight: 600;
}

.video-container {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.video-container video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}