:root {
  color-scheme: dark;
  --bg: #03090d;
  --panel: rgba(8, 19, 29, 0.82);
  --line: rgba(255, 255, 255, 0.11);
  --ink: #ffffff;
  --muted: #b5bcc7;
  --green: #00c875;
  --green-dark: #009f5d;
  --iphone-17-ratio: 71.5 / 149.6;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 50% 22%, rgba(7, 80, 120, 0.22), transparent 42rem),
    radial-gradient(circle at 50% 90%, rgba(0, 200, 117, 0.08), transparent 34rem),
    var(--bg);
}

button,
a {
  font: inherit;
}

button {
  cursor: pointer;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 12;
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 24px;
  min-height: 76px;
  padding: 12px clamp(18px, 4vw, 34px);
  border-bottom: 1px solid var(--line);
  background: rgba(3, 9, 13, 0.78);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: white;
  text-decoration: none;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 900;
  letter-spacing: 0;
}

.brand img {
  width: 34px;
  height: 34px;
  border-radius: 0;
  object-fit: contain;
}

.brand strong {
  color: var(--green);
}

.site-header p {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: clamp(0.95rem, 2vw, 1.25rem);
}

.menu-button {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.75);
  background: transparent;
  font-size: 1.9rem;
  line-height: 1;
}

.app-shell {
  width: min(100%, 1280px);
  min-height: calc(100vh - 174px);
  margin: 0 auto;
  padding: 24px clamp(16px, 4vw, 32px) 140px;
}

.screen {
  display: none;
}

.screen.active {
  display: block;
}

.hero-title {
  text-align: center;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 6px;
  font-size: clamp(2rem, 4.5vw, 3rem);
  line-height: 1.06;
  letter-spacing: 0;
}

.hero-title p {
  margin-bottom: 22px;
  color: var(--muted);
  font-size: clamp(1rem, 2.1vw, 1.35rem);
}

.compact-title {
  margin-bottom: 22px;
}

.phone-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(210px, 282px));
  justify-content: center;
  align-items: center;
  gap: clamp(36px, 6vw, 78px);
}

.phone-preview,
.device-phone {
  width: min(100%, 282px);
}

.phone-frame {
  position: relative;
  width: 100%;
  aspect-ratio: var(--iphone-17-ratio);
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 30px;
  background: #080a0c;
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.6);
}

.phone-frame::before,
.phone-frame::after {
  content: "";
  position: absolute;
  right: -4px;
  width: 4px;
  border-radius: 6px;
  background: linear-gradient(#868a91, #262a2e);
}

.phone-frame::before {
  top: 132px;
  height: 54px;
}

.phone-frame::after {
  top: 206px;
  height: 82px;
}

.phone-glass {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 26px;
  color: white;
  background-color: #05070a;
  background-size: 100% 100%;
  background-position: center;
  background-repeat: no-repeat;
  isolation: isolate;
}

.phone-glass::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0.16));
  pointer-events: none;
}

.phone-glass::after {
  content: "";
  position: absolute;
  top: 2.4%;
  left: 50%;
  z-index: 4;
  width: 31%;
  height: 4.45%;
  transform: translateX(-50%);
  border-radius: 999px;
  background:
    radial-gradient(circle at 78% 50%, rgba(176, 204, 230, 0.78) 0 5%, rgba(56, 78, 102, 0.58) 6% 11%, rgba(0, 0, 0, 0) 12%),
    radial-gradient(circle at 78% 50%, rgba(255, 255, 255, 0.4) 0 2%, transparent 3%),
    #030303;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    inset -16px -3px 20px rgba(255, 255, 255, 0.06),
    0 4px 12px rgba(0, 0, 0, 0.42);
  pointer-events: none;
}

.status-row {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  padding: 15px 20px 0;
  font-size: 0.72rem;
  font-weight: 800;
}

.search-widget {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 28px 1fr 18px;
  align-items: center;
  gap: 8px;
  width: calc(100% - 32px);
  min-height: 38px;
  margin: 52px auto 0;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.search-widget span {
  color: #4285f4;
  font-size: 1.3rem;
  font-weight: 900;
}

.search-widget i,
.search-widget b {
  justify-self: end;
  width: 14px;
  height: 18px;
  border-radius: 10px;
  background: linear-gradient(#4285f4, #ea4335 44%, #fbbc05 66%, #34a853);
}

.search-widget b {
  width: 16px;
  height: 16px;
  border-radius: 50%;
}

.app-icons {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 26px 16px;
  width: calc(100% - 42px);
  margin: 158px auto 0;
}

.app-icons span,
.app-icons a {
  position: relative;
  display: block;
  width: 42px;
  height: 42px;
  margin: 0 auto;
  border-radius: 12px;
  background-color: white;
  background-position: center;
  background-repeat: no-repeat;
  background-size: 76%;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.28);
  text-decoration: none;
}

.app-icons span::after,
.app-icons a::after {
  content: attr(data-label);
  position: absolute;
  top: 48px;
  left: 50%;
  width: 68px;
  transform: translateX(-50%);
  color: white;
  text-align: center;
  font-size: 0.64rem;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.85);
}

.yt { background-image: url("assets/icons/youtube.svg"); }
.gm { background-image: url("assets/icons/gmail.svg"); }
.cr { background-image: url("assets/icons/chrome.svg"); }
.mp { background-image: url("assets/icons/maps.svg"); }
.ps { background-image: url("assets/icons/play-store.svg"); }
.dr { background-image: url("assets/icons/drive.svg"); }
.ph { background-image: url("assets/icons/photos.svg"); }
.mt { background-image: url("assets/icons/meet.svg"); }

.web-link {
  display: grid !important;
  place-items: center;
  background: linear-gradient(135deg, #00c875, #13d7ff) !important;
}

.web-link::before {
  content: attr(data-label);
  color: white;
  font-size: 0.58rem;
  font-weight: 900;
}

.page-dots {
  position: absolute;
  right: 0;
  bottom: 86px;
  left: 0;
  z-index: 2;
  display: flex;
  justify-content: center;
  gap: 7px;
}

.page-dots span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.42);
}

.page-dots .active {
  background: white;
}

.dock {
  position: absolute;
  right: 18px;
  bottom: 18px;
  left: 18px;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.dock span {
  aspect-ratio: 1;
  border-radius: 13px;
  background: linear-gradient(135deg, #0abf67, #2d8cff);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.34);
}

.dock span:nth-child(3) {
  background: linear-gradient(135deg, #f7f7f7, #2b2b2b);
}

.dock span:nth-child(4) {
  background: linear-gradient(135deg, #ff2e73, #ff6f8e);
}

.apply-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  width: min(92vw, 594px);
  min-height: 68px;
  margin: 22px auto 8px;
  border: 0;
  border-radius: 20px;
  color: white;
  background: linear-gradient(180deg, #06d17c, #009b59);
  box-shadow: 0 18px 42px rgba(0, 200, 117, 0.28);
  font-size: clamp(1.25rem, 3vw, 1.9rem);
  font-weight: 900;
  letter-spacing: 0;
}

.phone-mark {
  width: 25px;
  height: 38px;
  border: 3px solid currentColor;
  border-radius: 6px;
}

.safe-line {
  margin: 0;
  color: var(--muted);
  text-align: center;
  font-size: 1.02rem;
}

.safe-line::before {
  content: "◆";
  margin-right: 9px;
  color: #a8b0bd;
  font-size: 0.82rem;
}

.bottom-nav {
  position: fixed;
  right: clamp(18px, 2vw, 32px);
  bottom: 20px;
  left: clamp(18px, 2vw, 32px);
  z-index: 10;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  max-width: 1480px;
  min-height: 80px;
  margin: 0 auto;
  padding: 8px 20px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(8, 19, 29, 0.84);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(20px);
}

.nav-item {
  display: grid;
  place-items: center;
  gap: 4px;
  border: 0;
  border-radius: 18px;
  color: var(--muted);
  background: transparent;
  font-size: 1rem;
  font-weight: 750;
}

.nav-item.active {
  color: var(--green);
}

.home-icon,
.image-icon {
  width: 28px;
  height: 28px;
  display: block;
  position: relative;
}

.home-icon::before {
  content: "";
  position: absolute;
  inset: 4px 3px 2px;
  background: currentColor;
  clip-path: polygon(50% 0, 100% 42%, 86% 42%, 86% 100%, 14% 100%, 14% 42%, 0 42%);
}

.image-icon {
  border: 3px solid currentColor;
  border-radius: 5px;
}

.image-icon::before {
  content: "";
  position: absolute;
  right: 4px;
  bottom: 4px;
  left: 4px;
  height: 10px;
  background: currentColor;
  clip-path: polygon(0 100%, 34% 36%, 52% 62%, 68% 28%, 100% 100%);
}

.upload-wallpapers {
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(100%, 560px);
  min-height: 54px;
  margin: 0 auto 22px;
  border: 1px dashed rgba(0, 200, 117, 0.65);
  border-radius: 10px;
  color: var(--green);
  background: rgba(0, 200, 117, 0.08);
  font-weight: 850;
}

.upload-wallpapers input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.wallpaper-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 18px;
  max-width: 1120px;
  margin: 0 auto;
}

.wallpaper-card {
  position: relative;
  aspect-ratio: var(--iphone-17-ratio);
  min-height: 292px;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  color: white;
  background-color: #05070a;
  background-size: 100% 100%;
  background-position: center;
  background-repeat: no-repeat;
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.38);
}

.wallpaper-card.selected {
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(0, 200, 117, 0.14), 0 20px 44px rgba(0, 0, 0, 0.38);
}

.wallpaper-card span {
  position: absolute;
  right: 10px;
  bottom: 10px;
  left: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.42);
  font-size: 0.9rem;
  font-weight: 850;
}

.permission-dialog {
  width: min(92vw, 430px);
  border: 0;
  border-radius: 18px;
  padding: 0;
  background: transparent;
}

.permission-dialog::backdrop {
  background: rgba(0, 0, 0, 0.68);
}

.permission-panel {
  display: grid;
  gap: 14px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: white;
  background: #101820;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.46);
}

.permission-panel p {
  color: var(--muted);
  line-height: 1.45;
}

.permission-panel label {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.permission-panel input {
  width: 20px;
  height: 20px;
  accent-color: var(--green);
}

.permission-panel menu {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin: 6px 0 0;
  padding: 0;
}

.permission-panel button {
  min-height: 42px;
  border-radius: 999px;
  padding: 0 18px;
  font-weight: 800;
}

.permission-panel .secondary {
  border: 1px solid var(--line);
  color: white;
  background: transparent;
}

.permission-panel .confirm {
  border: 0;
  color: white;
  background: var(--green);
}

.device-mode {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 18px;
  background: #03090d;
}

.device-mode.hidden {
  display: none;
}

.device-phone {
  width: min(94vw, 390px);
}

.device-phone .app-icons {
  margin-top: 126px;
}

.control-center,
.notifications {
  position: absolute;
  inset: 0;
  z-index: 5;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-26px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.control-center.open,
.notifications.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.control-center {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  align-content: start;
  gap: 12px;
  padding: 74px 18px 18px;
  background: rgba(12, 18, 24, 0.42);
  backdrop-filter: blur(24px);
}

.control-tile,
.slider {
  min-height: 82px;
  border-radius: 22px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.22);
  font-weight: 850;
}

.control-tile.double {
  grid-row: span 2;
}

.slider {
  display: grid;
  align-items: end;
  min-height: 150px;
}

.notifications {
  padding: 78px 18px 18px;
  background: rgba(242, 244, 246, 0.78);
  color: #111;
  backdrop-filter: blur(20px);
}

.notifications h2 {
  margin-bottom: 16px;
}

.notifications article {
  margin-bottom: 10px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 8px 20px rgba(30, 35, 40, 0.12);
}

.notifications p {
  margin-bottom: 0;
  color: #4f5961;
}

.exit-device {
  position: fixed;
  top: 18px;
  right: 18px;
  min-height: 42px;
  border: 0;
  border-radius: 999px;
  padding: 0 18px;
  color: white;
  background: rgba(255, 255, 255, 0.18);
  font-weight: 800;
}

.gesture-hint {
  position: fixed;
  right: 16px;
  bottom: 14px;
  left: 16px;
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  text-align: center;
  font-size: 0.9rem;
}

@media (max-width: 860px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .site-header p {
    display: none;
  }

  .app-shell {
    padding-top: 18px;
    padding-bottom: 126px;
  }

  .phone-row {
    grid-template-columns: minmax(230px, 330px);
    gap: 0;
  }

  .side-phone {
    display: none;
  }

  .phone-preview {
    justify-self: center;
  }

  .phone-frame {
    border-radius: 46px;
  }

  .apply-button {
    min-height: 64px;
    border-radius: 18px;
  }

  .bottom-nav {
    min-height: 76px;
    border-radius: 22px;
  }
}

@media (max-height: 820px) and (min-width: 861px) {
  .phone-row {
    grid-template-columns: repeat(3, minmax(200px, 250px));
  }

  .app-icons {
    margin-top: 132px;
  }

  .apply-button {
    min-height: 64px;
    margin-top: 18px;
  }
}
