/* ─── RESET ─── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ─── BASE ─── */
body {
  background: #f0eeeb;
  font-family: 'DM Sans', sans-serif;
  color: #1a1816;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ─── LAYOUT ─── */
.wrap {
  min-height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

.scene {
  perspective: 800px;
  display: flex;
  align-items: center;
  gap: 3.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

/* ─── TELÉFONO ─── */
.phone {
  width: 220px;
  height: 460px;
  position: relative;
  transform-style: preserve-3d;
  border-radius: 30px;
  flex-shrink: 0;
}

.back {
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, #c0d0de, #a8bcd0, #b4c4d4);
  border-radius: 30px;
  transform: translateZ(-16px);
}

/* ─── BORDES 3D ─── */
.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);
}

.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);
}

/* ─── ESQUINAS 3D (generadas por JS) ─── */
.corner {
  position: absolute;
  width: 30px; height: 30px;
  transform-style: preserve-3d;
  pointer-events: none;
}

.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; }

/* ─── BISEL Y PANTALLA ─── */
.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;
}

.screen::before {
  content: '';
  position: absolute;
  inset: 0;
  background: #000;
  opacity: var(--priv-opacity, 0);
  z-index: 20;
  pointer-events: none;
  border-radius: inherit;
  transition: opacity 0.3s;
}

/* Cámara frontal */
.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);
}

/* ─── WALLPAPER ─── */
.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%),
    linear-gradient(155deg, #1a6b6a 0%, #2a9a98 25%, #48c4b8 45%, #3aada5 55%, #1a7a78 75%, #155858 100%);
}

/* ─── STATUS BAR ─── */
.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;
}

/* ─── NOTIFICACIÓN ─── */
.notification {
  margin: 34px 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;
  opacity: 0;
  transform: translateY(-8px) scale(0.97);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.notification.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.notif-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 5px;
}

.notif-icon {
  width: 18px; height: 18px;
  border-radius: 5px;
  background: #22c55e;
  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;
}

.notif-body {
  font-size: 0.52rem;
  color: rgba(255,255,255,0.7);
  line-height: 1.45;
}

/* ─── DOCK ─── */
.dock {
  position: absolute;
  bottom: 16px; left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 10;
  background: rgba(0,0,0,0.22);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 20px;
  padding: 8px 12px;
}

.dock-icon {
  width: 34px; height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
}

.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 ─── */
.home-bar {
  position: absolute;
  bottom: 5px; left: 50%;
  transform: translateX(-50%);
  width: 80px; height: 3.5px;
  background: rgba(255,255,255,0.35);
  border-radius: 2px;
  z-index: 10;
}

/* ─── FORMULARIO ─── */
.form-panel {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 220px;
}

.form-title {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #1a1816;
}

.form-sub {
  font-size: 0.6rem;
  color: #8a8880;
  font-family: 'JetBrains Mono', monospace;
  margin-top: 0.15rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-label {
  font-size: 0.65rem;
  font-weight: 500;
  color: #8a8880;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.03em;
}

.form-input {
  padding: 8px 10px;
  font-size: 0.75rem;
  font-family: 'DM Sans', sans-serif;
  border-radius: 10px;
  border: 1px solid #d8d5d0;
  background: #fff;
  color: #1a1816;
  outline: none;
  transition: border-color 0.2s;
}

.form-input:focus {
  border-color: #1a9a98;
}

textarea.form-input {
  resize: none;
  height: 80px;
  line-height: 1.5;
}

/* ─── CONTADOR ─── */
.counter-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.counter-label {
  font-size: 0.55rem;
  font-family: 'JetBrains Mono', monospace;
  color: #8a8880;
}

.dots {
  display: flex;
  gap: 4px;
}

.dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #d8d5d0;
  transition: background 0.3s;
}

.dot.used {
  background: #1a9a98;
}

/* ─── BOTÓN ─── */
.send-btn {
  padding: 10px;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, #1a9a98, #48c4b8);
  color: #fff;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
  letter-spacing: 0.01em;
}

.send-btn:hover  { opacity: 0.88; }
.send-btn:active { transform: scale(0.98); }

.send-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ─── STATUS MSG ─── */
.status-msg {
  font-size: 0.6rem;
  font-family: 'JetBrains Mono', monospace;
  min-height: 14px;
  color: #1a9a98;
  text-align: center;
}

.status-msg.error {
  color: #e24b4a;
}

/* ─── RESPONSIVE ─── */
@media (max-width: 640px) {
  .scene {
    flex-direction: column;
    gap: 2rem;
  }

  .form-panel {
    width: 260px;
  }
}