/* iPhone 18 Pro Max, color negro. Se dibuja a 1 px = 1 pt (pantalla de 440 × 956) y se escala desde afuera. */
.iphone {
  position: relative;
  width: 471px;
  height: 987px;
  border-radius: 80px;
  padding: 15.5px;
  background: #040404;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.2),
    inset 0 0 0 3.5px #262628,
    inset 0 0 0 4.5px #050505,
    0 80px 120px -50px rgba(0, 0, 0, 0.9),
    0 0 0 1px rgba(0, 0, 0, 0.8);
}

/* Canto de aluminio con reflejo */
.iphone::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 2px;
  pointer-events: none;
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0.06) 22%, rgba(255, 255, 255, 0.02) 60%, rgba(255, 255, 255, 0.26) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

/* Botones: acción y volumen a la izquierda; lateral y Control de Cámara a la derecha */
.iphone .btn {
  position: absolute;
  width: 4px;
  border-radius: 2px;
}
.iphone .btn.accion,
.iphone .btn.vol-arriba,
.iphone .btn.vol-abajo {
  left: -3.5px;
  background: linear-gradient(90deg, #4a4a4e, #1d1d1f 70%);
}
.iphone .btn.lateral,
.iphone .btn.camara {
  right: -3.5px;
  background: linear-gradient(270deg, #4a4a4e, #1d1d1f 70%);
}
.iphone .btn.accion { top: 198px; height: 36px; }
.iphone .btn.vol-arriba { top: 264px; height: 66px; }
.iphone .btn.vol-abajo { top: 346px; height: 66px; }
.iphone .btn.lateral { top: 302px; height: 104px; }
.iphone .btn.camara { top: 612px; height: 58px; background: linear-gradient(270deg, #34343a, #141416 70%); }

.pantalla {
  position: relative;
  width: 440px;
  height: 956px;
  border-radius: 62px;
  overflow: hidden;
  background: #000;
  isolation: isolate;
  color: var(--texto);
}

.capas,
.capa {
  position: absolute;
  inset: 0;
}
.capa {
  opacity: 0;
  visibility: hidden;
  overflow: hidden;
}
.capa.activa {
  opacity: 1;
  visibility: visible;
}

.barra-estado {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 57px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #fff;
  z-index: 45;
  pointer-events: none;
}
.barra-estado > span {
  width: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.barra-estado .hora { transition: opacity 0.4s; }
.barra-estado.sin-hora .hora { opacity: 0; }
/* Sobre una pantalla clara (Instagram en modo claro) la barra y el indicador de inicio van en negro */
.pantalla.clara .barra-estado { color: #000; }
.pantalla.clara .indicador-inicio { background: rgba(0, 0, 0, 0.88); }

/* Isla dinámica, más chica que la del 17 Pro Max (Apple no publicó la medida exacta) */
.isla {
  position: absolute;
  top: 11px;
  left: 50%;
  width: 94px;
  height: 35px;
  margin-left: -47px;
  border-radius: 18px;
  background: #000;
  z-index: 50;
}

.indicador-inicio {
  position: absolute;
  bottom: 8px;
  left: 50%;
  width: 148px;
  height: 5px;
  margin-left: -74px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.88);
  z-index: 45;
}

.apagado {
  position: absolute;
  inset: 0;
  background: #000;
  z-index: 51;
  transition: opacity 1s var(--suave);
}
.pantalla.encendida .apagado {
  opacity: 0;
  pointer-events: none;
}

.reflejo {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 52;
  background: linear-gradient(118deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.015) 24%, transparent 40%);
}

/* Toque del dedo sobre un botón */
.toque {
  position: absolute;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.26);
  box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.4);
  pointer-events: none;
  z-index: 48;
  transform: translate(-50%, -50%);
  opacity: 0;
}
