/* ============================================================
   BritDroid 14 - Ember Taste Edition
   Pure Android Mobile OS Experience
   Default Theme: Ember (#0a0705, #160e0a, #fb923c)
   Engineered to strict Anti-Slop frontend taste standards
   ============================================================ */

:root {
  --phone-ground: #0a0705;
  --phone-surface: #160e0a;
  --phone-surface-2: #221610;
  --phone-surface-raised: #2c1c14;
  --phone-border: rgba(251, 146, 60, 0.14);
  --phone-border-subtle: rgba(255, 255, 255, 0.08);
  --phone-accent: #fb923c;
  --phone-accent-deep: #ea580c;
  --phone-accent-grad: linear-gradient(135deg, #fb923c 0%, #ea580c 60%, #c2410c 100%);
  --phone-text: #ffffff;
  --phone-muted: #b4b4b4;
  --phone-faint: #888888;
  --phone-radius-sm: 12px;
  --phone-radius-md: 18px;
  --phone-radius-lg: 24px;
  --phone-radius-pill: 999px;
  --phone-ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* Hard segregation: when on phone, hide all desktop elements */
body.phone-mode-active #desktop,
body.phone-mode-active #boot-screen,
body.phone-mode-active #login-screen,
body.phone-mode-active #desktop-phone-toggle {
  display: none !important;
}

body.phone-mode-active #phone-container {
  display: flex !important;
}

/* Desktop cleanup: ensure no mobile switcher shows on desktop */
#desktop-phone-toggle {
  display: none !important;
}

/* ================= 1. PHONE ROOT SHELL ================= */
#phone-container {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background: var(--phone-ground);
  color: var(--phone-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Google Sans", sans-serif;
  overflow: hidden;
  z-index: 9999;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  display: none;
  flex-direction: column;
}

/* ================= 2. ANDROID BOOT SCREEN (EMBER) ================= */
#phone-boot {
  position: absolute;
  inset: 0;
  background: #000000;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
  transition: opacity 0.55s var(--phone-ease);
}

#phone-boot.boot-exit {
  opacity: 0;
  pointer-events: none;
}

.android-boot-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
}

.boot-ember-logo {
  position: relative;
  width: 96px;
  height: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.boot-ember-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: #fb923c;
  border-right-color: #f97316;
  animation: bootSpin 1.4s linear infinite;
}

.boot-ember-ring-back {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1px solid rgba(251, 146, 60, 0.18);
}

.boot-robot-mark {
  font-size: 42px;
  color: #fb923c;
  animation: bootPulse 2s ease-in-out infinite alternate;
}

.boot-avatar-img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(251, 146, 60, 0.45);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6), 0 0 12px rgba(251, 146, 60, 0.25);
  animation: bootPulse 2s ease-in-out infinite alternate;
  z-index: 2;
}

@keyframes bootSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes bootPulse {
  0% { transform: scale(0.94); opacity: 0.85; }
  100% { transform: scale(1.04); opacity: 1; }
}

.boot-system-name {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: #ffffff;
  margin-bottom: 4px;
}

.boot-system-tag {
  font-size: 13px;
  color: #fb923c;
  font-weight: 500;
  letter-spacing: 0.5px;
  margin-bottom: 28px;
}

.boot-track {
  width: 200px;
  height: 3px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--phone-radius-pill);
  overflow: hidden;
  margin-bottom: 12px;
}

.boot-track-fill {
  height: 100%;
  width: 0%;
  background: var(--phone-accent-grad);
  border-radius: var(--phone-radius-pill);
  transition: width 0.22s ease-out;
}

.boot-status-line {
  font-size: 11.5px;
  color: var(--phone-muted);
  font-family: Consolas, monospace;
  min-height: 16px;
}

.boot-footer-box {
  margin-top: auto;
  text-align: center;
  padding-bottom: 12px;
}

.boot-footer-powered {
  font-size: 11px;
  color: #666666;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.boot-footer-android {
  font-size: 15px;
  font-weight: 700;
  color: #e2e8f0;
  letter-spacing: 0.3px;
  margin-top: 2px;
}

.boot-skip-pill {
  margin-top: 14px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--phone-muted);
  padding: 5px 14px;
  border-radius: var(--phone-radius-pill);
  font-size: 11.5px;
  cursor: pointer;
}
.boot-skip-pill:active {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

/* ================= 3. TOP STATUS BAR (ANDROID EDGE-TO-EDGE) ================= */
#phone-status-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  font-size: 12px;
  font-weight: 600;
  z-index: 7000;
  color: #ffffff;
  cursor: pointer;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.4), transparent);
}

.status-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-time {
  letter-spacing: 0.2px;
  font-variant-numeric: tabular-nums;
}

.status-notif-icons {
  display: flex;
  gap: 5px;
  font-size: 10.5px;
  color: #fb923c;
}

.status-punchhole {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #000000;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.status-right {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
}

.status-battery {
  display: flex;
  align-items: center;
  gap: 3px;
}

/* ================= 4. PHONE LOCK SCREEN ================= */
#phone-lock {
  position: absolute;
  inset: 0;
  z-index: 8000;
  display: flex;
  flex-direction: column;
  padding: 56px 20px 24px;
  transition: transform 0.4s var(--phone-ease), opacity 0.3s;
}

#phone-lock.lock-unlocked {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
}

.lock-time-box {
  margin-top: 24px;
  text-align: center;
}

.lock-clock-display {
  font-size: 76px;
  font-weight: 300;
  line-height: 1;
  letter-spacing: -2px;
  color: #ffffff;
  font-variant-numeric: tabular-nums;
}

.lock-date-display {
  font-size: 16px;
  font-weight: 500;
  color: #e2e8f0;
  margin-top: 8px;
}

.lock-weather-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(22, 14, 10, 0.7);
  border: 1px solid var(--phone-border);
  padding: 5px 12px;
  border-radius: var(--phone-radius-pill);
  font-size: 12px;
  color: #fed7aa;
  margin-top: 12px;
}

.lock-cards-stack {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.lock-card-item {
  background: rgba(22, 14, 10, 0.85);
  backdrop-filter: blur(20px);
  border: 1px solid var(--phone-border);
  border-radius: var(--phone-radius-md);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.lock-card-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--phone-radius-sm);
  background: var(--phone-surface-raised);
  border: 1px solid var(--phone-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.lock-card-info {
  flex: 1;
  min-width: 0;
}

.lock-card-title {
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
}

.lock-card-desc {
  font-size: 11.5px;
  color: var(--phone-muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lock-bottom-area {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.lock-fingerprint {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(34, 22, 16, 0.9);
  border: 1px solid var(--phone-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  color: #fb923c;
  cursor: pointer;
  transition: transform 0.16s var(--phone-ease);
}

.lock-fingerprint:active {
  transform: scale(0.92);
  background: #2a180e;
}

.lock-hint-text {
  font-size: 12.5px;
  color: #fed7aa;
  display: flex;
  align-items: center;
  gap: 4px;
}

.lock-quick-shortcuts {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 8px;
}

.lock-action-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(22, 14, 10, 0.85);
  border: 1px solid var(--phone-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
}

/* ================= 5. TOP SLIDER (NOTIFICATION & QUICK SETTINGS SHADE) ================= */
#phone-slider {
  position: absolute;
  inset: 0;
  z-index: 7500;
  background: rgba(10, 7, 5, 0.94);
  backdrop-filter: blur(30px);
  padding: 44px 18px 24px;
  display: flex;
  flex-direction: column;
  transform: translateY(-100%);
  transition: transform 0.35s var(--phone-ease);
}

#phone-slider.slider-open {
  transform: translateY(0);
}

.slider-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.slider-large-time {
  font-size: 32px;
  font-weight: 300;
  letter-spacing: -0.5px;
  color: #ffffff;
}

.slider-date-label {
  font-size: 12.5px;
  color: #fb923c;
  margin-top: 1px;
}

.slider-top-btns {
  display: flex;
  gap: 10px;
}

.slider-head-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--phone-surface);
  border: 1px solid var(--phone-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: #ffffff;
  cursor: pointer;
}

.qs-tiles-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}

.qs-tile-btn {
  background: var(--phone-surface);
  border: 1px solid var(--phone-border);
  border-radius: var(--phone-radius-md);
  padding: 12px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.16s var(--phone-ease);
}

.qs-tile-btn:active {
  transform: scale(0.94);
}

.qs-tile-btn.qs-on {
  background: #fb923c;
  border-color: #fdba74;
}

.qs-tile-btn.qs-on .qs-tile-icon,
.qs-tile-btn.qs-on .qs-tile-name {
  color: #0a0705;
  font-weight: 700;
}

.qs-tile-icon {
  font-size: 20px;
  color: #ffffff;
}

.qs-tile-name {
  font-size: 11px;
  color: var(--phone-muted);
}

.slider-brightness-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--phone-surface);
  border: 1px solid var(--phone-border);
  border-radius: var(--phone-radius-pill);
  padding: 8px 16px;
  margin-bottom: 20px;
}

.slider-range-bar {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.12);
  outline: none;
}

.slider-range-bar::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fb923c;
  cursor: pointer;
}

.slider-notifs-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.slider-notifs-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--phone-muted);
  letter-spacing: 0.5px;
}

.slider-notifs-clear {
  background: none;
  border: none;
  color: #fb923c;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.slider-notifs-scroller {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.slider-notif-row {
  background: var(--phone-surface);
  border: 1px solid var(--phone-border);
  border-radius: var(--phone-radius-sm);
  padding: 11px 12px;
  display: flex;
  gap: 10px;
  align-items: center;
  cursor: pointer;
}

.slider-notif-row:active {
  background: var(--phone-surface-2);
}

.snr-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--phone-surface-raised);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.snr-title {
  font-size: 12.5px;
  font-weight: 600;
  color: #ffffff;
}

.snr-text {
  font-size: 11.5px;
  color: var(--phone-muted);
  margin-top: 1px;
}

.slider-bottom-handle {
  width: 50px;
  height: 4px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: var(--phone-radius-pill);
  margin: 12px auto 0;
  cursor: pointer;
}

/* ================= 6. PHONE HOME SCREEN ================= */
#phone-home {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  padding: 40px 12px 50px; /* space for status bar and bottom nav */
  overflow: hidden;
  z-index: 5000;
}

/* Horizontal Pages Viewport & Slider */
.phone-pages-viewport {
  flex: 1;
  width: 100%;
  overflow: hidden;
  position: relative;
  touch-action: pan-y pinch-zoom;
}

.phone-pages-track {
  display: flex;
  width: 200%;
  height: 100%;
  transition: transform 0.38s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

.phone-page {
  width: 50%;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 4px;
  box-sizing: border-box;
  -webkit-overflow-scrolling: touch;
}

/* Pagination indicator dots */
.phone-pagination-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 4px 0 2px;
  cursor: pointer;
  flex-shrink: 0;
}

.page-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  transition: all 0.22s var(--phone-ease);
}

.page-dot.active {
  width: 22px;
  border-radius: var(--phone-radius-pill);
  background: #fb923c;
}

.screen-swipe-prompt {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  margin: 6px 0 10px;
  background: rgba(22, 14, 10, 0.6);
  border: 1px solid var(--phone-border);
  border-radius: var(--phone-radius-pill);
  font-size: 11.5px;
  color: #fed7aa;
  cursor: pointer;
}

/* Screen 2 Discover & Widget Styles */
.screen2-header-cue {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 4px 10px;
  color: #fb923c;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.widget-card-ember {
  background: var(--phone-surface);
  border: 1px solid var(--phone-border);
  border-radius: var(--phone-radius-md);
  padding: 14px;
  margin-bottom: 12px;
}

.wce-title-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.wce-title {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 6px;
}

.wce-badge {
  font-size: 10px;
  font-weight: 700;
  color: #fb923c;
  background: var(--phone-surface-2);
  padding: 2px 7px;
  border-radius: var(--phone-radius-pill);
  border: 1px solid var(--phone-border);
}

.media-player-ember {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--phone-surface);
  border: 1px solid var(--phone-border);
  border-radius: var(--phone-radius-md);
  padding: 12px 14px;
  margin-bottom: 12px;
}

.mpe-art {
  width: 44px;
  height: 44px;
  border-radius: var(--phone-radius-sm);
  background: var(--phone-surface-raised);
  border: 1px solid var(--phone-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #fb923c;
  flex-shrink: 0;
  transition: transform 0.3s;
}

.mpe-art.playing {
  animation: discSpin 3s linear infinite;
}

@keyframes discSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.mpe-info {
  flex: 1;
  min-width: 0;
}

.mpe-track-name {
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mpe-artist-name {
  font-size: 11px;
  color: var(--phone-muted);
}

.mpe-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.mpe-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--phone-surface-raised);
  border: 1px solid var(--phone-border);
  color: #fb923c;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
}

.mpe-btn:active {
  background: #fb923c;
  color: #0a0705;
}

/* Wallpaper Variants: Default is Ember */
.phone-theme-ember {
  background:
    radial-gradient(ellipse at 85% 15%, rgba(249, 115, 22, 0.32), transparent 50%),
    radial-gradient(ellipse at 15% 85%, rgba(194, 65, 12, 0.22), transparent 50%),
    linear-gradient(165deg, #0a0705 0%, #150d09 60%, #080504 100%) !important;
}

.phone-theme-midnight {
  background:
    radial-gradient(ellipse at 50% 20%, rgba(30, 30, 45, 0.4), transparent 60%),
    linear-gradient(180deg, #050508 0%, #0d0d14 100%) !important;
}

.phone-theme-aurora {
  background:
    radial-gradient(ellipse at 20% 20%, rgba(20, 83, 45, 0.3), transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(13, 148, 136, 0.2), transparent 50%),
    linear-gradient(160deg, #040c08 0%, #091a12 100%) !important;
}

/* Home Screen Weather & Clock Card */
.home-glance-card {
  margin: 6px 0 14px;
  background: var(--phone-surface);
  border: 1px solid var(--phone-border);
  border-radius: var(--phone-radius-lg);
  padding: 16px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.hgc-clock {
  font-size: 36px;
  font-weight: 300;
  letter-spacing: -1px;
  color: #ffffff;
  line-height: 1;
}

.hgc-date {
  font-size: 13px;
  color: #fb923c;
  font-weight: 500;
  margin-top: 4px;
}

.hgc-weather {
  text-align: right;
}

.hgc-temp {
  font-size: 22px;
  font-weight: 600;
  color: #ffffff;
}

.hgc-condition {
  font-size: 11px;
  color: var(--phone-muted);
}

/* Google-style Pill Search Bar */
.home-search-pill {
  width: 100%;
  height: 46px;
  background: var(--phone-surface);
  border: 1px solid var(--phone-border);
  border-radius: var(--phone-radius-pill);
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 12px;
  margin-bottom: 20px;
  cursor: pointer;
  transition: transform 0.15s var(--phone-ease);
}

.home-search-pill:active {
  transform: scale(0.98);
}

.hsp-glyph {
  font-weight: 800;
  font-size: 17px;
  color: #fb923c;
}

.hsp-placeholder {
  flex: 1;
  font-size: 13px;
  color: var(--phone-muted);
}

.hsp-mic {
  font-size: 15px;
  color: #fb923c;
}

/* 4-Column App Grid */
.home-grid-view {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  row-gap: 20px;
  column-gap: 10px;
  margin-bottom: 20px;
}

.home-icon-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  text-align: center;
  position: relative;
  transition: transform 0.16s var(--phone-ease);
}

.home-icon-cell:active {
  transform: scale(0.88);
}

.app-squircle {
  width: 58px;
  height: 58px;
  border-radius: var(--phone-radius-md);
  background: var(--phone-surface);
  border: 1px solid var(--phone-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  position: relative;
}

.app-badge-dot {
  position: absolute;
  top: -2px;
  right: 2px;
  background: #f97316;
  color: #ffffff;
  font-size: 9.5px;
  font-weight: 700;
  min-width: 17px;
  height: 17px;
  border-radius: var(--phone-radius-pill);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  border: 2px solid var(--phone-ground);
}

.app-icon-name {
  font-size: 11.5px;
  font-weight: 500;
  color: #ffffff;
  margin-top: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 70px;
}

/* Drawer Swipe Cue */
.drawer-cue-strip {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: #fb923c;
  font-size: 11px;
  cursor: pointer;
  padding: 4px 0;
}

.drawer-cue-arrow {
  animation: cueBounce 1.5s infinite;
}

@keyframes cueBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

/* Home Screen Bottom Dock */
.home-dock-strip {
  background: rgba(22, 14, 10, 0.9);
  border: 1px solid var(--phone-border);
  border-radius: var(--phone-radius-lg);
  padding: 8px 12px;
  display: flex;
  justify-content: space-around;
  align-items: center;
  margin-top: 8px;
}

.home-dock-strip .app-squircle {
  width: 50px;
  height: 50px;
  font-size: 23px;
}

.home-dock-strip .app-icon-name {
  display: none;
}

/* ================= 7. ALL APPS DRAWER ================= */
#phone-app-drawer {
  position: absolute;
  inset: 0;
  z-index: 6000;
  background: rgba(10, 7, 5, 0.96);
  backdrop-filter: blur(35px);
  padding: 44px 18px 58px;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.35s var(--phone-ease);
}

#phone-app-drawer.drawer-open {
  transform: translateY(0);
}

.drawer-input-row {
  display: flex;
  align-items: center;
  background: var(--phone-surface);
  border: 1px solid var(--phone-border);
  border-radius: var(--phone-radius-pill);
  padding: 8px 16px;
  gap: 10px;
  margin-bottom: 14px;
}

.drawer-input-row input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: #ffffff;
  font-size: 13.5px;
}

.drawer-heading {
  font-size: 11px;
  font-weight: 700;
  color: #fb923c;
  letter-spacing: 0.8px;
  margin: 8px 0 10px;
  text-transform: uppercase;
}

.drawer-apps-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.drawer-app-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--phone-radius-sm);
  background: var(--phone-surface);
  border: 1px solid var(--phone-border-subtle);
  cursor: pointer;
  transition: background 0.14s var(--phone-ease);
}

.drawer-app-item:active {
  background: var(--phone-surface-2);
}

.dai-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--phone-radius-sm);
  background: var(--phone-surface-raised);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.dai-meta {
  flex: 1;
}

.dai-name {
  font-size: 13.5px;
  font-weight: 600;
  color: #ffffff;
}

.dai-desc {
  font-size: 11.5px;
  color: var(--phone-muted);
}

/* ================= 8. FULL SCREEN MOBILE APP CONTAINER ================= */
#phone-app-screen {
  position: absolute;
  inset: 0;
  z-index: 6500;
  background: var(--phone-ground);
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.3s var(--phone-ease);
  padding-bottom: 48px; /* space for bottom nav bar */
}

#phone-app-screen.app-open {
  transform: translateY(0);
}

.app-screen-header {
  height: 54px;
  margin-top: 34px;
  background: var(--phone-surface);
  border-bottom: 1px solid var(--phone-border);
  display: flex;
  align-items: center;
  padding: 0 12px;
  gap: 10px;
  flex-shrink: 0;
}

.app-back-arrow {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--phone-surface-raised);
  border: none;
  color: #ffffff;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.app-back-arrow:active {
  background: #362016;
}

.app-title-group {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
}

.app-header-icon {
  font-size: 18px;
}

.app-header-title {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
}

.app-header-action {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: none;
  border: none;
  color: var(--phone-muted);
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.app-screen-viewport {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px;
  -webkit-overflow-scrolling: touch;
}

/* ================= 9. ANDROID RECENTS / APP SWITCHER ================= */
#phone-recents {
  position: absolute;
  inset: 0;
  z-index: 6800;
  background: rgba(10, 7, 5, 0.92);
  backdrop-filter: blur(25px);
  padding: 50px 18px 58px;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: scale(0.92);
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s var(--phone-ease);
}

#phone-recents.recents-open {
  transform: scale(1);
  opacity: 1;
  pointer-events: auto;
}

.recents-track-row {
  flex: 1;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 16px;
  overflow-x: auto;
  padding: 16px 8px;
  scroll-snap-type: x mandatory;
}

.recents-card-box {
  width: 76vw;
  max-width: 290px;
  height: 56vh;
  background: var(--phone-surface);
  border: 1px solid var(--phone-border);
  border-radius: var(--phone-radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  scroll-snap-align: center;
  cursor: pointer;
}

.rcb-head {
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--phone-surface-raised);
  border-bottom: 1px solid var(--phone-border);
}

.rcb-title {
  font-size: 13.5px;
  font-weight: 600;
  color: #ffffff;
}

.rcb-close-btn {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--phone-muted);
  font-size: 15px;
  cursor: pointer;
}

.rcb-preview-body {
  flex: 1;
  padding: 14px;
  font-size: 12px;
  color: var(--phone-muted);
  background: var(--phone-ground);
}

.recents-clear-pill {
  background: var(--phone-surface);
  border: 1px solid var(--phone-border);
  color: #fb923c;
  border-radius: var(--phone-radius-pill);
  padding: 9px 22px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 8px;
}

/* ================= 10. ANDROID 3-BUTTON BOTTOM NAVIGATION BAR ================= */
#phone-nav-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 48px;
  background: var(--phone-ground);
  border-top: 1px solid var(--phone-border);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 7500;
}

.p-nav-action {
  width: 52px;
  height: 38px;
  background: none;
  border: none;
  color: var(--phone-muted);
  font-size: 19px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: var(--phone-radius-sm);
  transition: all 0.14s var(--phone-ease);
}

.p-nav-action:active {
  background: var(--phone-surface);
  color: #fb923c;
  transform: scale(0.9);
}

/* ================= 11. SPECIFIC APP STYLES (ANTI-SLOP EMBER THEME) ================= */

/* Profile / Bio App */
.profile-card-ember {
  text-align: center;
  padding: 18px 14px;
  background: var(--phone-surface);
  border: 1px solid var(--phone-border);
  border-radius: var(--phone-radius-lg);
  margin-bottom: 14px;
}

.profile-avatar-box {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  margin: 0 auto 12px;
  border: 2px solid #fb923c;
  overflow: hidden;
}

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

.profile-name-text {
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
}

.profile-role-sub {
  font-size: 13px;
  color: #fb923c;
  margin-top: 2px;
  font-weight: 600;
}

.profile-stats-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 14px 0 12px;
}

.pss-stat {
  background: var(--phone-surface-2);
  border-radius: var(--phone-radius-sm);
  padding: 8px;
}

.pss-val {
  font-size: 17px;
  font-weight: 700;
  color: #fb923c;
}

.pss-lbl {
  font-size: 10.5px;
  color: var(--phone-muted);
}

.profile-body-text {
  font-size: 13px;
  color: #e2e8f0;
  line-height: 1.55;
  text-align: left;
  white-space: pre-wrap;
  margin-top: 10px;
}

.cta-button-ember {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--phone-accent-grad);
  color: #0a0705;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  padding: 10px 16px;
  border-radius: var(--phone-radius-sm);
  width: 100%;
  margin-top: 12px;
  border: none;
  cursor: pointer;
}

.cta-button-ember:active {
  transform: scale(0.98);
}

/* Projects App Cards */
.project-card-ember {
  background: var(--phone-surface);
  border: 1px solid var(--phone-border);
  border-radius: var(--phone-radius-md);
  padding: 15px;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pce-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pce-icon {
  font-size: 24px;
}

.pce-title {
  font-size: 15.5px;
  font-weight: 700;
  color: #ffffff;
}

.pce-desc {
  font-size: 12.5px;
  color: var(--phone-muted);
  line-height: 1.45;
}

.pce-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 3px 0;
}

.pce-chip {
  font-size: 11px;
  background: var(--phone-surface-2);
  color: #fed7aa;
  border: 1px solid var(--phone-border);
  border-radius: 6px;
  padding: 3px 7px;
}

/* Services App Cards */
.service-card-ember {
  background: var(--phone-surface);
  border: 1px solid var(--phone-border);
  border-radius: var(--phone-radius-md);
  padding: 15px;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sce-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sce-icon {
  font-size: 24px;
}

.sce-name {
  font-size: 15.5px;
  font-weight: 700;
  color: #ffffff;
}

.sce-tag {
  font-size: 11px;
  color: #fb923c;
  font-weight: 600;
}

.sce-desc {
  font-size: 12.5px;
  color: var(--phone-muted);
  line-height: 1.45;
}

.sce-use {
  font-size: 11.5px;
  color: #cbd5e1;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* Skills App */
.skill-item-ember {
  background: var(--phone-surface);
  border: 1px solid var(--phone-border);
  border-radius: var(--phone-radius-sm);
  padding: 12px;
  margin-bottom: 10px;
}

.sie-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.sie-title {
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 6px;
}

.sie-pct {
  font-size: 12px;
  font-weight: 700;
  color: #fb923c;
  font-variant-numeric: tabular-nums;
}

.sie-track {
  height: 5px;
  background: var(--phone-surface-2);
  border-radius: var(--phone-radius-pill);
  overflow: hidden;
}

.sie-fill {
  height: 100%;
  background: var(--phone-accent-grad);
  border-radius: var(--phone-radius-pill);
}

/* Termux Terminal */
.termux-wrapper {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.termux-console {
  flex: 1;
  background: #000000;
  color: #4ade80;
  font-family: Consolas, monospace;
  font-size: 12.5px;
  padding: 12px;
  border-radius: var(--phone-radius-sm);
  overflow-y: auto;
  line-height: 1.45;
  white-space: pre-wrap;
  border: 1px solid var(--phone-border);
}

.termux-keys-row {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 8px 0;
}

.termux-key-btn {
  background: var(--phone-surface);
  border: 1px solid var(--phone-border);
  color: #ffffff;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 11.5px;
  font-family: monospace;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.termux-key-btn:active {
  background: #fb923c;
  color: #0a0705;
}

.termux-entry-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--phone-surface);
  border: 1px solid var(--phone-border);
  border-radius: var(--phone-radius-sm);
  padding: 8px 12px;
}

.termux-prompt-char {
  color: #fb923c;
  font-family: monospace;
  font-weight: 700;
}

.termux-entry-bar input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: #ffffff;
  font-family: monospace;
  font-size: 13px;
}

/* Contact Tiles */
.contact-grid-ember {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.contact-tile-ember {
  background: var(--phone-surface);
  border: 1px solid var(--phone-border);
  border-radius: var(--phone-radius-md);
  padding: 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: #ffffff;
  text-align: center;
  cursor: pointer;
}

.contact-tile-ember:active {
  background: var(--phone-surface-2);
}

.cte-icon {
  font-size: 26px;
}

.cte-label {
  font-size: 13.5px;
  font-weight: 600;
}

.cte-detail {
  font-size: 10.5px;
  color: var(--phone-muted);
}

/* Calculator App */
.calc-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-width: 310px;
  margin: 0 auto;
}

.calc-screen-box {
  background: var(--phone-surface);
  border: 1px solid var(--phone-border);
  border-radius: var(--phone-radius-md);
  padding: 16px;
  text-align: right;
  margin-bottom: 12px;
}

.calc-screen-hist {
  font-size: 12px;
  color: var(--phone-muted);
  min-height: 16px;
}

.calc-screen-main {
  font-size: 38px;
  font-weight: 300;
  color: #ffffff;
  font-variant-numeric: tabular-nums;
}

.calc-keys-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.calc-btn-item {
  height: 54px;
  border-radius: 50%;
  background: var(--phone-surface);
  border: 1px solid var(--phone-border);
  color: #ffffff;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.calc-btn-item:active {
  background: var(--phone-surface-raised);
}

.calc-btn-item.op { background: #2c1a12; color: #fb923c; border-color: rgba(251, 146, 60, 0.3); }
.calc-btn-item.eq { background: #fb923c; color: #0a0705; font-weight: 700; }

/* Settings Wallpapers */
.settings-section-card {
  background: var(--phone-surface);
  border: 1px solid var(--phone-border);
  border-radius: var(--phone-radius-md);
  padding: 14px;
  margin-bottom: 14px;
}

.ssc-title {
  font-size: 11.5px;
  font-weight: 700;
  color: #fb923c;
  text-transform: uppercase;
  margin-bottom: 10px;
  letter-spacing: 0.5px;
}

.wall-swatches-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.wall-swatch-cell {
  height: 56px;
  border-radius: var(--phone-radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #ffffff;
}

.wall-swatch-cell.active {
  border-color: #fb923c;
}
