/* ==========================================================================
   JT CAMERA MAPS - Enterprise Material Design 3 Bento Grid Styling System
   ========================================================================== */

:root {
  color-scheme: dark;
  /* Color Palette - Premium Material Red Accent & Dark Glassmorphism */
  --primary-red: #D32F2F;
  --primary-red-hover: #B71C1C;
  --accent-red: #E53935;
  --bg-dark-slate: #0F172A;
  --bg-card-dark: rgba(30, 41, 59, 0.75);
  --bg-dark-glass: rgba(15, 23, 42, 0.85);
  --border-glass: rgba(255, 255, 255, 0.12);
  --border-glass-bright: rgba(255, 255, 255, 0.22);
  --text-main: #F8FAFC;
  --text-muted: #94A3B8;

  /* Elevation Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.15);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.25);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.45);
  --shadow-glow: 0 0 20px rgba(211, 47, 47, 0.35);

  /* Typography */
  --font-family: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

/* Reset & Root Setup */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

html, body {
  color-scheme: dark;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  font-family: var(--font-family);
  background-color: var(--bg-dark-slate);
  color: var(--text-main);
}

/* Enforce dark mode for native form elements and inputs */
input, select, textarea, button {
  font-family: inherit;
  color-scheme: dark;
}

select option {
  background-color: #1E293B;
  color: #FFFFFF;
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 30px #0F172A inset !important;
  -webkit-text-fill-color: #FFFFFF !important;
  transition: background-color 5000s ease-in-out 0s;
}

#app-container {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

/* Screen Transitions */
.view-screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  transform: scale(0.98);
  z-index: 1;
  overflow-y: auto;
}

.view-screen.active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
  z-index: 10;
}

/* ==========================================================================
   CUSTOM PWA INSTALL BANNER
   ========================================================================== */

.pwa-install-banner {
  display: none !important;
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 520px;
  background: rgba(30, 41, 59, 0.92);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass-bright);
  border-radius: 16px;
  padding: 12px 18px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: var(--shadow-lg);
  z-index: 9999;
  animation: slideDownIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideDownIn {
  from { opacity: 0; transform: translate(-50%, -20px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

.pwa-install-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pwa-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: var(--shadow-sm);
}

.pwa-text {
  display: flex;
  flex-direction: column;
}

.pwa-text strong {
  font-size: 14px;
  color: #FFFFFF;
}

.pwa-text span {
  font-size: 12px;
  color: var(--text-muted);
}

.pwa-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-install {
  background: var(--primary-red);
  color: #FFFFFF;
  border: none;
  padding: 8px 16px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-glow);
}

.btn-install:hover {
  background: var(--primary-red-hover);
  transform: translateY(-1px);
}

.btn-dismiss {
  background: transparent;
  color: var(--text-muted);
  border: none;
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
}

/* ==========================================================================
   SCREEN 1: BENTO GRID DASHBOARD
   ========================================================================== */

.bento-dashboard-container {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 16px;
  gap: 16px;
  overflow-y: auto;
  max-width: 1600px;
  margin: 0 auto;
}

/* Header Bar */
.bento-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(30, 41, 59, 0.6);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-glass);
  border-radius: 18px;
  padding: 12px 20px;
  gap: 16px;
}

.brand-pill {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-pill img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: cover;
}

.brand-title-group {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.3px;
  color: #FFFFFF;
}

.brand-sub {
  font-size: 12px;
  color: var(--primary-red);
  font-weight: 600;
}

.header-right-tools {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-nav-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-glass-bright);
  color: #FFFFFF;
  padding: 8px 14px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.header-nav-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.header-nav-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.35);
}

/* Status Pills */
.status-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  backdrop-filter: blur(8px);
}

.status-pill.gps {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34D399;
}

.dot-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #34D399;
  box-shadow: 0 0 8px #34D399;
  animation: pulseDot 1.5s infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.status-pill.clock {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-glass);
  color: #F1F5F9;
}

.status-pill.clock svg {
  width: 14px;
  height: 14px;
  fill: #94A3B8;
}

/* ==========================================================================
   BENTO GRID LAYOUT SYSTEM
   ========================================================================== */

.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
  flex: 1;
}

/* Bento Base Card */
.bento-card {
  background: var(--bg-card-dark);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: 20px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: var(--shadow-md);
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  overflow: hidden;
  position: relative;
}

.bento-card:hover {
  border-color: var(--border-glass-bright);
  box-shadow: var(--shadow-lg);
}

.bento-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.bento-icon-badge {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.bento-icon-badge.red { background: rgba(211, 47, 47, 0.2); color: #EF4444; }
.bento-icon-badge.blue { background: rgba(59, 130, 246, 0.2); color: #60A5FA; }
.bento-icon-badge.purple { background: rgba(168, 85, 247, 0.2); color: #C084FC; }
.bento-icon-badge.orange { background: rgba(249, 115, 22, 0.2); color: #FB923C; }

.bento-icon-badge svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.bento-header-title {
  display: flex;
  flex-direction: column;
}

.bento-header-title h3 {
  font-size: 15px;
  font-weight: 700;
  color: #FFFFFF;
}

.bento-header-title span {
  font-size: 12px;
  color: var(--text-muted);
}

.badge-status-live {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  color: #EF4444;
  background: rgba(239, 68, 68, 0.15);
  padding: 2px 6px;
  border-radius: 4px;
  width: fit-content;
}

/* ==========================================================================
   BENTO TILE 1: CAMERA VIEWFINDER
   ========================================================================== */

.bento-card-camera {
  grid-column: span 8;
  padding: 0;
  min-height: 480px;
  border-color: rgba(211, 47, 47, 0.3);
}

.camera-container {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 480px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000000;
  overflow: hidden;
}

#camera-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Grid Overlay 3x3 */
.grid-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 2;
}

.grid-overlay.visible { opacity: 1; }
.grid-cell { border: 0.5px solid rgba(255, 255, 255, 0.22); }

/* Focus Ring */
.focus-ring {
  position: absolute;
  width: 70px;
  height: 70px;
  border: 2px solid #FFFFFF;
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(1.4);
  opacity: 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.6);
  z-index: 30;
}

.focus-ring.active {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
}

/* Watermark Overlay Card */
.watermark-overlay-container {
  position: absolute;
  left: 16px;
  right: 16px;
  z-index: 15;
  pointer-events: none;
}

.watermark-overlay-container.position-bottom { bottom: 84px; }
.watermark-overlay-container.position-top { top: 16px; }

.simple-live-card {
  background: rgba(17, 17, 17, 0.88);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: var(--shadow-md);
  max-width: 440px;
  margin-left: auto;
}

.simple-card-top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.simple-pin-icon { flex-shrink: 0; }

.simple-card-titles {
  display: flex;
  flex-direction: column;
}

.simple-kec-text, .simple-kab-text {
  font-size: 13px;
  font-weight: 700;
  color: #FFFFFF;
  line-height: 1.3;
}

.simple-kec-text span, .simple-kab-text span {
  color: #F8FAFC;
  font-weight: 800;
}

.simple-card-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.15);
  width: 100%;
}

.simple-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.simple-coords-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.simple-coord-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: #E2E8F0;
}

.simple-accuracy {
  font-size: 11px;
  font-weight: 700;
  color: #34D399;
  background: rgba(52, 211, 153, 0.15);
  padding: 2px 8px;
  border-radius: 6px;
}

/* Camera Bottom Bar */
.camera-bottom-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 14px 20px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85), transparent);
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 20;
}

/* Top Left Logo Overlay (Portrait & Landscape) */
.top-left-logo-overlay {
  position: absolute;
  top: calc(16px + env(safe-area-inset-top, 0px));
  left: calc(16px + env(safe-area-inset-left, 0px));
  z-index: 45;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  padding: 0;
  box-shadow: none;
  backdrop-filter: none;
  pointer-events: none;
}

.top-left-logo-img {
  height: 56px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.65));
}

.action-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-glass-bright);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
  color: #FFFFFF;
}

.action-btn svg { width: 22px; height: 22px; fill: #FFFFFF; }
.action-btn:hover { background: rgba(255, 255, 255, 0.25); transform: scale(1.05); }

.gallery-btn img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.shutter-outer {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 3px solid #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.2s ease;
  box-shadow: 0 0 16px rgba(211, 47, 47, 0.5);
  box-sizing: border-box;
  aspect-ratio: 1 / 1;
  flex-shrink: 0;
}

.shutter-ring {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--primary-red);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.10s ease;
  box-sizing: border-box;
  aspect-ratio: 1 / 1;
}

.shutter-outer:active .shutter-ring { transform: scale(0.88); }

.shutter-outer.disabled {
  opacity: 0.4;
  pointer-events: none;
  box-shadow: none;
}

.shutter-flash {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: #FFFFFF;
  opacity: 0;
  pointer-events: none;
  z-index: 100;
  transition: opacity 0.15s ease;
}

.shutter-flash.active { opacity: 1; }

/* ==========================================================================
   BENTO TILE 2: TELEMETRY
   ========================================================================== */

.bento-card-telemetry {
  grid-column: span 4;
}

.telemetry-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.telemetry-item {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.telemetry-item.full-width { grid-column: span 2; }

.telemetry-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
}

.telemetry-value {
  font-size: 13px;
  font-weight: 700;
  color: #F8FAFC;
}

.telemetry-value.highlight { color: #60A5FA; font-size: 14px; }
.telemetry-value.mono { font-family: var(--font-mono); font-size: 12px; color: #F1F5F9; }

.telemetry-value.badge-green {
  color: #34D399;
}

.telemetry-address-box {
  background: rgba(15, 23, 42, 0.6);
  border: 1px dashed var(--border-glass-bright);
  border-radius: 12px;
  padding: 10px 12px;
  margin-top: 4px;
}

.address-title { font-size: 11px; color: var(--text-muted); font-weight: 700; }
.telemetry-address-box p { font-size: 12px; color: #CBD5E1; line-height: 1.4; margin-top: 2px; }

/* ==========================================================================
   BENTO TILE 3: MINIMAP TILE
   ========================================================================== */

.bento-card-map {
  grid-column: span 4;
}

.bento-map-view {
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 100%;
}

.map-tile-frame {
  position: relative;
  width: 100%;
  height: 150px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border-glass);
  background: #1E293B;
}

.map-tile-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.map-center-pin {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -100%);
  font-size: 24px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

.map-controls-row {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.map-type-pill {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-glass);
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.map-type-pill.active {
  background: var(--primary-red);
  color: #FFFFFF;
  border-color: var(--primary-red);
}

/* ==========================================================================
   BENTO TILE 4: OPERATOR & BRANDING
   ========================================================================== */

.bento-card-operator {
  grid-column: span 4;
}

.operator-profile {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  border-radius: 14px;
  padding: 14px;
}

.operator-avatar {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  overflow: hidden;
  background: #FFFFFF;
  border: 2px solid var(--primary-red);
  flex-shrink: 0;
}

.operator-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.operator-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.operator-info h4 {
  font-size: 14px;
  font-weight: 800;
  color: #FFFFFF;
}

.operator-user-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
}

.user-name { font-weight: 700; color: #F1F5F9; }

/* ==========================================================================
   BENTO TILE 5: RECENT CAPTURES
   ========================================================================== */

.bento-card-gallery-recent {
  grid-column: span 4;
}

.recent-photos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  min-height: 90px;
}

.recent-photo-item {
  width: 100%;
  height: 80px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border-glass);
  cursor: pointer;
  position: relative;
  transition: transform 0.2s ease;
}

.recent-photo-item:hover { transform: scale(1.04); }

.recent-photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.empty-recent-box {
  grid-column: span 3;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 80px;
  border: 1px dashed var(--border-glass);
  border-radius: 10px;
  color: var(--text-muted);
  font-size: 12px;
}

/* ==========================================================================
   SCREEN 2 & 3: GALLERY & SETTINGS (Bento Card Styling)
   ========================================================================== */

.app-top-app-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-glass);
}

.bar-title {
  font-size: 16px;
  font-weight: 800;
  color: #FFFFFF;
}

.bar-actions { display: flex; gap: 8px; }

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  cursor: pointer;
}

.icon-btn svg { width: 20px; height: 20px; fill: currentColor; }

/* Gallery Dropdown Menu */
.dropdown-menu {
  position: absolute;
  top: 60px;
  right: 16px;
  background: rgba(30, 41, 59, 0.95);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass-bright);
  border-radius: 14px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  box-shadow: var(--shadow-lg);
  z-index: 100;
  min-width: 180px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-8px);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.dropdown-menu.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.dropdown-item {
  background: transparent;
  border: none;
  color: #E2E8F0;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background 0.15s ease;
}

.dropdown-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.dropdown-item.danger {
  color: #F87171;
}

.dropdown-item.danger:hover {
  background: rgba(239, 68, 68, 0.15);
}

.gallery-body {
  padding: 20px;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

.gallery-bento-header-card {
  background: var(--bg-card-dark);
  border: 1px solid var(--border-glass);
  border-radius: 16px;
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.header-card-info h2 { font-size: 18px; font-weight: 800; color: #FFFFFF; }
.header-card-info p { font-size: 13px; color: var(--text-muted); }

.gallery-count-badge {
  background: var(--primary-red);
  color: #FFFFFF;
  padding: 6px 14px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 13px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.photo-card {
  background: var(--bg-card-dark);
  border: 1px solid var(--border-glass);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, border-color 0.2s ease;
  cursor: pointer;
}

.photo-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-glass-bright);
}

.photo-card-img-wrap {
  width: 100%;
  height: 180px;
  position: relative;
  background: #000;
}

.photo-card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-card-actions-overlay {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  gap: 6px;
  z-index: 10;
  opacity: 0.9;
  transition: opacity 0.2s ease;
}

.photo-card:hover .photo-card-actions-overlay {
  opacity: 1;
}

.card-action-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  transition: transform 0.15s ease, background 0.15s ease;
}

.card-action-btn:hover {
  transform: scale(1.1);
}

.card-action-btn.download-btn:hover {
  background: var(--primary-red);
  border-color: var(--primary-red);
}

.card-action-btn.delete-btn:hover {
  background: #EF4444;
  border-color: #EF4444;
}

.photo-card-info {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.photo-card-title { font-size: 13px; font-weight: 700; color: #FFFFFF; }
.photo-card-meta { font-size: 11px; color: var(--text-muted); display: flex; justify-content: space-between; }

/* Empty Gallery State */
.empty-gallery {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px 20px;
  margin: 30px auto;
  max-width: 440px;
  background: rgba(30, 41, 59, 0.4);
  border: 1px dashed var(--border-glass-bright);
  border-radius: 20px;
  box-sizing: border-box;
}

.empty-gallery svg {
  width: 64px;
  height: 64px;
  fill: #64748B;
  margin-bottom: 16px;
  opacity: 0.85;
}

.empty-gallery h3 {
  font-size: 16px;
  font-weight: 800;
  color: #FFFFFF;
  margin-bottom: 6px;
}

.empty-gallery p {
  font-size: 13px;
  color: #94A3B8;
  line-height: 1.5;
  margin: 0;
}

/* Filter Chips */
.filter-chip-row {
  display: flex;
  margin-bottom: 16px;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #F87171;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
}

.filter-chip .close {
  cursor: pointer;
  font-size: 14px;
  opacity: 0.8;
  transition: opacity 0.15s ease;
}

.filter-chip .close:hover {
  opacity: 1;
}

/* Floating FAB Camera Button */
.fab-camera {
  position: fixed;
  bottom: 76px;
  right: 20px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--primary-red);
  border: none;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  cursor: pointer;
  z-index: 90;
  transition: transform 0.2s ease, background 0.2s ease;
}

.fab-camera:hover {
  transform: scale(1.06);
  background: #DC2626;
}

.fab-camera svg { width: 26px; height: 26px; fill: #FFFFFF; }

/* Bottom Nav Bar */
.bottom-nav-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 60px;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--border-glass);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 100;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.nav-item svg { width: 22px; height: 22px; fill: currentColor; }
.nav-item.active { color: var(--primary-red); }

.fab-camera {
  position: fixed;
  bottom: 74px;
  right: 20px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--primary-red);
  border: none;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  cursor: pointer;
  z-index: 90;
}

.fab-camera svg { width: 26px; height: 26px; fill: #FFFFFF; }

/* Settings Screen Layout & Bento Cards */
#settings-screen {
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.settings-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  padding-bottom: 30px;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

.settings-bento-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.settings-card {
  background: var(--bg-card-dark);
  border: 1px solid var(--border-glass);
  border-radius: 18px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: var(--shadow-sm);
}

.card-header-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 800;
  color: #FFFFFF;
}

.card-header-bar.red { color: #F87171; }
.card-header-bar.purple { color: #C084FC; }

.header-badge-icon {
  width: 34px; height: 34px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.header-badge-icon.blue { background: rgba(59, 130, 246, 0.2); color: #60A5FA; }
.header-badge-icon.red { background: rgba(239, 68, 68, 0.2); color: #EF4444; }
.header-badge-icon.purple { background: rgba(168, 85, 247, 0.2); color: #C084FC; }
.header-badge-icon svg { width: 18px; height: 18px; fill: currentColor; }

.setting-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.setting-titles { display: flex; flex-direction: column; gap: 2px; }
.setting-title { font-size: 14px; font-weight: 700; color: #FFFFFF; }
.setting-subtitle { font-size: 12px; color: var(--text-muted); }

/* Switch Toggle Styling */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider-toggle {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 24px;
}

.slider-toggle:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 2px;
  bottom: 2px;
  background-color: #FFFFFF;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 50%;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

input:checked + .slider-toggle {
  background-color: var(--primary-red);
  border-color: var(--primary-red);
}

input:checked + .slider-toggle:before {
  transform: translateX(20px);
}

/* Slider Controls */
.setting-slider-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 2px;
  background: rgba(15, 23, 42, 0.4);
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.slider-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.slider-label {
  font-size: 13px;
  font-weight: 600;
  color: #E2E8F0;
}

.slider-badge-val {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 12px;
  background: rgba(168, 85, 247, 0.15);
  color: #C084FC;
  border: 1px solid rgba(168, 85, 247, 0.3);
}

.slider-badge-val.red {
  background: rgba(239, 68, 68, 0.15);
  color: #F87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.styled-slider {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  accent-color: #A855F7;
  cursor: pointer;
}

.styled-slider.red {
  accent-color: var(--primary-red);
}

/* Watermark Info Toggles Group */
.toggle-group-container {
  margin-top: 4px;
  padding-top: 14px;
  border-top: 1px dashed var(--border-glass);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.group-title {
  font-size: 13px;
  font-weight: 700;
  color: #94A3B8;
  margin-bottom: 2px;
}

.setting-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: rgba(15, 23, 42, 0.4);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: background 0.2s ease;
}

.setting-toggle-row:hover {
  background: rgba(15, 23, 42, 0.7);
}

.toggle-row-label {
  font-size: 13px;
  font-weight: 600;
  color: #E2E8F0;
}

/* Logo Picker & Preview Box */
.logo-picker-container {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-glass);
  border-radius: 14px;
}

.logo-preview-box {
  width: 64px;
  height: 64px;
  min-width: 64px;
  min-height: 64px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass-bright);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 6px;
  box-sizing: border-box;
}

.logo-preview-box img,
#setting-logo-preview {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

/* Form Fields Stack */
.form-fields-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 4px;
}

.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label { font-size: 12px; font-weight: 700; color: #94A3B8; text-transform: uppercase; letter-spacing: 0.4px; }
.form-input {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-glass-bright);
  color: #FFFFFF;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input:focus {
  border-color: var(--primary-red);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}

.styled-select {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-glass-bright);
  color: #FFFFFF;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 13px;
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.styled-select:focus {
  border-color: var(--primary-red);
}

.save-button-wrapper {
  position: relative;
  width: 100%;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border-glass-bright);
  padding: 12px 24px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  z-index: 90;
  box-sizing: border-box;
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.5);
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .save-button-wrapper .btn-primary {
    width: 100%;
    justify-content: center;
  }
}

.btn-primary {
  background: var(--primary-red);
  color: #FFFFFF;
  border: none;
  padding: 12px 28px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
  box-shadow: var(--shadow-glow);
  display: flex;
  align-items: center;
  transition: transform 0.15s ease, background 0.2s ease;
}

.btn-primary:hover {
  background: #DC2626;
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-outlined {
  background: transparent;
  border: 1px solid var(--border-glass-bright);
  color: #FFFFFF;
  padding: 8px 16px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.btn-outlined:hover {
  background: rgba(255, 255, 255, 0.08);
}

/* Modals & Toast */
.modal-backdrop {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal-backdrop.active { opacity: 1; pointer-events: auto; }

.modal-card {
  background: #1E293B;
  border: 1px solid var(--border-glass-bright);
  border-radius: 20px;
  padding: 24px;
  width: 90%;
  max-width: 400px;
  box-shadow: var(--shadow-lg);
}

/* PWA Onboarding Modal Styling */
.pwa-modal-card {
  background: #1E293B;
  border: 1px solid var(--border-glass-bright);
  border-radius: 24px;
  padding: 22px;
  width: 92%;
  max-width: 440px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-sizing: border-box;
}

.pwa-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.pwa-app-badge {
  display: flex;
  align-items: center;
  gap: 14px;
}

.pwa-modal-logo {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  padding: 4px;
  object-fit: contain;
  border: 1px solid var(--border-glass);
}

.pwa-badge-text h3 {
  font-size: 17px;
  font-weight: 800;
  color: #FFFFFF;
  margin: 0 0 2px 0;
}

.pwa-badge-text p {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0;
}

.pwa-close-btn {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: #94A3B8;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, color 0.2s ease;
  flex-shrink: 0;
}

.pwa-close-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #FFFFFF;
}

/* OS Segmented Control Tabs */
.pwa-tab-bar {
  display: flex;
  background: rgba(15, 23, 42, 0.7);
  padding: 4px;
  border-radius: 14px;
  border: 1px solid var(--border-glass);
  gap: 4px;
}

.pwa-tab-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: #94A3B8;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pwa-tab-btn svg { width: 18px; height: 18px; fill: currentColor; }

.pwa-tab-btn.active {
  background: var(--bg-card-dark);
  color: #FFFFFF;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-glass-bright);
}

.pwa-tab-content {
  display: none;
  flex-direction: column;
  gap: 16px;
}

.pwa-tab-content.active {
  display: flex;
}

/* Feature List (Android) */
.pwa-feature-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pwa-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: rgba(15, 23, 42, 0.4);
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.feature-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.feature-icon.red { background: rgba(239, 68, 68, 0.15); color: #F87171; }
.feature-icon.blue { background: rgba(59, 130, 246, 0.15); color: #60A5FA; }
.feature-icon svg { width: 20px; height: 20px; fill: currentColor; }

.feature-text strong { display: block; font-size: 13px; color: #FFFFFF; margin-bottom: 2px; }
.feature-text p { font-size: 12px; color: var(--text-muted); margin: 0; line-height: 1.4; }

.pwa-install-action-btn {
  background: var(--primary-red);
  color: #FFFFFF;
  border: none;
  padding: 14px 20px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: var(--shadow-glow);
  transition: transform 0.15s ease, background 0.2s ease;
}

.pwa-install-action-btn:hover {
  background: #DC2626;
  transform: translateY(-1px);
}

/* Tutorial Steps (iOS) */
.ios-tutorial-steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ios-step-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: rgba(15, 23, 42, 0.4);
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.step-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.step-text {
  font-size: 12px;
  color: #E2E8F0;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.step-text strong { color: #FFFFFF; }

.step-icon-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  width: fit-content;
}

.step-icon-badge.blue {
  background: rgba(59, 130, 246, 0.15);
  color: #60A5FA;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.step-icon-badge.red {
  background: rgba(239, 68, 68, 0.15);
  color: #F87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Modal Footer */
.pwa-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px dashed var(--border-glass);
}

.pwa-dont-show-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #94A3B8;
  cursor: pointer;
  user-select: none;
}

.pwa-dont-show-checkbox input {
  accent-color: var(--primary-red);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.pwa-primary-confirm-btn {
  background: rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
  border: 1px solid var(--border-glass-bright);
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease;
}

.pwa-primary-confirm-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.modal-title { font-size: 18px; font-weight: 800; color: #FFFFFF; margin-bottom: 8px; }
.modal-body-text { font-size: 13px; color: var(--text-muted); line-height: 1.5; margin-bottom: 20px; }

.modal-actions { display: flex; gap: 10px; justify-content: flex-end; }
.modal-btn { padding: 10px 18px; border-radius: 10px; font-weight: 700; font-size: 13px; cursor: pointer; border: none; }
.modal-btn.secondary { background: rgba(255, 255, 255, 0.1); color: #FFFFFF; }
.modal-btn.danger { background: #EF4444; color: #FFFFFF; }

.toast-container {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #1E293B;
  color: #FFFFFF;
  border: 1px solid var(--border-glass-bright);
  padding: 10px 20px;
  border-radius: 30px;
  font-size: 13px;
  font-weight: 700;
  box-shadow: var(--shadow-lg);
  z-index: 9999;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.toast-container.active {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

#watermark-canvas { display: none; }

/* ==========================================================================
   RESPONSIVE MEDIA QUERIES FOR MULTI-DEVICE BENTO GRID
   ========================================================================== */

/* Laptop & Desktop (≥ 1024px) */
@media (min-width: 1024px) {
  .bento-card-camera { grid-column: span 8; }
  .bento-card-telemetry { grid-column: span 4; }
  .bento-card-map { grid-column: span 4; }
  .bento-card-operator { grid-column: span 4; }
  .bento-card-gallery-recent { grid-column: span 4; }
  .bottom-nav-bar { display: none; } /* Use desktop top header nav */
}

/* Tablet Layout (768px - 1023px, only for tall screens like iPads) */
@media (min-width: 768px) and (max-width: 1023px) and (min-height: 561px) {
  .bento-grid { grid-template-columns: repeat(6, 1fr); }
  .bento-card-camera { grid-column: span 6; min-height: 400px; }
  .bento-card-telemetry { grid-column: span 3; }
  .bento-card-map { grid-column: span 3; }
  .bento-card-operator { grid-column: span 3; }
  .bento-card-gallery-recent { grid-column: span 3; }
  .settings-bento-grid { grid-template-columns: repeat(1, 1fr); }
  .bottom-nav-bar { display: none; }
}

/* Mobile Devices (< 767px) & Short Landscape Phones (≤ 560px height) */
@media (max-width: 767px), (max-height: 560px) {
  .bento-dashboard-container { padding: 0; gap: 0; height: 100vh; height: 100dvh; overflow: hidden; }
  .bento-header-bar { display: none !important; } /* Mobile uses camera overlay */
  .bento-grid { display: flex; flex-direction: column; height: 100%; gap: 0; }
  
  .bento-card-camera {
    width: 100%; height: 100%; min-height: 0 !important; border-radius: 0; border: none; flex: 1; position: relative;
  }

  .camera-container {
    min-height: 0 !important;
    height: 100% !important;
  }

  .bento-card-telemetry,
  .bento-card-map,
  .bento-card-operator,
  .bento-card-gallery-recent {
    display: none !important; /* Hidden on mobile camera screen to keep clean viewfinder */
  }

  .settings-bento-grid { grid-template-columns: 1fr; }
  .settings-body { padding: 16px 16px 90px 16px; }
  .gallery-body { padding: 16px 16px 90px 16px; }
  .save-button-wrapper { justify-content: stretch; }
  .save-button-wrapper .btn-primary { width: 100%; justify-content: center; padding: 14px 20px; font-size: 15px; }
  .bottom-nav-bar { display: flex; }
}

/* ==========================================================================
   SHORT HEIGHT & LANDSCAPE ADAPTATIONS (CAMERA UI & MODALS)
   ========================================================================== */

@media (max-height: 560px), (orientation: landscape) {
  .modal-backdrop {
    padding: 10px;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
  }

  .modal-card,
  .pwa-modal-card {
    max-height: 90vh;
    overflow-y: auto;
    padding: 14px 18px;
    gap: 10px;
    border-radius: 18px;
    box-sizing: border-box;
  }

  .modal-card::-webkit-scrollbar,
  .pwa-modal-card::-webkit-scrollbar {
    width: 4px;
  }
  .modal-card::-webkit-scrollbar-thumb,
  .pwa-modal-card::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
  }

  .pwa-modal-logo {
    width: 38px;
    height: 38px;
    border-radius: 10px;
  }

  .pwa-badge-text h3 {
    font-size: 15px;
  }

  .pwa-badge-text p {
    font-size: 11px;
  }

  .pwa-tab-btn {
    padding: 8px 10px;
    font-size: 12px;
  }

  .pwa-feature-item,
  .ios-step-item {
    padding: 8px 10px;
    gap: 8px;
  }

  .feature-icon {
    width: 28px;
    height: 28px;
  }

  .feature-icon svg {
    width: 16px;
    height: 16px;
  }

  .step-num {
    width: 22px;
    height: 22px;
    font-size: 11px;
  }

  .pwa-install-action-btn {
    padding: 10px 16px;
    font-size: 13px;
    border-radius: 10px;
  }

  .pwa-modal-footer {
    padding-top: 8px;
  }

  .pwa-dont-show-checkbox {
    font-size: 11px;
  }

  .pwa-primary-confirm-btn {
    padding: 6px 12px;
    font-size: 12px;
  }
}

/* Smartphone Landscape Camera Viewfinder & Control Adaptations */
@media (orientation: landscape) and (max-height: 560px) {
  .camera-bottom-bar {
    position: fixed !important;
    right: calc(16px + env(safe-area-inset-right, 0px)) !important;
    top: 50% !important;
    bottom: auto !important;
    left: auto !important;
    transform: translateY(-50%) !important;
    flex-direction: column !important;
    width: 60px !important;
    height: auto !important;
    padding: 10px 6px !important;
    gap: 8px !important;
    background: rgba(15, 23, 42, 0.85) !important;
    backdrop-filter: blur(16px) !important;
    border-radius: 30px !important;
    border: 1px solid var(--border-glass-bright) !important;
    z-index: 100 !important;
    align-items: center !important;
    box-sizing: border-box !important;
  }

  .camera-tools-group {
    flex-direction: column !important;
    gap: 8px !important;
    align-items: center !important;
  }

  .shutter-outer {
    width: 48px !important;
    height: 48px !important;
    min-width: 48px !important;
    min-height: 48px !important;
    max-width: 48px !important;
    max-height: 48px !important;
    aspect-ratio: 1 / 1 !important;
    flex-shrink: 0 !important;
    border-radius: 50% !important;
    box-sizing: border-box !important;
  }

  .action-btn {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    min-height: 38px !important;
    max-width: 38px !important;
    max-height: 38px !important;
    aspect-ratio: 1 / 1 !important;
    flex-shrink: 0 !important;
    border-radius: 50% !important;
    box-sizing: border-box !important;
  }

  .action-btn svg {
    width: 18px !important;
    height: 18px !important;
  }

  .watermark-overlay-container {
    position: absolute !important;
    bottom: calc(14px + env(safe-area-inset-bottom, 0px)) !important;
    left: 50% !important;
    right: auto !important;
    top: auto !important;
    transform: translateX(-50%) !important;
    max-width: calc(100vw - 150px) !important;
    z-index: 40 !important;
    box-sizing: border-box !important;
    pointer-events: none !important;
  }

  .simple-live-card {
    padding: 6px 12px !important;
    border-radius: 12px !important;
    gap: 4px !important;
    background: rgba(17, 17, 17, 0.92) !important;
    max-width: 420px !important;
    margin: 0 auto !important;
  }

  .simple-pin-icon svg {
    width: 16px !important;
    height: 18px !important;
  }

  .simple-kec-text {
    font-size: 10.5px !important;
  }

  .simple-kab-text {
    font-size: 9.5px !important;
  }

  .simple-card-divider {
    margin: 3px 0 !important;
  }

  .simple-coord-item {
    font-size: 9.5px !important;
  }

  .simple-coord-item svg {
    width: 13px !important;
    height: 13px !important;
  }

  .simple-accuracy {
    font-size: 9px !important;
    padding: 2px 6px !important;
  }

  .top-left-logo-overlay {
    top: calc(12px + env(safe-area-inset-top, 0px)) !important;
    left: calc(16px + env(safe-area-inset-left, 0px)) !important;
  }

  .top-left-logo-img {
    height: 38px !important;
  }

  #camera-screen .bottom-nav-bar {
    display: none !important;
  }

  .settings-bento-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)) !important;
  }
}
