@import url("https://unpkg.com/leaflet/dist/leaflet.css");




#app,
.app-shell,
.camera-screen,
.landing-screen {
  min-height: 100vh;
  background: #000; /* <— no white */
}

.app-shell img,
.app-shell video,
.app-shell canvas {
  max-width: 100%;
  max-height: 100%;
  height: auto;
  object-fit: contain;
}

/* Center the app in the window */
.app-wrapper {
  height: 100vh;
  width: 100%;
  background: #ffffff;           /* phone background */
  display: flex;
  justify-content: center;
  align-items: center;
  
}

/* Phone-like frame shared by ALL screens */
.app-shell {
  width: min(600px, 95vw);    /* base width - never exceed 600px, but shrink if needed */
  height: 1000px;                 
  max-width: 760px;
  max-height: 1100px;
  background: #0b0b0b;
  border-radius: 30px;           /* rounded corners */
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

/* Scrollable content inside the shell */
.app-content {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  
}

.tiles button, .categories button {
  padding: 1rem 2rem;
  font-size: 1.1rem;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  background: #3b82f6;
  color: white;
  box-shadow: 0 4px 8px rgba(0,0,0,.1);
 }

.top-buttons {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: flex;
  gap: .5rem;
}



/* --- LANDING --- */
.landing {
  display: flex;
  flex-direction: column;
  text-align: center;
}



/* Main action buttons */
.main-actions {
 flex-direction: row;        /* side by side */
  justify-content: center;    /* center in phone */
  gap: 1rem;                  /* space between buttons */
  margin-top: auto;           /* push them lower inside landing screen */
  margin-bottom: 2rem;        /* distance from categories */
  flex-wrap: wrap; 
}

.big-btn {
  width: 250px;
  padding: 1rem;
  font-size: 1.2rem;
  font-weight: 600;
  border-radius: 12px;
  background: linear-gradient(90deg, #007aff, #00c6ff);
  color: #fff;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0,0,0,0.12);
  transition: transform 0.15s;
  
}

.big-btn:hover {
  transform: translateY(-2px);
}

.big-btn.secondary {
  background: #f3f4f6;
  color: #374151;
}

/* Categories lower on screen */
.categories {
  display: flex;
  justify-content: space-around;
  margin-bottom: 1rem;
}

.categories button {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 0.5rem 0.8rem;
  font-size: 0.9rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.camera-screen {
  position: relative;        /* anchor for absolute children */
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* Floating overlays */
.top-overlay {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  gap: 6px;
  z-index: 40;
}
.left-overlay {
  position: absolute;
  top: 58px;
  left: 18px;
  z-index: 40;

}







/* Torch / flash button */
.icon-btn {
  background: rgba(0, 0, 0, 0.5);      /* darker backdrop */
  border: none;
  border-radius: 50%;
  width: 64px;                         /* bigger circle */
  height: 64px;
  font-size: 44px;                     /* bigger icon glyph */
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #fff;
  box-shadow:
    0 6px 14px rgba(0,0,0,0.45),      /* deeper drop shadow */
    0 2px 4px rgba(0,0,0,0.4) inset;  /* inner glow */
  backdrop-filter: blur(8px);
  transition: transform 0.15s, background 0.2s;
}

/* MAIN camera card - full screen cover */
        .camera-card {
          top: 0px;
          position: relative;
          width: 100%;
          height: 100%;
          aspect-ratio: 5/8;
          max-width: 760px;
          margin: 0 auto;
          overflow: hidden;
          background: #000;
          border: 0;
          border-radius: 20px;        /* ← round the edges */
          box-shadow: 0 8px 20px rgba(0,0,0,0.12); /* optional shadow for depth */
          z-index: 20;
}
/* video feed */
.feed {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Controls - center bottom */
.controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 96px; /* moves shutter up off bottom UI */
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  z-index: 30;
}

/* Big shutter */
.big-shutter {
  width: 78px;
  height: 78px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  background: linear-gradient(135deg, #6366f1, #3b82f6);
  box-shadow:
    0 6px 12px rgba(0,0,0,0.25),
    0 3px 6px rgba(0,0,0,0.2) inset,
    0 -3px 6px rgba(255,255,255,0.12) inset;
  transition: transform 0.15s, box-shadow 0.3s;
}
.big-shutter:active { transform: scale(0.94); }

/* swap camera - bottom right */
.swap {
  position: absolute;
  right: 68px;
  bottom: 100px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 0;
  background: rgba(255,255,255,0.08);
  color: #fff;
  display:flex;
  align-items:center;
  justify-content:center;
  z-index:30;
  box-shadow: 0 10px 24px rgba(0,0,0,.25);
}

/* Result view styles (kept from original) */
.result-wrap {
  position: relative;
  width: 100%;
  flex: 1;               /* take all available height */
  background: #0b0b0b;
  border-radius: inherit;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem;
  box-sizing: border-box;

}

.result-img {
  width: 100%;
  max-width: none;     /* or bigger if you widen the app */
  padding: 3px;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 6px 14px rgba(0,0,0,.12);
  margin-bottom: .8rem; 
}

.explain-card {
  width: 100%;
  max-width: none;
  height: relative;
  background: #fff;
  border-radius: 12px;
  padding: 3px;
  box-shadow: 0 4px 10px rgba(0,0,0,.08);
  text-align: center;
  font-size: 1.5rem;
  margin-bottom: .8rem; 

}

.loading-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;     /* center spinner vertically */
  gap: 1.4rem;                 /* more room between elements */
  text-align: center;
  padding-top: 15vh;           /* push down a bit on phones */
}

.loading-card h1{ margin:4px 0 0; font-size: 1.6rem; font-weight:800; color:#fff; }

.loading-card p{ margin:0; color:#cbd5e1; }

.circle-wrap{ position:relative; width: 260px; height:260px; margin-top:6px; }

.circle-wrap .img{
  position:absolute; top:20px; left:20px; width:220px; height:220px; border-radius:999px; background-size: cover; background-position:center;
  box-shadow: 0 10px 24px rgba(0,0,0,.18);
}
.circle-wrap .ring{
  position:absolute; inset:0; border-radius:999px;
  background: conic-gradient(#6366f1 0% 25%, rgba(99,102,241,.15) 25% 100%);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(50% - 12px), #000 calc(50% - 11px));
          mask: radial-gradient(farthest-side, transparent calc(50% - 12px), #000 calc(50% - 11px));
  animation: spin 1.2s linear infinite;
}

.circle-wrap.done .ring{
  background: conic-gradient(#22c55e 0 100%);
  animation: none;
}
@keyframes spin { to { transform: rotate(360deg); } }

.check{
  position:absolute; top:50%; left:50%; transform:translate(-50%,-50%);
  width:72px; height:72px; border-radius:999px; background:#22c55e; color:#fff;
  display:flex; align-items:center; justify-content:center; font-weight:900; font-size:34px;
  box-shadow:0 12px 24px rgba(34,197,94,.35);
}

.ghost-btn{ border:2px solid #7c3aed; color:#7c3aed; background:transparent; padding:.8rem 1.2rem; border-radius:999px; font-weight:800; }

.primary-btn {
  border: 0;
  background: linear-gradient(135deg, #6366f1, #22c55e);
  color: #fff;
  padding: .9rem 1.4rem;
  border-radius: 14px;
  font-weight: 800;
  margin: 1rem 0 2rem;
  transition: transform 0.15s, background 0.3s;
}
.primary-btn:active { transform: scale(.96); }

.error{ background:#fee2e2; color:#7f1d1d; padding:.8rem 1rem; border-radius:14px; }

.audio-toggle {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 50;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(4px);
  color: #fff;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  cursor: pointer;
  transition: background 0.2s;
}
.audio-toggle:hover {
  background: rgba(0,0,0,0.6);
}



/* Center modal inside phone */
.auth-wrapper {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 60;
  background: rgba(0, 0, 0, 0.45);   /* soft backdrop */
  backdrop-filter: blur(6px);
}

/* Main modal container */
.auth-wrapper .modal {
  position: relative;
  width: 80%;
  height: auto;
  max-width: 360px;
  background: linear-gradient(145deg, #ffffff, #f9fafb);
  border-radius: 22px;
  padding: 1.8rem 1.4rem;
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.15),
    0 2px 8px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  animation: popIn 0.35s ease;
}

/* Heading */
.auth-wrapper .modal h2 {
  font-size: 1.4rem;
  font-weight: 700;
  text-align: center;
  color: #111827;
  margin-bottom: 0.4rem;
}

/* Inputs */
.auth-wrapper .modal input {
  padding: 0.75rem 0.9rem;
  border-radius: 14px;
  border: 1px solid #e5e7eb;
  font-size: 1rem;
  background: #fff;
  transition: box-shadow 0.2s, border 0.2s;
}

.auth-wrapper .modal input:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

/* Buttons */
.auth-wrapper .modal .btn {
  background: linear-gradient(135deg, #6366f1, #3b82f6);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  border: none;
  border-radius: 14px;
  padding: 0.7rem 1rem;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s;
}

.auth-wrapper .modal .btn:hover {
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}

.auth-wrapper .modal .btn:active {
  transform: scale(0.96);
}

/* Close button (secondary) */
.auth-wrapper .modal .btn.close {
  background: #e5e7eb;
  color: #374151;
}

/* Error message */
.auth-wrapper .modal p {
  color: #ef4444;
  font-size: 0.9rem;
  margin: 0;
  text-align: center;
}

/* Entrance animation */
@keyframes popIn {
  0% {
    transform: scale(0.85);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}
/* container for icon + bubble */
.auth-icon-wrap {
  position: absolute;
  top: 192px;
  right: 380px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  z-index: 45;
}

/* icon stays as before */
.auth-icon {
  background: none;
  border: none;
  font-size: 3.2rem;
  line-height: 1;
  cursor: pointer;
  color: #374151;
  text-shadow:
    0 3px 6px rgba(0,0,0,0.7),             /* main dark blur */
    0 6px 12px rgba(0,0,0,0.5);            /* extra depth */
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.6));
  transition: transform 0.15s, color 0.2s;
}
.auth-icon:hover {
  transform: scale(1.15);
  color: #111827;
}

/* text bubble under icon */
.auth-bubble {
  background: #11827;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 12px;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}


/* --- Categories Grid --- */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); /* 👈 smaller min size */
  gap: 0.8rem;                      /* tighter gaps */
  padding: 0.5rem 0.5rem 1rem;      /* less padding around */
}

/* Single tile */
.category-tile {
  background: #1f2937;          /* dark card */
  border-radius: 16px;
  padding: 1.4rem 0.6rem;
  text-align: center;
  box-shadow: 0 4px 14px rgba(0,0,0,0.15);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.15s, box-shadow 0.2s;
}

.category-tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.25);
}

/* Icon / image inside the tile */
.category-tile .tile-image {
  width: 65%;                       /* don’t fill entire tile */
  height: auto;
}

/* Title */
.category-tile h3 {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 0.25rem;
}

/* Description */
.category-tile p {
  font-size: 0.85rem;
  line-height: 1.3;
  margin: 0;
  color: #d1d5db;
}



.landing {
  background-color: #000;   /* fallback behind video */
}


/* --- Bottom controls on landing --- */
.bottom-bar {
  position: absolute;       /* always anchored */
  bottom: 10px;             /* spacing from bottom of shell */
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  align-items: center;

  z-index: 999;              /* above content, below modals */
}

/* pill-wrapper should mimic bottom-bar CameraCapture */
.pill-wrapper {
  position: absolute;
  bottom: 24px;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 1.2rem;
  z-index: 60;
}

.circle-snap {
  position: absolute;
  bottom: 15px;   /* lets it overlap pill */
  left: 50%;
  transform: translateX(-50%);
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: #2E00FF;
  border: none;
  color: #fff;
  font-size: 3rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  z-index: 90;
}

.circle-snap:active {
  transform: translateX(-50%) scale(0.85);  /* keep translate + add scale */
}

/* Long pill behind icons */
.pill-nav {
  background: #FFAE00;
  border-radius: 22px;
  padding: 0 0.8rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: min(400px, 90%);
  height: 60px;
  box-shadow:
    0 8px 20px rgba(0,0,0,0.5),
    inset 0 0 12px rgba(0,0,0,0.35);
}

.pill-nav button {
  background: none;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  
}
.pill-nav button:hover {
  transform: scale(1.15);
}


.pill-left, .pill-right {
  display: flex;
  gap: 1rem;          /* ← spacing between buttons (you can use margin too) */
}


.settings-card {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.settings-screen h2 {
  font-size: 1.4rem;
  font-weight: 600;
}


.facts-card {
  width: 100%;
  max-width: none;
  height: relative;
  background: #fff;
  border-radius: 12px;
  padding: 3px;
  box-shadow: 0 4px 10px rgba(0,0,0,.08);
  text-align: center;
  font-size: 1.5rem;
  margin-bottom: .8rem; 
}

.facts-card h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;

}

.facts-card ul {
  padding-left: 1.5rem;
  margin: 1;
  text-align: left;
}

.facts-card li {
  margin-bottom: 0.8rem;
  font-size: 1.5rem;
  line-height: 1.5;
  text-align: left;
}


.splash-wrap {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #000;
  display: flex;
  justify-content: center;
  align-items: center;
  animation: fadeOut 0.6s ease forwards;
  animation-delay: 2.6s; /* fade a bit before timeout */
}

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


/* --- Move Flash Button --- */

.left-overlay {
  position: absolute;
  top: 18px;
  left: 18px;
  z-index: 40;
}

/* --- Shared style for round camera utilities --- */
.camera-util {
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(6px);
  border: none;
  border-radius: 50%;
  width: 52px;
  height: 52px;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 6px 14px rgba(0,0,0,0.45),
    inset 0 1px 2px rgba(255,255,255,0.05);
  cursor: pointer;
  transition: transform 0.15s, background 0.25s;
  opacity: 0;                        /* fade-in start */
  animation: fadeInUtil 0.5s ease forwards;
  animation-delay: 0.35s;            /* wait for camera */
}


.camera-util:hover {
  background: rgba(0,0,0,0.7);
  transform: scale(1.06);
}

/* Flash specific (emoji icon) */
.camera-util.flash {
  font-size: 32px;      /* big enough for emoji */
  line-height: 1;
}

/* Swap specific (SVG) */
.camera-util.swap svg {
  width: 28px;
  height: 28px;
  stroke-width: 2;
}

/* Fade-in animation */
@keyframes fadeInUtil {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}


@keyframes fadeOut {
  0%   { opacity: 1; }
  70%  { opacity: 0.4; }
  100% { opacity: 0; }
}



/* ------------------------------ Mobile tweaks only -------------------------------- */


@media (max-width: 480px) {

html, body {
  height: 100%;
  overflow-y: auto; /* must be scrollable */
  -webkit-overflow-scrolling: touch;
  margin: 0;
  background: #000;
  
}

#app,
.app-shell,
.camera-screen,
.landing-screen {
  min-height: 100vh;
  background: #000; /* <— no white */
}



  /* Shrink phone shell to fit screen */
.app-shell {
  width: min(600px, 100vw);    /* base width - never exceed 600px, but shrink if needed */
  height: 640px;                 
  aspect-ratio: 5 / 8;           /* keeps phone proportions */
  border-radius: 0px;           /* rounded corners */
  border: 10px solid #0b0b0b;
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}


/* MAIN camera card - full screen cover */
        .camera-card {
          top: 10px;
          position: relative;
          width: 100%;
          height: 100%;
          aspect-ratio: 5/8;
          max-width: 760px;
          margin: 0 auto;
          overflow: hidden;
          background: #000;
          border: 0;
          border-radius: 20px;        /* ← round the edges */
          box-shadow: 0 8px 20px rgba(0,0,0,0.12); /* optional shadow for depth */
          z-index: 20;
}

/* Center the app in the window */
.app-wrapper {
  height: 100vh;
  width: 100%;
  background: #ffffff;           /* phone background */
  display: flex;
  justify-content: center;
  align-items: center;
  
}


  /* Landing page spacing */
  .landing {
    padding: 1rem 0.75rem;
    justify-content: flex-start;
    gap: 1.2rem;
    overflow-y: auto;
  }

  /* Brand title */
  .brand {
    font-size: 1.5rem;
    margin: 0.5rem 0 1rem;
  }

  /* Two action buttons side by side */
  .main-actions {
    flex-direction: row;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
  }

  .big-btn {
    flex: 1 1 48%;
    min-width: 0;
    padding: 0.7rem;
    font-size: 1rem;
  }

  /* Category tiles in grid */
  .categories {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.6rem;
    margin-bottom: 1rem;
  }

  .categories button {
    font-size: 0.85rem;
    padding: 0.5rem;
  }

  /* Login bubble / icon size */
  .auth-icon-wrap {
    top: 3rem;
    right: 1rem;
  }

  .auth-icon {
    font-size: 2rem;
    text-shadow: 0 2px 5px rgba(0,0,0,0.7);
  }

.feed, .camera-card video {
  pointer-events: none;
}

.bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 70px;
  padding-bottom: env(safe-area-inset-bottom);
  background: #111;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 999;
}

/* pill-wrapper should mimic bottom-bar CameraCapture */
.pill-wrapper {
  position: absolute;
  bottom: 24px;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 1.2rem;
  z-index: 60;
}

.circle-snap {
  position: absolute;
  bottom: 10px;   /* lets it overlap pill */
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: #2E00FF;
  border: none;
  color: #fff;
  font-size: 3rem;
  box-shadow: 0 4px 12px rgba(0,5,9,1);

  z-index: 90;
}

.circle-snap:active {
  transform: translateX(-50%) scale(0.85);  /* keep translate + add scale */
}

/* Long pill behind icons */
.pill-nav {
  background: #FFAE00;
  border-radius: 22px;
  padding: 0 0.8rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: min(400px, 90%);
  height: 60px;
  box-shadow:
    0 8px 20px rgba(0,0,0,0.5),
    inset 0 0 12px rgba(0,0,0,0.35);
}

.pill-nav button {
  background: none;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
 
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  
}
.pill-nav button:hover {
  transform: scale(1.15);
}


.pill-left, .pill-right {
  display: flex;
  gap: .2rem;          /* ← spacing between buttons (you can use margin too) */
}


.settings-card {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.settings-screen h2 {
  font-size: 1.4rem;
  font-weight: 600;
}

.facts-card {
  width: 100%;
  max-width: none;
  height: relative;
  background: #fff;
  border-radius: 12px;
  padding: 3px;
  box-shadow: 0 4px 10px rgba(0,0,0,.08);
  text-align: center;
  font-size: 1.5rem;
  margin-bottom: .8rem; 
}

.facts-card h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;

}

.facts-card ul {
  padding-left: 1.5rem;
  margin: 1;
  text-align: left;
}

.facts-card li {
  margin-bottom: 0.8rem;
  font-size: 1.5rem;
  line-height: 1.5;
  text-align: left;
}


.result-img {
  width: 100%;
  max-width: none;     /* or bigger if you widen the app */
  padding: 2px;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 6px 14px rgba(0,0,0,.12);
  margin-bottom: .8rem; 
}

.explain-card {
  width: 100%;
  max-width: none;
  height: relative;
  background: #fff;
  border-radius: 12px;
  padding: 1px;
  box-shadow: 0 4px 10px rgba(0,0,0,.08);
  text-align: center;
  font-size: 1.5rem;
  margin-bottom: .8rem; 

}

.splash-wrap {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #000;
  display: flex;
  justify-content: center;
  align-items: center;
  animation: fadeOut 0.6s ease forwards;
  animation-delay: 2.6s; /* fade a bit before timeout */
}

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

@keyframes fadeOut {
  0% { opacity: 1; }
  80% { opacity: 0.4; }
  100% { opacity: 0; }
}


/* --- Categories Grid --- */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .7rem;
  padding: 1rem 1rem 2rem;
}

/* Single tile */
.category-tile {
  background: linear-gradient(145deg, #1e293b, #111827);
  border-radius: 12px;
  padding: 0.2rem 0.1rem;
  text-align: center;
  box-shadow:
    0 2px 6px rgba(0, 0, 0, 0.4),
    inset 0 0 2px rgba(255, 255, 255, 0.05);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.18s ease, box-shadow 0.25s ease;
  backdrop-filter: blur(4px);
}

.category-tile:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow:
    0 6px 18px rgba(0, 0, 0, 0.35),
    inset 0 0 3px rgba(255, 255, 255, 0.08);
}

/* Icon / image inside the tile */
.category-tile .tile-image {
  font-size: 2rem;            /* smaller icon */
  margin-bottom: 0.45rem;
  opacity: 0.95;
}

/* Title */
.category-tile h3 {
  font-size: 0.9rem;
  font-weight: 700;
  margin: 0 0 0.2rem;
  letter-spacing: 0.2px;
}

/* Description */
.category-tile p {
  font-size: 0.75rem;
  line-height: 1.55;
  margin: 0;
  color: #cbd5e1;             /* softer gray text */
}

/* Images inside the tile */
.category-tile .tile-image img {
  width: var(--tile-img-size, 96px);
  height: var(--tile-img-size, 96px);
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
  transition: transform 0.15s;
}

/* Force nav SVGs to respect our chosen size */
.pill-nav svg {
  width: 44px !important;
  height: 44px !important;
  stroke-width: 2;
}

/* swap camera - bottom right */
.swap {
  position: absolute;
  left: 20px;
  top: 80px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 0;
  background: rgba(255,255,255,0.08);
  color: #fff;
  display:flex;
  align-items:center;
  justify-content:center;
  z-index:30;
  box-shadow: 0 10px 24px rgba(0,0,0,.25);
}
/* --- Move Flash Button --- */

.left-overlay {
  position: absolute;
  top: 18px;
  left: 18px;
  z-index: 40;
}

/* --- Shared style for round camera utilities --- */
.camera-util {
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(6px);
  border: none;
  border-radius: 50%;
  width: 52px;
  height: 52px;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 6px 14px rgba(0,0,0,0.45),
    inset 0 1px 2px rgba(255,255,255,0.05);
  cursor: pointer;
  transition: transform 0.15s, background 0.25s;
  opacity: 0;                        /* fade-in start */
  animation: fadeInUtil 0.5s ease forwards;
  animation-delay: 0.35s;            /* wait for camera */
}


.camera-util:hover {
  background: rgba(0,0,0,0.7);
  transform: scale(1.06);
}

/* Flash specific (emoji icon) */
.camera-util.flash {
  font-size: 32px;      /* big enough for emoji */
  line-height: 1;
}

/* Swap specific (SVG) */
.camera-util.swap svg {
  width: 28px;
  height: 28px;
  stroke-width: 2;
}

/* Fade-in animation */
@keyframes fadeInUtil {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeOut {
  0%   { opacity: 1; }
  70%  { opacity: 0.4; }
  100% { opacity: 0; }
}

}