@import url('https://fonts.googleapis.com/css2?family=DM+Sans:opsz,wght@9..40,300;9..40,400;9..40,500;9..40,600;9..40,700&family=JetBrains+Mono:wght@400;500&display=swap');

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: #f0eeeb;
  min-height: 100vh;
  display: grid;
  place-items: center;
  -webkit-font-smoothing: antialiased;
  font-family: 'DM Sans', sans-serif;
  color: #1a1816;
  overflow: hidden;
  cursor: none;
}

.scene {
  perspective: 800px;
  display: flex;
  align-items: center;
  gap: 3.5rem;
}

.phone {
  width: 256px;
  height: 537px;
  position: relative;
  transform-style: preserve-3d;
  border-radius: 30px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.12);
}

.back {
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, #c0d0de, #a8bcd0, #b4c4d4);
  border-radius: 30px;
  transform: translateZ(-16px);
}

.edge {
  position: absolute;
  background: linear-gradient(180deg, #c8d8e5, #a8b8ca, #b8c8d6);
}

.edge-r {
  top: 30px;
  bottom: 30px;
  right: 0;
  width: 16px;
  transform-origin: right center;
  transform: rotateY(-90deg);
}

.edge-l {
  top: 30px;
  bottom: 30px;
  left: 0;
  width: 16px;
  transform-origin: left center;
  transform: rotateY(90deg);
}

.edge-t {
  left: 30px;
  right: 30px;
  top: 0;
  height: 16px;
  transform-origin: center top;
  transform: rotateX(-90deg);
  background: linear-gradient(90deg, #c0d0de, #b0c2d2, #c4d4e2);
}

.edge-b {
  left: 30px;
  right: 30px;
  bottom: 0;
  height: 16px;
  transform-origin: center bottom;
  transform: rotateX(90deg);
  background: linear-gradient(90deg, #b0c0d0, #a0b0c2, #b8c8d6);
}

.corner {
  position: absolute;
  width: 30px;
  height: 30px;
  transform-style: preserve-3d;
}

.corner-tl {
  top: 0;
  left: 0;
}

.corner-tr {
  top: 0;
  right: 0;
}

.corner-bl {
  bottom: 0;
  left: 0;
}

.corner-br {
  bottom: 0;
  right: 0;
}

.c-layer {
  position: absolute;
  inset: 0;
}

.corner-tl .c-layer {
  border-top: 2px solid #b3c3d3;
  border-left: 2px solid #b3c3d3;
  border-radius: 30px 0 0 0;
}

.corner-tr .c-layer {
  border-top: 2px solid #b3c3d3;
  border-right: 2px solid #b3c3d3;
  border-radius: 0 30px 0 0;
}

.corner-bl .c-layer {
  border-bottom: 2px solid #b3c3d3;
  border-left: 2px solid #b3c3d3;
  border-radius: 0 0 0 30px;
}

.corner-br .c-layer {
  border-bottom: 2px solid #b3c3d3;
  border-right: 2px solid #b3c3d3;
  border-radius: 0 0 30px 0;
}

.edge-r::before {
  content: '';
  position: absolute;
  top: 110px;
  left: 2px;
  right: 2px;
  height: 36px;
  background: #cdd8e4;
  border-radius: 2px;
  transform: translateZ(1px);
  box-shadow: 0 0 0 1px #90a1b3;
}

.edge-l::before {
  content: '';
  position: absolute;
  top: 90px;
  left: 2px;
  right: 2px;
  height: 26px;
  background: #cdd8e4;
  border-radius: 2px;
  transform: translateZ(1px);
  box-shadow: 0 0 0 1px #90a1b3;
}

.edge-l::after {
  content: '';
  position: absolute;
  top: 126px;
  left: 2px;
  right: 2px;
  height: 26px;
  background: #cdd8e4;
  border-radius: 2px;
  transform: translateZ(1px);
  box-shadow: 0 0 0 1px #90a1b3;
}

.edge-b::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) translateZ(-1px);
  width: 20px;
  height: 7px;
  background: #3a4650;
  border-radius: 3.5px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.5), inset 0 -0.5px 1px rgba(0, 0, 0, 0.2);
}

.edge-b::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(calc(-50% + 22px), -50%);
  width: 2px;
  height: 2px;
  background: #4a5a68;
  border-radius: 50%;
  box-shadow: 4px 0 0 #4a5a68, 8px 0 0 #4a5a68, -44px 0 0 #4a5a68, -48px 0 0 #4a5a68, -52px 0 0 #4a5a68;
}

.bezel {
  width: 100%;
  height: 100%;
  background: linear-gradient(160deg, #d0dde8, #b8cad8, #c4d4e2);
  border-radius: 30px;
  padding: 3px;
  position: relative;
  transform: translateZ(1px);
}

.inner {
  width: 100%;
  height: 100%;
  background: #080808;
  border-radius: 27px;
  padding: 3px;
}

.screen {
  width: 100%;
  height: 100%;
  border-radius: 24px;
  overflow: hidden;
  position: relative;
  background: #080808;
  -webkit-mask-image: -webkit-radial-gradient(white, black);
}

.screen::before {
  content: '';
  position: absolute;
  inset: 0;
  background: #000;
  opacity: var(--priv-opacity, 0);
  z-index: 20;
  pointer-events: none;
  border-radius: inherit;
}

.screen::after {
  content: '';
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #060606;
  z-index: 30;
  box-shadow: inset 0 0 2px rgba(30, 30, 60, 0.6), 0 0 0 0.5px rgba(255, 255, 255, 0.04);
}

.wallpaper {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  background: radial-gradient(ellipse 55% 45% at 60% 35%, rgba(100, 210, 200, 0.9), transparent 70%), radial-gradient(ellipse 50% 55% at 35% 60%, rgba(80, 190, 180, 0.7), transparent 65%), radial-gradient(ellipse 40% 30% at 50% 50%, rgba(140, 220, 210, 0.5), transparent), linear-gradient(155deg, #1a6b6a 0%, #2a9a98 25%, #48c4b8 45%, #3aada5 55%, #1a7a78 75%, #155858 100%);
}

.wallpaper::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('https://wallpapercg.com/media/ts_orig/33793.webp') center/cover no-repeat;
  z-index: 1;
  border-radius: inherit;
}

.status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 16px 0;
  position: relative;
  z-index: 10;
  height: 28px;
}

.status-bar svg {
  display: block;
}

.time {
  font-size: 0.62rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
}

.status-icons {
  display: flex;
  gap: 4px;
  align-items: center;
}

.notification {
  margin: 38px 9px 0;
  background: rgba(18, 16, 26, 0.72);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-radius: 18px;
  padding: 12px 14px;
  position: relative;
  z-index: 10;
}

.notification::before {
  content: '';
  position: absolute;
  inset: 0;
  background: #000;
  opacity: var(--notif-priv, 0);
  z-index: 15;
  border-radius: 18px;
  pointer-events: none;
}

.notif-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 5px;
}

.notif-icon {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  background: #3b82f6;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.notif-icon svg {
  display: block;
}

.notif-app {
  font-size: 0.5rem;
  color: rgba(255, 255, 255, 0.4);
}

.notif-when {
  font-size: 0.46rem;
  color: rgba(255, 255, 255, 0.25);
  margin-left: auto;
}

.notif-title {
  display: block;
  font-size: 0.6rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 2px;
  text-decoration: none;
}

.notif-body {
  font-size: 0.52rem;
  color: rgba(255, 255, 255, 0.48);
  line-height: 1.45;
}

.dock {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
  z-index: 10;
  background: rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 20px;
  padding: 8px 14px;
}

.dock-icon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  text-decoration: none;
}

.dock-icon svg {
  display: block;
}

.di-phone {
  background: linear-gradient(145deg, #34d058, #22a847);
}

.di-msg {
  background: linear-gradient(145deg, #5b7cf7, #3b5ce4);
}

.di-chrome {
  background: linear-gradient(145deg, #ea4335, #dd3327);
}

.di-cam {
  background: linear-gradient(145deg, #f5a623, #e8931a);
}

.home-bar {
  position: absolute;
  bottom: 5px;
  left: 50%;
  transform: translateX(-50%);
  width: 88px;
  height: 3.5px;
  background: rgba(255, 255, 255, 0.35);
  border-radius: 2px;
  z-index: 10;
}

.panel {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 200px;
}

.panel-title {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.panel-sub {
  font-size: 0.62rem;
  color: #8a8880;
  font-family: 'JetBrains Mono', monospace;
  margin-top: 0.2rem;
}

.mode-toggle {
  display: flex;
  background: #e4e1dc;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #d8d5d0;
}

.mode-btn {
  flex: 1;
  padding: 0.5rem 0.5rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.54rem;
  background: transparent;
  color: #8a8880;
  border: none;
  cursor: pointer;
  transition: background 0.25s, color 0.25s;
  text-align: center;
  white-space: nowrap;
}

.mode-btn.active {
  background: #fff;
  color: #1a1816;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.angle-readout {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: #a8a49c;
}

.angle-val {
  color: #1a1816;
  font-weight: 500;
}

.hint {
  font-size: 0.55rem;
  color: #b0aca4;
  font-family: 'JetBrains Mono', monospace;
  line-height: 1.6;
}

.refs {
  position: fixed;
  bottom: 0.6rem;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  padding: 0 0.75rem;
  pointer-events: none;
}

.ref {
  font-size: 0.5rem;
  font-family: 'JetBrains Mono', monospace;
  color: #c8c4bc;
  text-decoration: none;
  pointer-events: auto;
  transition: color 0.2s;
}

.ref:hover {
  color: #6a6860;
}

@media (max-width: 640px) {
  .scene {
    flex-direction: column;
    gap: 1.5rem;
    padding: 1rem;
  }

  .panel {
    max-width: 262px;
    align-items: center;
    text-align: center;
  }

  .phone {
    width: 224px;
    height: 469px;
  }
}

#snooper {
  position: fixed;
  top: 0;
  left: 0;
  font-size: 2.2rem;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.15));
  opacity: 0;
  transition: opacity 0.3s;
}

body:hover #snooper {
  opacity: 1;
}