:root{
  --stage1:#050505;
  --stage2:#2a2a2a;

  --text: rgba(255,255,255,0.92);
  --muted: rgba(255,255,255,0.72);

  --phone-border: #000;
  --radius: 34px;

  --status-h: 34px;
  --nav-h: 58px;

  --shadow: 0 30px 80px rgba(0,0,0,0.55);

  --font: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;

  /* icon styling */
  --icon-border: 8px;
  --icon-radius: 26px;
}

*{ box-sizing:border-box; }
html, body{ height:100%; }

body{
  margin:0;
  font-family: var(--font);
  color: var(--text);
}

/* ===== Stage background ===== */
body.stage{
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  background: linear-gradient(135deg, var(--stage1) 0%, var(--stage2) 50%, var(--stage1) 100%);
  padding: 24px;
}

/* ===== Phone shell ===== */
.phone-shell{
  position: relative;
  width: min(420px, 96vw);
  height: min(860px, 92vh);

  border: 12px solid var(--phone-border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);

  background: #111;
}

/* Wallpaper inside phone */
.phone-shell::before{
  content:"";
  position:absolute;
  inset:0;

  /* from blog/css/ -> ../../assets/ */
  background-image: url("../../assets/wallpaper/leaf.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;

  transform: rotate(180deg);
  transform-origin: center;

  z-index: 0;
}

/* readability overlay */
.phone-shell::after{
  content:"";
  position:absolute;
  inset:0;
  background: rgba(0,0,0,0.28);
  z-index: 0;
}

/* ===== Status bar ===== */
.status-bar{
  position: relative;
  z-index: 2;
  height: var(--status-h);

  display:flex;
  align-items:center;
  justify-content:space-between;

  padding: 0 12px;
  background: rgba(0,0,0,0.20);
  backdrop-filter: blur(14px);
}

.status-time{
  font-size: 14px;
  letter-spacing: 0.2px;
}

.status-icons{
  display:flex;
  align-items:center;
  gap: 10px;
  font-size: 14px;
  opacity: 0.95;
}

/* ===== Content ===== */
.phone-content{
  position: relative;
  z-index: 2;

  height: calc(100% - var(--status-h) - var(--nav-h));
  overflow:auto;

  padding: 18px 18px 18px;
}

/* ===== Search bar (top) ===== */
.search-wrap{
  margin-top: 6px;
  margin-bottom: 18px; /* pushes apps down a nudge */
}

.search{
  display:flex;
  align-items:center;
  gap: 10px;

  padding: 12px 12px;
  border-radius: 18px;

  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(255,255,255,0.18);
  box-shadow: 0 12px 30px rgba(0,0,0,0.35);

  backdrop-filter: blur(14px);
}

.search-ico{
  font-size: 16px;
  opacity: 0.9;
}

.search input{
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text);
  font-size: 15px;
}

.search input::placeholder{
  color: rgba(255,255,255,0.65);
}

.search-clear{
  border: none;
  background: rgba(255,255,255,0.10);
  color: rgba(255,255,255,0.85);
  border-radius: 12px;
  padding: 6px 10px;
  cursor: pointer;
}

.search-clear:active{
  transform: scale(0.96);
}

/* ===== Launcher Grid ===== */
.grid{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  align-items: start;
}

/* App tile wrapper */
.app{
  text-decoration:none;
  color: var(--text);
  display:flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;

  /* press animation readiness */
  transition: transform 120ms ease;
}

.app:active{
  transform: scale(0.94); /* instant dopamine */
}

/* Icon square */
.app-square{
  width: 110px;
  height: 110px;

  background: #fff;
  border: var(--icon-border) solid #000;
  border-radius: var(--icon-radius);

  display:flex;
  align-items:center;
  justify-content:center;

  /* subtle shadow */
  box-shadow: 0 8px 20px rgba(0,0,0,0.35);
}

.app-emoji{
  font-size: 48px;
  line-height: 1;
}

.app-label{
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  text-shadow: 0 2px 10px rgba(0,0,0,0.55);
}

.app-spacer{
  width: 110px;
  height: 110px;
}

/* ===== Android nav ===== */
.android-nav{
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;

  height: var(--nav-h);
  z-index: 2;

  display:flex;
  align-items:center;
  justify-content:space-around;

  background: rgba(0,0,0,0.22);
  backdrop-filter: blur(14px);
}

.nav-btn,
.nav-home{
  border: none;
  background: transparent;
  color: rgba(255,255,255,0.90);
  font-size: 22px;
  text-decoration:none;

  padding: 10px 16px;
  border-radius: 999px;
}

.nav-btn:disabled{ opacity: 0.45; }

/* Mobile tweaks */
@media (max-width: 520px){
  .grid{ gap: 14px; }
  .app-square{ width: 96px; height: 96px; }
  .app-spacer{ width: 96px; height: 96px; }
  .app-emoji{ font-size: 42px; }
  .phone-content{ padding: 16px; }
}
