/* ==========================================================================
   Nexora Celeste OS - Complete Desktop Design System
   Aesthetic: Cute Pastel Velvet & Rose Gold macOS-inspired Desktop Experience
   Features: Glassmorphic Windows, Draggable/Maximizable Window Manager,
             Curved Bottom Dock, Top Menu Bar, Live Multi-Cursor Presence,
             Wallpaper Engine & Shared Sticky Notes
   Strict Typography: Headings (16-18px), Subheadings (14px), Body (12px)
   ========================================================================== */

/* =================================================================
   1. RESET & BASE
================================================================= */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  user-select: none;
}

input, textarea, p, span, div.selectable {
  user-select: text;
}

html, body {
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 12px;
  color: #fce7f3;
  -webkit-font-smoothing: antialiased;
}

::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 133, 161, 0.35);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 133, 161, 0.6);
}

/* =================================================================
   2. THEME TOKENS
================================================================= */
:root {
  --primary-pink: #ff85a1;
  --soft-pink: #fbb1bd;
  --rose-gold: #e8a598;
  --velvet-dark: #12091f;
  --glass-bg: rgba(22, 12, 36, 0.78);
  --glass-card: rgba(35, 18, 55, 0.65);
  --glass-border: rgba(255, 133, 161, 0.22);
  --glass-border-hi: rgba(255, 133, 161, 0.45);
  --glow-pink: 0 8px 32px rgba(255, 133, 161, 0.25);
  --dock-bg: rgba(26, 12, 42, 0.75);
  --menubar-bg: rgba(18, 9, 30, 0.85);
  --text-main: #fce7f3;
  --text-muted: #d4b2c4;
  --green: #a9e34b;
  --amber: #ffd166;
  --red: #ff6b6b;
  --blue: #38bdf8;
}

/* Typography Rules */
h1, .h1-title { font-size: 18px !important; font-weight: 700; }
h2, .h2-title, .win-title { font-size: 16px !important; font-weight: 600; }
h3, h4, .subheading, .app-name { font-size: 14px !important; font-weight: 500; }
p, span, label, button, input, textarea { font-size: 12px; }

/* =================================================================
   3. STEALTH LOGIN & GREETING VIEWS (Outer Layer)
================================================================= */
.view {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.view.active {
  display: flex;
}

#view-login {
  background: #050810;
  color: #e2e8f0;
  font-family: 'Inter', sans-serif;
}
#view-login::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 48px 48px;
}

.lcard {
  width: 380px;
  background: #070c18;
  border: 1px solid rgba(99, 179, 237, 0.18);
  border-radius: 6px;
  padding: 28px 24px;
  box-shadow: 0 25px 60px rgba(0,0,0,0.8), 0 0 30px rgba(59, 130, 246, 0.1);
  position: relative;
  z-index: 1;
}
.lcard::before {
  content: '';
  position: absolute;
  top: 0; left: 10%; right: 10%; height: 1px;
  background: linear-gradient(90deg, transparent, #3b82f6, transparent);
}
.brand { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.bicon { width: 30px; height: 30px; background: rgba(59,130,246,0.1); border: 1px solid rgba(59,130,246,0.3); border-radius: 4px; display: flex; align-items: center; justify-content: center; }
.bname { font-family: 'Orbitron', monospace; font-size: 11px; font-weight: 700; letter-spacing: 2.5px; color: #fff; }
.bsub { font-size: 9px; color: #64748b; }
.spill { margin-left: auto; font-family: 'Orbitron', monospace; font-size: 9px; color: #22c55e; border: 1px solid rgba(34,197,94,0.3); padding: 2px 7px; border-radius: 3px; }

.fld { margin-bottom: 14px; text-align: left; }
.flbl { display: block; font-size: 11px; color: #94a3b8; margin-bottom: 5px; }
.fwrap { position: relative; }
.fpfx { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: #64748b; font-size: 11px; pointer-events: none; }
.finp {
  width: 100%;
  padding: 9px 10px 9px 30px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(99, 179, 237, 0.15);
  border-radius: 4px;
  color: #fff;
  font-size: 12px;
  outline: none;
  transition: all 0.2s;
}
.finp:focus {
  border-color: #3b82f6;
  background: rgba(59, 130, 246, 0.08);
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.2);
}
.rem-row { display: flex; align-items: center; gap: 7px; margin-bottom: 14px; }
.rem-row label { font-size: 11px; color: #94a3b8; cursor: pointer; }
.bsub-btn {
  width: 100%;
  padding: 10px;
  background: #3b82f6;
  border: none;
  border-radius: 4px;
  color: #fff;
  font-family: 'Orbitron', monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s;
}
.bsub-btn:hover { box-shadow: 0 4px 18px rgba(59, 130, 246, 0.4); transform: translateY(-1px); }
#err-bar { display: none; margin-top: 10px; background: rgba(239, 68, 68, 0.1); border: 1px solid rgba(239, 68, 68, 0.3); border-radius: 4px; padding: 7px 10px; font-size: 11px; color: #f87171; align-items: center; gap: 6px; }

/* Jarvis Greeting Screen */
#view-greet {
  background: radial-gradient(circle at center, #1b0e2b 0%, #090312 100%);
}
.greet-card {
  width: 100%;
  max-width: 600px;
  background: rgba(25, 12, 38, 0.85);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid rgba(255, 133, 161, 0.25);
  border-radius: 8px;
  padding: 32px 34px;
  box-shadow: 0 25px 60px rgba(0,0,0,0.7), var(--glow-pink);
  text-align: left;
}
.ai-id { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.ai-tag { font-family: 'Orbitron', monospace; font-size: 9px; letter-spacing: 2px; color: var(--primary-pink); }
.ai-line { flex: 1; height: 1px; background: linear-gradient(90deg, var(--primary-pink), transparent); opacity: 0.4; }
.ai-pill { font-family: 'Orbitron', monospace; font-size: 9px; color: var(--green); border: 1px solid rgba(169, 227, 75, 0.3); padding: 2px 7px; border-radius: 3px; }
.g-meta { font-size: 12px; color: var(--text-muted); margin-bottom: 4px; }
.g-name {
  font-family: 'Orbitron', monospace;
  font-size: 28px;
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 18px;
  background: linear-gradient(135deg, #ff85a1, #ffd6e0, #e8a598);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.aibox { background: rgba(255, 133, 161, 0.08); border: 1px solid rgba(255, 133, 161, 0.2); border-radius: 4px; padding: 14px 16px; margin-bottom: 20px; }
.ailbl { font-family: 'Orbitron', monospace; font-size: 9px; color: var(--primary-pink); letter-spacing: 1.5px; margin-bottom: 8px; }
#ai-text { font-size: 12px; color: var(--text-main); line-height: 1.8; min-height: 38px; }
.tcur { display: inline-block; width: 2px; height: 12px; background: var(--primary-pink); margin-left: 2px; vertical-align: middle; animation: blink 0.75s step-end infinite; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

.acts { display: flex; gap: 12px; }
.btn-enter {
  flex: 1;
  padding: 12px;
  background: linear-gradient(135deg, #ff758c 0%, #ff7eb3 100%);
  border: none;
  border-radius: 4px;
  color: #fff;
  font-family: 'Orbitron', monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(255, 117, 140, 0.4);
  transition: all 0.2s;
}
.btn-enter:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(255, 117, 140, 0.6); }

/* =================================================================
   4. CELESTE OS DESKTOP
================================================================= */
#desktop {
  position: fixed;
  inset: 0;
  display: none;
  flex-direction: column;
  z-index: 100;
  overflow: hidden;
  background-color: #0d0617;
}
#desktop.active {
  display: flex;
}

/* Wallpaper Layer */
#desktop-wallpaper {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: background-image 0.6s ease, filter 0.5s ease;
  z-index: 0;
}

/* Floating Particles Canvas */
#particles-canvas {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

/* Confetti Celebration Canvas */
#confetti-canvas {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2000;
}

/* Shared Multi-Cursor Overlay */
#cursor-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1500;
}
.remote-cursor {
  position: absolute;
  pointer-events: none;
  transition: transform 0.08s ease-out;
  transform: translate(-2px, -2px);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  z-index: 1500;
}
.cursor-pointer-svg {
  filter: drop-shadow(0 2px 5px rgba(0,0,0,0.5));
}
.cursor-nametag {
  margin-top: 2px;
  margin-left: 12px;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  box-shadow: 0 3px 10px rgba(0,0,0,0.4);
}
.remote-cursor.aryan .cursor-nametag { background: linear-gradient(135deg, #0284c7, #38bdf8); }
.remote-cursor.virti .cursor-nametag { background: linear-gradient(135deg, #ec4899, #f472b6); }

/* =================================================================
   5. TOP MENU BAR (Mac / Celeste Style)
================================================================= */
#menubar {
  height: 32px;
  background: var(--menubar-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 1000;
  position: relative;
  flex-shrink: 0;
}

.menu-left, .menu-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.os-logo-btn {
  background: transparent;
  border: none;
  color: var(--primary-pink);
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: transform 0.2s;
}
.os-logo-btn:hover { transform: scale(1.15); }

.menu-item {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-main);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s;
}
.menu-item:hover { background: rgba(255, 133, 161, 0.15); }

.presence-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 2px 9px;
  font-size: 10px;
  font-weight: 500;
  color: var(--green);
  white-space: nowrap;
  flex-shrink: 0;
}
.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 6px var(--green);
  animation: pulseDot 2s infinite;
}
@keyframes pulseDot { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

.menu-clock {
  font-family: 'Orbitron', monospace;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--text-main);
}

.menu-btn-lock {
  background: rgba(255, 107, 107, 0.15);
  border: 1px solid rgba(255, 107, 107, 0.35);
  color: #ff8787;
  padding: 3px 9px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.menu-btn-lock:hover {
  background: rgba(255, 107, 107, 0.3);
  color: #fff;
}

/* =================================================================
   6. DESKTOP WORKSPACE & ICONS
================================================================= */
#workspace {
  flex: 1;
  position: relative;
  overflow: hidden;
  padding: 20px;
}

.desktop-icons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, 86px);
  grid-auto-flow: column;
  grid-template-rows: repeat(auto-fill, 96px);
  gap: 16px;
  width: max-content;
  position: relative;
  z-index: 10;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}

.desktop-icon {
  width: 86px;
  height: 94px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 8px;
  cursor: pointer;
  background: transparent;
  border: 1px solid transparent;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.desktop-icon:hover {
  background: rgba(255, 133, 161, 0.15);
  border-color: rgba(255, 133, 161, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.3);
}
.desktop-icon:active {
  transform: scale(0.96);
}

.icon-img-box {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--glass-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border-hi);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.desktop-icon:hover .icon-img-box {
  transform: scale(1.1);
}
.icon-label {
  font-size: 11px;
  font-weight: 500;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8), 0 2px 8px rgba(0, 0, 0, 0.6);
  text-align: center;
  max-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* =================================================================
   7. WINDOW MANAGER (Movable, Resizable, Fullscreen)
================================================================= */
.os-window {
  position: absolute;
  min-width: 320px;
  min-height: 220px;
  background: var(--glass-bg);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid var(--glass-border-hi);
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), var(--glow-pink);
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 100;
  transition: box-shadow 0.2s, transform 0.15s ease-out;
}
.os-window.active-win {
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.75), 0 0 35px rgba(255, 133, 161, 0.35);
  border-color: rgba(255, 133, 161, 0.6);
  z-index: 500;
}
.os-window.fullscreen {
  inset: 10px !important;
  width: calc(100% - 20px) !important;
  height: calc(100% - 85px) !important;
  transform: none !important;
  border-radius: 10px;
}
.os-window.minimized {
  display: none !important;
}

/* Window Titlebar */
.win-header {
  height: 38px;
  background: rgba(30, 15, 48, 0.75);
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  cursor: grab;
  flex-shrink: 0;
}
.win-header:active {
  cursor: grabbing;
}

.win-controls {
  display: flex;
  align-items: center;
  gap: 7px;
}
.win-btn {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  color: transparent;
  transition: all 0.2s;
}
.win-controls:hover .win-btn {
  color: rgba(0, 0, 0, 0.6);
}
.win-btn.close { background: #ff5f56; }
.win-btn.close:hover { background: #e0443e; }
.win-btn.min { background: #ffbd2e; }
.win-btn.min:hover { background: #dea123; }
.win-btn.max { background: #27c93f; }
.win-btn.max:hover { background: #1aab29; }

.win-title {
  font-size: 13px !important;
  font-weight: 600;
  color: var(--text-main);
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.win-header-right {
  width: 48px; /* balancing spacer */
}

/* Window Content Body */
.win-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  color: var(--text-main);
}

/* =================================================================
   8. SPECIFIC APPS INSIDE WINDOWS
================================================================= */

/* 💌 Special Letter App */
.letter-box {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  padding: 18px 20px;
  margin-bottom: 16px;
  line-height: 1.8;
  font-size: 13px;
  color: #fff;
}
.shayari-card {
  background: linear-gradient(135deg, rgba(255, 133, 161, 0.12), rgba(232, 165, 152, 0.08));
  border-left: 4px solid var(--primary-pink);
  border-radius: 0 8px 8px 0;
  padding: 16px 20px;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 14px;
  line-height: 1.9;
  font-style: italic;
  color: #fff;
  margin-bottom: 16px;
  box-shadow: inset 0 0 15px rgba(255, 133, 161, 0.05);
}
.btn-cute {
  padding: 8px 18px;
  background: linear-gradient(135deg, #ff758c, #ff7eb3);
  border: none;
  border-radius: 20px;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(255, 117, 140, 0.4);
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-cute:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(255, 117, 140, 0.6);
}

/* 🧮 Math Lab App */
.math-card {
  background: rgba(0, 0, 0, 0.25);
  border: 1px dashed var(--glass-border-hi);
  border-radius: 8px;
  padding: 20px;
  text-align: center;
}
.math-equation {
  font-family: 'Orbitron', monospace;
  font-size: 18px;
  font-weight: 700;
  color: var(--amber);
  margin-bottom: 14px;
}

/* 🍫 Sweet Cafe Treats App */
.treats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.treat-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  padding: 14px;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s;
}
.treat-card:hover {
  background: rgba(255, 133, 161, 0.15);
  border-color: var(--primary-pink);
  transform: translateY(-3px);
  box-shadow: var(--glow-pink);
}
.treat-emoji { font-size: 28px; margin-bottom: 6px; }
.treat-name { font-weight: 600; font-size: 12px; }
#treat-message {
  padding: 12px;
  background: rgba(255, 209, 102, 0.1);
  border: 1px solid rgba(255, 209, 102, 0.3);
  border-radius: 6px;
  color: var(--amber);
  text-align: center;
  font-weight: 500;
  min-height: 42px;
}

/* 🎵 Cute Jukebox App */
.jukebox-box {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.vinyl-disc {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: repeating-radial-gradient(#181224, #181224 4px, #261c38 5px, #261c38 8px);
  border: 2px solid var(--primary-pink);
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
}
.vinyl-disc.playing {
  animation: spinVinyl 6s linear infinite;
}
@keyframes spinVinyl { 100% { transform: rotate(360deg); } }
.vinyl-center {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff758c, #ff7eb3);
}

/* 🖼️ Memory Gallery App */
.gallery-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.gallery-os-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}
.gallery-os-item {
  position: relative;
  height: 150px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--glass-border);
  background: #000;
  box-shadow: 0 4px 15px rgba(0,0,0,0.4);
}
.gallery-os-item img, .gallery-os-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}
.gallery-os-item:hover img {
  transform: scale(1.05);
}
.gallery-os-ovl {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 60%);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 8px 10px;
  opacity: 0;
  transition: opacity 0.2s;
}
.gallery-os-item:hover .gallery-os-ovl { opacity: 1; }
.gal-title { font-size: 11px; font-weight: 500; color: #fff; text-shadow: 0 1px 3px #000; }

/* ⏳ Time Capsule App */
.capsule-os-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  padding: 16px 18px;
  margin-bottom: 12px;
}

/* 📝 Shared Sticky Notes App */
.notes-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 100%;
}
.shared-note-editor {
  width: 100%;
  height: 180px;
  background: rgba(255, 240, 245, 0.08);
  border: 1px solid rgba(255, 133, 161, 0.3);
  border-radius: 8px;
  padding: 14px;
  color: #fff;
  font-family: 'Poppins', sans-serif;
  font-size: 12px;
  line-height: 1.7;
  resize: vertical;
  outline: none;
}
.shared-note-editor:focus {
  border-color: var(--primary-pink);
  box-shadow: 0 0 15px rgba(255, 133, 161, 0.2);
}

/* 🎨 Wallpaper Studio App */
.wallpapers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.wallpaper-thumb {
  height: 85px;
  border-radius: 8px;
  background-size: cover;
  background-position: center;
  border: 2px solid transparent;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  transition: all 0.2s;
}
.wallpaper-thumb:hover {
  transform: scale(1.05);
  box-shadow: var(--glow-pink);
}
.wallpaper-thumb.active {
  border-color: var(--primary-pink);
  box-shadow: 0 0 15px var(--primary-pink);
}
.wallpaper-thumb-label {
  position: absolute;
  bottom: 0;
  inset-inline: 0;
  background: rgba(0, 0, 0, 0.6);
  font-size: 10px;
  font-weight: 500;
  text-align: center;
  padding: 2px;
  color: #fff;
}

/* =================================================================
   9. FLOATING BOTTOM DOCK (macOS Style)
================================================================= */
#dock-container {
  position: absolute;
  bottom: 12px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  pointer-events: none;
  z-index: 1000;
}

#dock {
  pointer-events: auto;
  background: var(--dock-bg);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid var(--glass-border-hi);
  border-radius: 20px;
  padding: 6px 14px;
  display: flex;
  align-items: flex-end;
  gap: 12px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5), var(--glow-pink);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.dock-item {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  cursor: pointer;
  position: relative;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.2s;
}
.dock-item:hover {
  transform: translateY(-8px) scale(1.18);
  background: rgba(255, 133, 161, 0.25);
  border-color: var(--primary-pink);
}
.dock-item.running::after {
  content: '';
  position: absolute;
  bottom: -4px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--primary-pink);
  box-shadow: 0 0 6px var(--primary-pink);
}

/* Dock Tooltip */
.dock-tooltip {
  position: absolute;
  top: -30px;
  background: rgba(20, 10, 32, 0.9);
  border: 1px solid var(--glass-border);
  color: #fff;
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 500;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  transition: all 0.2s;
}
.dock-item:hover .dock-tooltip {
  opacity: 1;
  transform: translateY(0);
}

/* Separator in Dock */
.dock-divider {
  width: 1px;
  height: 30px;
  background: var(--glass-border);
  margin: 0 2px;
  align-self: center;
}

/* =================================================================
   10. 📹 DUO VIDEO CALL & LIVE CHAT APP
================================================================= */
.call-container {
  display: flex;
  height: 100%;
  gap: 16px;
  min-height: 380px;
}

/* Left: Video Area */
.video-area {
  flex: 1.2;
  display: flex;
  flex-direction: column;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  min-height: 280px;
}

.remote-video-container {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  overflow: hidden;
}

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

.remote-placeholder {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  text-align: center;
  padding: 20px;
}
.peer-avatar {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(255, 133, 161, 0.3), rgba(56, 189, 248, 0.3));
  border: 2px solid var(--glass-border-hi);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  animation: pulseAvatar 2.5s infinite;
}
@keyframes pulseAvatar {
  0%, 100% { transform: scale(1); box-shadow: 0 0 15px rgba(255, 133, 161, 0.3); }
  50% { transform: scale(1.08); box-shadow: 0 0 25px rgba(255, 133, 161, 0.6); }
}

.local-video-container {
  position: absolute;
  bottom: 60px;
  right: 12px;
  width: 110px;
  height: 80px;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid var(--primary-pink);
  background: #111;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.6);
  z-index: 10;
}
#local-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1); /* mirror preview */
}

/* Call Control Action Bar */
.call-controls {
  height: 52px;
  background: rgba(18, 9, 30, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 12px;
  flex-shrink: 0;
}

.call-ctrl-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}
.call-ctrl-btn:hover {
  background: rgba(255, 133, 161, 0.25);
  border-color: var(--primary-pink);
  transform: scale(1.08);
}
.call-ctrl-btn.active-off {
  background: rgba(239, 68, 68, 0.3);
  border-color: #ef4444;
  color: #ff8787;
}

.call-btn-action {
  padding: 8px 18px;
  border-radius: 20px;
  border: none;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #fff;
  transition: all 0.2s;
}
.call-btn-action.start {
  background: linear-gradient(135deg, #10b981, #059669);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
}
.call-btn-action.start:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.6);
}
.call-btn-action.end {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.4);
  display: none;
}
.call-btn-action.end:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(239, 68, 68, 0.6);
}

/* Right: Chat Area */
.chat-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: rgba(22, 12, 36, 0.6);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  overflow: hidden;
}

.chat-header {
  padding: 10px 14px;
  background: rgba(30, 15, 48, 0.7);
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 600;
}

.chat-messages-container {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
}

.chat-msg {
  max-width: 82%;
  display: flex;
  flex-direction: column;
  animation: fadeUp 0.2s ease;
}
.chat-msg.mine {
  align-self: flex-end;
  align-items: flex-end;
}
.chat-msg.theirs {
  align-self: flex-start;
  align-items: flex-start;
}

.chat-bubble {
  padding: 8px 13px;
  border-radius: 12px;
  font-size: 12px;
  line-height: 1.5;
  word-break: break-word;
}
.chat-msg.mine .chat-bubble {
  background: linear-gradient(135deg, #ff758c, #ff7eb3);
  color: #fff;
  border-bottom-right-radius: 3px;
  box-shadow: 0 3px 12px rgba(255, 117, 140, 0.35);
}
.chat-msg.theirs .chat-bubble {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--glass-border);
  color: #fce7f3;
  border-bottom-left-radius: 3px;
}

.chat-meta {
  font-size: 9px;
  color: var(--text-muted);
  margin-top: 3px;
  padding: 0 4px;
}

.chat-input-bar {
  padding: 10px 12px;
  background: rgba(18, 9, 30, 0.85);
  border-top: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
}

.quick-emojis {
  display: flex;
  gap: 6px;
}
.quick-emoji-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  font-size: 12px;
  padding: 2px 7px;
  cursor: pointer;
  transition: all 0.2s;
}
.quick-emoji-btn:hover {
  background: rgba(255, 133, 161, 0.2);
  transform: scale(1.15);
}

.chat-form {
  display: flex;
  gap: 8px;
}
.chat-input {
  flex: 1;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  color: #fff;
  font-size: 12px;
  outline: none;
  font-family: inherit;
}
.chat-input:focus {
  border-color: var(--primary-pink);
  box-shadow: 0 0 10px rgba(255, 133, 161, 0.2);
}

/* =================================================================
   9.5 MULTI-NOTEBOOK TABS & SEPARATE NOTES
================================================================= */
.notes-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--glass-border);
  padding-bottom: 8px;
  overflow-x: auto;
}
.notes-tab-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  padding: 5px 12px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: inherit;
}
.notes-tab-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}
.notes-tab-btn.active {
  background: linear-gradient(135deg, rgba(255, 117, 140, 0.28), rgba(255, 126, 179, 0.28));
  border-color: var(--primary-pink);
  color: #fff;
  box-shadow: 0 2px 8px rgba(255, 117, 140, 0.2);
}

/* =================================================================
   9.6 PREFERENCES & SYNC SETTINGS WINDOW
================================================================= */
.settings-section {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 14px;
}
.settings-section-title {
  font-size: 12px;
  font-weight: 700;
  color: #fce7f3;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.settings-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  gap: 12px;
}
.settings-row:last-child {
  border-bottom: none;
}
.settings-label {
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 2px;
}
.settings-desc {
  font-size: 10px;
  color: var(--text-muted);
  line-height: 1.35;
}

/* iOS / macOS Style Toggle Switches */
.switch-control {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}
.switch-control input {
  opacity: 0;
  width: 0;
  height: 0;
}
.switch-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: rgba(255, 255, 255, 0.14);
  transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 24px;
  border: 1px solid var(--glass-border);
}
.switch-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 2px;
  bottom: 2px;
  background-color: #fff;
  transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}
.switch-control input:checked + .switch-slider {
  background: linear-gradient(135deg, #ff758c, #ff7eb3);
  border-color: #ff758c;
  box-shadow: 0 0 10px rgba(255, 117, 140, 0.35);
}
.switch-control input:checked + .switch-slider:before {
  transform: translateX(20px);
}

.settings-info-box {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 11px;
}
.settings-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.info-dim {
  color: var(--text-muted);
}

/* =================================================================
   9.7 TOAST NOTIFICATIONS
================================================================= */
#toast-container {
  position: fixed;
  top: 42px;
  right: 18px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.os-toast {
  pointer-events: auto;
  background: rgba(28, 14, 44, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-left: 3px solid var(--primary-pink);
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 11px;
  color: #fff;
  box-shadow: 0 8px 24px rgba(0,0,0,0.45);
  display: flex;
  align-items: center;
  gap: 8px;
  animation: toastSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1), toastFadeOut 0.35s ease 3.4s forwards;
  max-width: 320px;
}
@keyframes toastSlideIn {
  from { opacity: 0; transform: translateX(25px) scale(0.96); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}
@keyframes toastFadeOut {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-8px); }
}

/* =================================================================
   9.8 DUO CALL & CHAT LAYOUT SWITCHER
================================================================= */
.duo-layout-bar {
  display: flex;
  gap: 6px;
  background: rgba(18, 9, 30, 0.85);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 3px 6px;
  margin-bottom: 8px;
  align-self: center;
}
.duo-layout-btn {
  background: transparent;
  border: none;
  border-radius: 14px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}
.duo-layout-btn:hover {
  color: #fff;
}
.duo-layout-btn.active {
  background: linear-gradient(135deg, #ff758c, #ff7eb3);
  color: #fff;
  box-shadow: 0 2px 8px rgba(255, 117, 140, 0.35);
}

.call-container.mode-video-only .chat-area {
  display: none !important;
}
.call-container.mode-video-only .video-area {
  flex: 1 1 100% !important;
  height: 100% !important;
}
.call-container.mode-chat-only .video-area {
  display: none !important;
}
.call-container.mode-chat-only .chat-area {
  flex: 1 1 100% !important;
  height: 100% !important;
}

/* =================================================================
   9.9 GALLERY ALBUM TABS & LIGHTBOX PHOTO VIEWER
================================================================= */
.gallery-tabs-bar {
  display: flex;
  gap: 6px;
  border-bottom: 1px solid var(--glass-border);
  padding-bottom: 8px;
  overflow-x: auto;
}
.gallery-tab-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  padding: 5px 12px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
  font-family: inherit;
}
.gallery-tab-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}
.gallery-tab-btn.active {
  background: linear-gradient(135deg, rgba(255, 117, 140, 0.3), rgba(255, 126, 179, 0.3));
  border-color: var(--primary-pink);
  color: #fff;
}

.gallery-card-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(18, 9, 30, 0.75);
  backdrop-filter: blur(6px);
  border: 1px solid var(--glass-border);
  border-radius: 6px;
  padding: 2px 6px;
  font-size: 9px;
  font-weight: 600;
  color: #fce7f3;
  z-index: 2;
}

/* Lightbox Modal */
.lightbox-container {
  width: 90vw;
  max-width: 940px;
  height: 86vh;
  background: rgba(22, 10, 36, 0.95);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.65);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}
.lightbox-header {
  height: 48px;
  padding: 0 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--glass-border);
  background: rgba(15, 6, 26, 0.85);
  flex-shrink: 0;
}
.lb-tag {
  background: rgba(255, 117, 140, 0.2);
  border: 1px solid var(--primary-pink);
  border-radius: 10px;
  padding: 1px 8px;
  font-size: 10px;
  color: #fce7f3;
}
.lightbox-body {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  position: relative;
  overflow: hidden;
}
.lb-media-wrap {
  flex: 1;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lb-media-wrap img, .lb-media-wrap video {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  animation: fadeUp 0.25s ease;
}
.lb-nav-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  z-index: 10;
  flex-shrink: 0;
}
.lb-nav-btn:hover {
  background: var(--primary-pink);
  transform: scale(1.1);
}
.lightbox-footer {
  height: 36px;
  padding: 0 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--glass-border);
  background: rgba(15, 6, 26, 0.85);
  flex-shrink: 0;
}

/* =================================================================
   9.10 🎬 CELESTE VLC CINEMA PLAYER
================================================================= */
.vlc-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 10px;
  background: rgba(25, 12, 40, 0.85);
  border-radius: 8px;
  margin-bottom: 8px;
  border: 1px solid var(--glass-border);
}
.vlc-sync-badge {
  background: rgba(169, 227, 75, 0.15);
  border: 1px solid var(--green);
  border-radius: 10px;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 600;
  color: var(--green);
}
.vlc-screen-container {
  flex: 1;
  min-height: 200px;
  background: #000;
  border-radius: 8px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.vlc-screen-container video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.vlc-screen-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
  cursor: pointer;
}
.vlc-screen-container:hover .vlc-screen-overlay {
  opacity: 1;
}
.vlc-center-play-btn {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: rgba(249, 115, 22, 0.9);
  border: 2px solid #fff;
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px rgba(249, 115, 22, 0.6);
  transition: transform 0.2s;
}
.vlc-center-play-btn:hover {
  transform: scale(1.15);
}
.vlc-subtitle-display {
  position: absolute;
  bottom: 24px;
  left: 20px;
  right: 20px;
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0,0,0,0.9), 0 0 6px #000;
  pointer-events: none;
  min-height: 22px;
}

.vlc-scrub-wrap {
  margin-top: 8px;
}
.vlc-time-row {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 2px;
}
.vlc-hud {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  background: rgba(20, 10, 32, 0.9);
  border-radius: 8px;
  border: 1px solid var(--glass-border);
  margin-top: 6px;
  flex-wrap: wrap;
  gap: 8px;
}
.vlc-hud-left, .vlc-hud-right {
  display: flex;
  align-items: center;
  gap: 6px;
}
.vlc-ctrl-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--glass-border);
  border-radius: 6px;
  color: #fff;
  padding: 5px 9px;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s;
}
.vlc-ctrl-btn:hover {
  background: rgba(249, 115, 22, 0.25);
  border-color: #f97316;
}
.vlc-select-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  border-radius: 6px;
  padding: 2px 6px;
}
.vlc-select {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 11px;
  outline: none;
  cursor: pointer;
  color-scheme: dark;
}
.vlc-select option {
  background: #190c28;
  color: #fff;
}

/* Jukebox Queue List */
.music-queue-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 150px;
  overflow-y: auto;
}
.music-queue-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s;
}
.music-queue-item:hover {
  background: rgba(255, 117, 140, 0.15);
}
.music-queue-item.active {
  background: linear-gradient(135deg, rgba(255, 117, 140, 0.25), rgba(255, 126, 179, 0.25));
  border-color: var(--primary-pink);
  color: #fff;
}

/* Custom Input Range */
.custom-range {
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.2);
  outline: none;
  cursor: pointer;
}
.custom-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--primary-pink);
  cursor: pointer;
  box-shadow: 0 0 6px var(--primary-pink);
}

/* =================================================================
   10B. 🌸 CELESTE APP DRAWER & PWA INSTALL SYSTEM
================================================================= */
.btn-pwa-install-pill {
  background: linear-gradient(135deg, #a855f7, #ec4899);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 20px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(236, 72, 153, 0.4);
  transition: transform 0.2s, box-shadow 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.btn-pwa-install-pill:hover {
  transform: scale(1.05);
  box-shadow: 0 0 16px rgba(236, 72, 153, 0.7);
}

/* App Drawer Modal */
.app-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 4, 16, 0.68);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 9500;
  display: none;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.app-drawer-overlay.active {
  display: flex;
  opacity: 1;
}
.app-drawer-panel {
  width: 100%;
  max-width: 560px;
  max-height: 84vh;
  background: rgba(18, 9, 32, 0.94);
  backdrop-filter: blur(36px);
  -webkit-backdrop-filter: blur(36px);
  border: 1px solid var(--glass-border-hi);
  border-bottom: none;
  border-radius: 28px 28px 0 0;
  padding: 14px 20px 28px 20px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 -15px 50px rgba(0, 0, 0, 0.75), var(--glow-pink);
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.32, 1, 0.23, 1);
}
.app-drawer-overlay.active .app-drawer-panel {
  transform: translateY(0%);
}
.drawer-pill-handle {
  width: 44px;
  height: 5px;
  background: rgba(255, 255, 255, 0.28);
  border-radius: 4px;
  margin: 0 auto 12px auto;
  cursor: pointer;
}
.app-drawer-header {
  margin-bottom: 16px;
}
.app-drawer-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.app-drawer-search-wrap {
  position: relative;
  width: 100%;
}
.app-drawer-search-icon {
  position: absolute;
  left: 14px;
  top: 11px;
  font-size: 14px;
  color: var(--text-muted);
  pointer-events: none;
}
.app-drawer-search-input {
  width: 100%;
  height: 40px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 0 14px 0 38px;
  color: #fff;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.app-drawer-search-input:focus {
  border-color: var(--primary-pink);
  box-shadow: 0 0 14px rgba(255, 133, 161, 0.35);
}
.app-drawer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px 10px;
  overflow-y: auto;
  max-height: 56vh;
  padding: 4px 2px;
}
.app-drawer-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 10px 4px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  cursor: pointer;
  transition: transform 0.2s, background 0.2s, border-color 0.2s;
}
.app-drawer-card:hover {
  transform: translateY(-4px);
  background: rgba(255, 133, 161, 0.16);
  border-color: rgba(255, 133, 161, 0.45);
}
.app-drawer-card:active {
  transform: scale(0.95);
}
.drawer-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  margin-bottom: 8px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}
.drawer-app-name {
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  line-height: 1.2;
}

/* Call Header / Mobile Elements */
.mobile-call-header-info {
  display: none;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  padding: 3px 10px;
  border-radius: 12px;
}
.live-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 8px #22c55e;
  animation: pulseAvatar 2s infinite;
}
.mobile-call-min-btn {
  display: none;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.btn-close-chat-sheet {
  display: none;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 14px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.chat-unread-dot {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ec4899;
  box-shadow: 0 0 8px #ec4899;
}
.pip-label {
  position: absolute;
  bottom: 4px;
  left: 6px;
  font-size: 9px;
  font-weight: 600;
  color: #fff;
  background: rgba(0, 0, 0, 0.55);
  padding: 1px 5px;
  border-radius: 4px;
}
.mobile-drawer-handle {
  display: none;
}

/* =================================================================
   11. COMPREHENSIVE RESPONSIVENESS (Mobile, Tablet & Small Screens)
================================================================= */
@media (max-width: 768px) {
  /* Menu bar */
  #menubar {
    padding: 0 8px;
    height: 36px;
    white-space: nowrap;
    overflow: hidden;
  }
  .menu-left, .menu-right {
    gap: 6px;
  }
  .menu-clock {
    font-size: 10px;
  }
  .presence-pill {
    padding: 2px 7px;
    font-size: 9px;
    max-width: 100px;
    overflow: hidden;
    white-space: nowrap;
  }
  #presence-text {
    max-width: 72px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
  }
  #sync-status {
    display: none !important; /* keep mobile menubar uncluttered */
  }
  .menu-btn-lock {
    padding: 2px 7px;
    font-size: 10px;
  }
  #active-app-name {
    display: none;
  }

  /* Desktop workspace: Keep wallpaper pristine and uncluttered */
  .desktop-icons-grid {
    display: none !important;
  }

  /* Windows adapt to full mobile card */
  .os-window {
    position: fixed !important;
    inset: 38px 6px 74px 6px !important;
    width: auto !important;
    height: auto !important;
    min-width: 0 !important;
    min-height: 0 !important;
    transform: none !important;
    border-radius: 12px;
  }
  .win-header {
    cursor: default;
    height: 42px;
  }
  .win-body {
    padding: 14px;
  }

  /* Native Edge-to-Edge Video Call & Live Chat on Mobile */
  #win-call {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    border-radius: 0 !important;
    border: none !important;
    z-index: 9999 !important;
    background: #08030f !important;
    display: none;
    flex-direction: column;
    overflow: hidden !important;
  }
  #win-call.active,
  #win-call.active-win {
    display: flex !important;
  }
  #win-call .win-header {
    position: relative !important;
    top: auto;
    left: auto;
    right: auto;
    z-index: 50;
    background: rgba(14, 7, 24, 0.95);
    border-bottom: 1px solid var(--glass-border);
    padding: 10px 14px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
  }
  #win-call .win-controls {
    display: none; /* replaced by mobile min button */
  }
  #win-call .mobile-call-min-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 16px;
    border: 1px solid var(--glass-border);
    cursor: pointer;
  }
  #win-call .mobile-call-header-info {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #fff;
    font-weight: 600;
  }
  #win-call .win-body {
    padding: 0 !important;
    flex: 1 !important;
    min-height: 0 !important;
    height: calc(100% - 48px) !important;
    position: relative;
    overflow: hidden;
    display: flex !important;
    flex-direction: column !important;
  }

  /* Mode Bar: Clean pill at top of win-body */
  #win-call .duo-layout-bar {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    transform: none !important;
    margin: 6px auto;
    z-index: 50;
    background: rgba(18, 9, 30, 0.85);
    backdrop-filter: blur(14px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 3px 6px;
    display: flex;
    gap: 4px;
    flex-shrink: 0;
  }

  /* Call Container */
  #win-call .call-container {
    flex: 1 !important;
    min-height: 0 !important;
    height: auto !important;
    width: 100% !important;
    gap: 0;
    position: relative;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden;
  }

  /* Mode 1: 📱 Video + Chat (Split Layout on Mobile) */
  #win-call .call-container.mode-split .video-area {
    display: flex !important;
    flex-direction: column;
    position: relative !important;
    inset: auto !important;
    width: 100% !important;
    height: 40% !important;
    min-height: 180px !important;
    max-height: 250px !important;
    flex-shrink: 0 !important;
    border-radius: 0;
    border: none;
    border-bottom: 1px solid var(--glass-border);
    background: #000;
    overflow: hidden;
  }
  #win-call .call-container.mode-split .remote-video-container {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  #win-call .call-container.mode-split #remote-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  #win-call .call-container.mode-split .local-video-container {
    position: absolute;
    top: 8px;
    right: 8px;
    bottom: auto;
    width: 72px;
    height: 98px;
    border-radius: 10px;
    border: 1.5px solid var(--primary-pink);
    box-shadow: 0 4px 16px rgba(0,0,0,0.8);
    z-index: 25;
  }
  #win-call .call-container.mode-split .call-controls {
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    max-width: 95%;
    height: 38px;
    border-radius: 20px;
    background: rgba(14, 7, 24, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 4px 18px rgba(0,0,0,0.7);
    z-index: 30;
    gap: 8px;
    padding: 0 10px;
  }
  #win-call .call-container.mode-split .call-ctrl-btn {
    width: 28px;
    height: 28px;
    font-size: 13px;
  }
  #win-call .call-container.mode-split .call-btn-action.start,
  #win-call .call-container.mode-split .call-btn-action.end {
    height: 28px;
    padding: 0 10px;
    font-size: 10px;
    border-radius: 14px;
  }

  /* Split Mode Chat Area (Visible Directly Under Video!) */
  #win-call .call-container.mode-split .chat-area {
    display: flex !important;
    flex-direction: column !important;
    position: relative !important;
    inset: auto !important;
    transform: none !important;
    width: 100% !important;
    flex: 1 !important;
    min-height: 0 !important;
    max-height: none !important;
    border-radius: 0 !important;
    background: rgba(12, 6, 20, 0.98) !important;
    border: none !important;
    box-shadow: none !important;
    z-index: 20;
    overflow: hidden;
  }
  #win-call .call-container.mode-split .chat-header {
    padding: 6px 12px;
    font-size: 11px;
    background: rgba(22, 11, 36, 0.7);
    border-bottom: 1px solid var(--glass-border);
    flex-shrink: 0;
  }
  #win-call .call-container.mode-split .btn-close-chat-sheet {
    display: none !important;
  }
  #win-call .call-container.mode-split .chat-messages-container {
    flex: 1 !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    padding: 8px 10px !important;
    gap: 6px !important;
  }
  #win-call .call-container.mode-split .chat-bubble {
    padding: 6px 10px;
    font-size: 12px;
  }
  #win-call .call-container.mode-split .chat-input-bar {
    flex-shrink: 0 !important;
    padding: 6px 8px !important;
    background: rgba(18, 9, 30, 0.98) !important;
    border-top: 1px solid var(--glass-border);
  }
  #win-call .call-container.mode-split .quick-emojis {
    display: flex;
    gap: 6px;
    margin-bottom: 4px;
  }
  #win-call .call-container.mode-split .quick-emoji-btn {
    font-size: 14px;
    padding: 2px 4px;
  }
  #win-call .call-container.mode-split .chat-input {
    height: 34px;
    font-size: 12px;
  }

  /* Mode 2: 💬 Chat Only (Full Screen Chat, NO Black Screen!) */
  #win-call .call-container.mode-chat-only .video-area {
    display: none !important;
  }
  #win-call .call-container.mode-chat-only .chat-area {
    display: flex !important;
    flex-direction: column !important;
    position: relative !important;
    inset: auto !important;
    transform: none !important;
    width: 100% !important;
    height: 100% !important;
    flex: 1 !important;
    min-height: 0 !important;
    max-height: none !important;
    border-radius: 0 !important;
    background: rgba(12, 6, 20, 0.98) !important;
    border: none !important;
    box-shadow: none !important;
    z-index: 30;
    overflow: hidden;
  }
  #win-call .call-container.mode-chat-only .chat-header {
    padding: 8px 14px;
    font-size: 12px;
    background: rgba(22, 11, 36, 0.8);
    border-bottom: 1px solid var(--glass-border);
    flex-shrink: 0;
  }
  #win-call .call-container.mode-chat-only .btn-close-chat-sheet {
    display: none !important;
  }
  #win-call .call-container.mode-chat-only .chat-messages-container {
    flex: 1 !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    padding: 12px !important;
    gap: 8px !important;
  }
  #win-call .call-container.mode-chat-only .chat-bubble {
    padding: 8px 12px;
    font-size: 13px;
  }
  #win-call .call-container.mode-chat-only .chat-input-bar {
    flex-shrink: 0 !important;
    padding: 8px 12px !important;
    background: rgba(18, 9, 30, 0.98) !important;
    border-top: 1px solid var(--glass-border);
  }
  #win-call .call-container.mode-chat-only .quick-emojis {
    display: flex;
    gap: 8px;
    margin-bottom: 6px;
  }
  #win-call .call-container.mode-chat-only .quick-emoji-btn {
    font-size: 16px;
    padding: 2px 6px;
  }
  #win-call .call-container.mode-chat-only .chat-input {
    height: 38px;
    font-size: 13px;
  }

  /* Mode 3: 📹 Video Only (Full Screen Video) */
  #win-call .call-container.mode-video-only .chat-area {
    display: none !important;
  }
  #win-call .call-container.mode-video-only .video-area {
    display: flex !important;
    flex-direction: column !important;
    position: relative !important;
    inset: auto !important;
    width: 100% !important;
    height: 100% !important;
    flex: 1 !important;
    min-height: 0 !important;
    border-radius: 0;
    border: none;
    background: #000;
  }
  #win-call .call-container.mode-video-only .remote-video-container {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  #win-call .call-container.mode-video-only #remote-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  #win-call .call-container.mode-video-only .local-video-container {
    position: absolute;
    top: 14px;
    right: 14px;
    bottom: auto;
    width: 100px;
    height: 135px;
    border-radius: 14px;
    border: 2px solid var(--primary-pink);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.8), 0 0 15px rgba(255, 133, 161, 0.3);
    z-index: 30;
  }
  #win-call .call-container.mode-video-only .call-controls {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 32px);
    max-width: 380px;
    height: 60px;
    border-radius: 32px;
    background: rgba(15, 8, 24, 0.85);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.7), 0 0 20px rgba(255, 133, 161, 0.2);
    z-index: 40;
    gap: 12px;
    padding: 0 16px;
  }
  #win-call .call-container.mode-video-only .call-ctrl-btn {
    width: 44px;
    height: 44px;
    font-size: 20px;
  }
  #win-call .call-container.mode-video-only .call-btn-action.start,
  #win-call .call-container.mode-video-only .call-btn-action.end {
    height: 44px;
    padding: 0 16px;
    border-radius: 22px;
    font-size: 12px;
  }

  /* Mobile Swipe Handle above Dock */
  .mobile-drawer-handle {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: fixed;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1001;
    cursor: pointer;
    background: rgba(18, 9, 30, 0.75);
    backdrop-filter: blur(14px);
    border: 1px solid var(--glass-border-hi);
    padding: 4px 16px;
    border-radius: 20px;
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 600;
    gap: 3px;
    pointer-events: auto;
    box-shadow: 0 4px 16px rgba(0,0,0,0.5);
  }
  .drawer-handle-bar {
    width: 24px;
    height: 3px;
    background: var(--primary-pink);
    border-radius: 3px;
  }
  .app-drawer-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  /* Mobile Bottom Dock: Show ONLY App Drawer Button + Open/Running Apps */
  #dock-container {
    bottom: 12px;
    z-index: 1000;
  }
  #dock {
    max-width: calc(100vw - 24px);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 6px 14px;
    gap: 12px;
    border-radius: 28px;
    background: rgba(18, 9, 30, 0.88);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border-hi);
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.65), 0 0 20px rgba(255, 133, 161, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
  }
  #dock .dock-divider {
    display: none !important;
  }
  /* Hide all inactive icons on mobile */
  #dock .dock-item:not(#dock-btn-drawer):not(.running) {
    display: none !important;
  }
  /* Show main app button and running apps */
  #dock .dock-item#dock-btn-drawer,
  #dock .dock-item.running {
    display: flex !important;
  }
  #dock-btn-drawer {
    width: 44px !important;
    height: 44px !important;
    font-size: 22px !important;
    background: linear-gradient(135deg, rgba(255, 133, 161, 0.35), rgba(168, 85, 247, 0.35)) !important;
    border: 1.5px solid var(--primary-pink) !important;
    box-shadow: 0 0 15px rgba(255, 133, 161, 0.45) !important;
    flex-shrink: 0;
  }
  .dock-item.running {
    width: 42px !important;
    height: 42px !important;
    font-size: 20px !important;
    position: relative;
    flex-shrink: 0;
    animation: popIn 0.2s ease;
  }
  .dock-item.running::after {
    content: '';
    position: absolute;
    bottom: -3px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--primary-pink);
    box-shadow: 0 0 8px var(--primary-pink);
  }
  .dock-item {
    width: 38px;
    height: 38px;
    font-size: 18px;
    flex-shrink: 0;
  }
  .dock-tooltip {
    display: none; /* hide tooltips on touch */
  }

  /* Login card */
  .lcard {
    width: calc(100vw - 28px);
    padding: 22px 16px;
  }
  .greet-card {
    width: calc(100vw - 28px);
    padding: 24px 18px;
  }
  .g-name {
    font-size: 22px;
  }

  /* VLC Cinema Mobile */
  .vlc-screen-container {
    min-height: 180px;
    height: 180px;
  }
  .vlc-hud {
    padding: 6px;
    gap: 6px;
  }
  .vlc-hud-left, .vlc-hud-right {
    width: 100%;
    justify-content: space-between;
  }
  .vlc-select {
    max-width: 100px;
    font-size: 10px;
  }

  /* Lightbox Mobile */
  .lightbox-container {
    width: 96vw;
    height: 90vh;
  }
  .lb-nav-btn {
    width: 36px;
    height: 36px;
    font-size: 13px;
  }
}

/* ================================================================= 
   EXTRA MOBILE POLISH & FIXES (added for v2 improvements)
================================================================= */

/* Floating PiP button - ensure it's accessible */
#btn-vlc-pip {
  position: relative;
}

/* Win-call chat area: always visible properly (desktop) */
@media (min-width: 769px) {
  .call-container {
    overflow: hidden;
  }
  .chat-area {
    max-height: 100%;
    overflow: hidden;
  }
  .chat-messages-container {
    max-height: calc(100% - 110px);
  }
}

/* ===================================================================
   MOBILE BIRTHDAY / GREETING HEADER FIXES
=================================================================== */
@media (max-width: 768px) {

  /* Menubar: On mobile show ONLY logo + clock + lock - hide other extras */
  .menu-left span:not(.os-logo-btn) {
    display: none;
  }
  #active-app-name {
    display: none !important;
  }
  .presence-pill {
    display: none !important;
  }
  #sync-status {
    display: none !important;
  }
  #btn-open-settings-menu {
    display: none !important;
  }
  .btn-pwa-install-pill {
    display: none !important;
  }
  
  /* Keep just the 🌸 button + clock + lock button visible */
  .os-logo-btn {
    display: flex !important;
  }
  .menu-clock {
    display: block !important;
    font-size: 11px !important;
  }
  .menu-btn-lock {
    display: flex !important;
    align-items: center;
  }

  /* Fix chat area always rendered in split/chat-only modes */
  #win-call .call-container.mode-split .chat-area,
  #win-call .call-container.mode-chat-only .chat-area {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  /* Overlay Chat Sheet: Slides up over video during Video Call */
  #win-call .call-container .chat-area.mobile-sheet-open,
  #win-call .call-container.mode-video-only .chat-area.mobile-sheet-open {
    display: flex !important;
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    height: 64% !important;
    max-height: 85% !important;
    background: rgba(14, 7, 24, 0.96) !important;
    backdrop-filter: blur(24px) !important;
    -webkit-backdrop-filter: blur(24px) !important;
    border-top: 2px solid var(--primary-pink) !important;
    border-top-left-radius: 20px !important;
    border-top-right-radius: 20px !important;
    box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.9) !important;
    z-index: 100 !important;
    visibility: visible !important;
    opacity: 1 !important;
    animation: slideUpSheet 0.28s cubic-bezier(0.16, 1, 0.3, 1) !important;
    overflow: hidden !important;
  }
  #win-call .call-container .chat-area.mobile-sheet-open .btn-close-chat-sheet {
    display: flex !important;
  }
  #win-call .call-container .chat-area.mobile-sheet-open .chat-messages-container {
    flex: 1 !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    padding: 10px !important;
  }
  #win-call .call-container .chat-area.mobile-sheet-open .chat-input-bar {
    padding: 8px 10px !important;
    background: rgba(20, 10, 32, 0.98) !important;
    border-top: 1px solid var(--glass-border);
  }
  @keyframes slideUpSheet {
    from {
      transform: translateY(100%);
      opacity: 0;
    }
    to {
      transform: translateY(0);
      opacity: 1;
    }
  }

  /* Ensure chat messages container is properly scrollable */
  #win-call .chat-messages-container {
    flex: 1 !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  /* Fix quick emojis in chat input bar */
  .quick-emoji-btn {
    font-size: 16px;
    padding: 3px 7px;
  }

  /* VLC Cinema: Full responsive layout on mobile */
  #win-vlc .win-body {
    padding: 0 !important;
    flex-direction: column;
    overflow-y: auto;
  }
  .vlc-top-bar {
    padding: 8px 10px;
    flex-wrap: wrap;
    gap: 6px;
  }
  .vlc-top-bar > div:first-child {
    flex: 1;
    min-width: 0;
  }
  #vlc-now-playing {
    max-width: 140px !important;
    font-size: 11px !important;
  }
  .vlc-screen-container {
    min-height: 220px !important;
    height: 220px !important;
    border-radius: 0 !important;
  }
  .vlc-hud {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 0;
    margin-top: 0;
  }
  .vlc-hud-left, .vlc-hud-right {
    width: 100%;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-start;
  }
  .vlc-ctrl-btn {
    padding: 6px 10px;
    font-size: 12px;
    flex-shrink: 0;
  }
  .vlc-select-wrap {
    flex-shrink: 0;
  }
  .vlc-select {
    max-width: 110px;
    font-size: 11px;
  }
  .vlc-scrub-wrap {
    padding: 0 10px;
  }
  .vlc-time-row {
    font-size: 10px;
  }

  /* Floating PiP mode on mobile: compact rectangle */
  .vlc-floating-pip {
    position: fixed !important;
    bottom: 80px;
    right: 12px;
    width: 160px !important;
    height: 90px !important;
    z-index: 9998;
    border-radius: 10px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.8), 0 0 15px rgba(249,115,22,0.4);
    border: 2px solid rgba(249,115,22,0.6);
    cursor: pointer;
    overflow: hidden;
  }

  /* Greeting card responsive */
  .greet-card {
    max-height: 90vh;
    overflow-y: auto;
  }
  .acts {
    flex-direction: column;
    gap: 8px;
  }
  .btn-enter {
    padding: 10px;
  }
  .aibox {
    max-height: 160px;
    overflow-y: auto;
  }

  /* Modal fixes for mobile */
  #m-upload .lcard,
  #m-capsule .lcard {
    width: calc(100vw - 24px) !important;
    max-height: 90vh;
    overflow-y: auto;
  }

  /* Toast position fix on mobile */
  #toast-container {
    top: 44px;
    right: 8px;
    left: 8px;
    align-items: flex-end;
  }
  .os-toast {
    max-width: 100%;
  }

  /* App drawer grid - 4 columns minimum on wider phones, 3 on small */
  .app-drawer-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .app-drawer-panel {
    padding: 14px 14px 28px 14px;
  }
  .drawer-icon-wrap {
    width: 44px;
    height: 44px;
    font-size: 22px;
    border-radius: 12px;
  }
  .drawer-app-name {
    font-size: 10px;
  }
}

/* Very small screens */
@media (max-width: 380px) {
  .app-drawer-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px 6px;
  }
  .drawer-icon-wrap {
    width: 40px;
    height: 40px;
    font-size: 20px;
  }
  .vlc-screen-container {
    min-height: 180px !important;
    height: 180px !important;
  }
}

/* ==================================================================
   VLC RECTANGLE MODE (when app is open, show rect instead of float)
================================================================== */
.vlc-rect-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 8px;
}

/* PiP floating container for VLC when minimized on mobile */
.vlc-pip-float-wrap {
  position: fixed;
  bottom: 80px;
  right: 14px;
  width: 160px;
  height: 92px;
  z-index: 9900;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid rgba(249, 115, 22, 0.7);
  box-shadow: 0 8px 28px rgba(0,0,0,0.75), 0 0 18px rgba(249,115,22,0.3);
  cursor: pointer;
  background: #000;
  display: none;
}
.vlc-pip-float-wrap.active {
  display: block;
}
.vlc-pip-float-wrap video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.vlc-pip-float-label {
  position: absolute;
  bottom: 4px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 9px;
  color: rgba(255,255,255,0.8);
  background: rgba(0,0,0,0.5);
  padding: 2px 4px;
}
.vlc-pip-float-close {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 18px;
  height: 18px;
  background: rgba(0,0,0,0.6);
  border-radius: 50%;
  color: #fff;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  border: 1px solid rgba(255,255,255,0.2);
}

/* ==================================================================
   AUDIO TRACK DISPLAY BADGES (for VLC detected tracks)
================================================================== */
.vlc-audio-track-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 600;
  color: #fff;
  margin: 2px;
  cursor: pointer;
  transition: all 0.2s;
}
.vlc-audio-track-badge:hover,
.vlc-audio-track-badge.active {
  background: rgba(249, 115, 22, 0.25);
  border-color: #f97316;
}

/* ==================================================================
   WIN-CALL VIDEO PIP (Rectangle in call window, not overlay)
================================================================== */
@media (min-width: 769px) {
  /* Desktop: local video as small rectangle in corner - more visible */
  .local-video-container {
    bottom: 64px;
    right: 14px;
    width: 130px;
    height: 96px;
    border-radius: 10px;
    box-shadow: 0 6px 22px rgba(0,0,0,0.7), 0 0 12px rgba(255,133,161,0.3);
  }
}
