* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 16px;
  background: #242426;
  color: white;
  font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif;
}

.phone {
  width: min(100%, 390px);
  height: min(780px, 92dvh);
  min-height: 550px;
  position: relative;
  overflow: hidden;
  border: 5px solid #555;
  border-radius: 38px;
  background:
    radial-gradient(ellipse at 25% 35%, #68686a, transparent 45%),
    linear-gradient(150deg, #38383b, #101012 80%);
  box-shadow: 0 20px 70px #0009;
}

.status {
  position: absolute;
  z-index: 5;
  top: 12px;
  left: 24px;
  right: 24px;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
}

.screen {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  padding: 45px 20px 35px;
}

.hidden {
  display: none !important;
}

#lock {
  text-align: center;
}

#date {
  font-size: 18px;
  font-weight: 600;
  margin: 25px 0 0;
}

#clock {
  font-size: clamp(64px, 18vw, 94px);
  font-weight: 600;
  letter-spacing: -4px;
}

.lock-bottom {
  position: absolute;
  bottom: 40px;
  left: 20px;
  right: 20px;
}

button {
  color: inherit;
  font: inherit;
  cursor: pointer;
}

#unlock, #cancel, #back {
  border: 0;
  background: transparent;
  padding: 12px;
}

.lock-icon {
  text-align: center;
  font-size: 28px;
  margin-top: 15px;
}

#passcode {
  text-align: center;
}

#passcode h2 {
  font-size: 22px;
  font-weight: 500;
}

#dots {
  margin: 22px 0 35px;
  letter-spacing: 8px;
  font-size: 23px;
}

.keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  max-width: 290px;
  margin: auto;
}

.key {
  width: 70px;
  height: 70px;
  margin: auto;
  border: 0;
  border-radius: 50%;
  background: #55575b;
  font-size: 27px;
}

.key:active {
  background: #858589;
}

#cancel {
  margin-top: 20px;
}

#error {
  color: #ffaaa5;
  min-height: 18px;
  font-size: 13px;
}

#home h2 {
  margin-top: 25px;
  font-size: 30px;
}

.apps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px 12px;
  margin-top: 45px;
}

.app {
  border: 0;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  font-size: 12px;
}

.app-icon {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: #eee;
  color: #222;
  font-size: 29px;
}

.green { background: #32c76a; }
.yellow { background: #f4d86d; }
.blue { background: #1686ef; }
.gray { background: #aaa; }

.dock {
  position: absolute;
  bottom: 42px;
  left: 12px;
  right: 12px;
  display: flex;
  justify-content: space-around;
  padding: 12px;
  border-radius: 25px;
  background: #ffffff35;
}

.dock button {
  width: 53px;
  height: 53px;
  border: 0;
  border-radius: 15px;
  font-size: 24px;
  background: #f5f5f5;
}

#appscreen header {
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid #444;
}

#app-title {
  font-size: 18px;
}

#app-content {
  padding-top: 15px;
}

.chat-message {
  margin: 14px 0;
}

.sender {
  color: #aaa;
  font-size: 12px;
  margin-bottom: 5px;
}

.bubble {
  display: inline-block;
  max-width: 90%;
  padding: 12px 15px;
  border-radius: 19px;
  background: #303033;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.chat-input {
  display: flex;
  gap: 6px;
  margin-top: 20px;
}

.chat-input input {
  width: 100%;
  min-width: 0;
  border-radius: 20px;
  border: 1px solid #555;
  background: #171719;
  color: white;
  padding: 10px;
}

.chat-input button {
  border: 0;
  border-radius: 50%;
  background: #1686ef;
  padding: 8px 12px;
}

.home-indicator {
  position: absolute;
  z-index: 6;
  bottom: 9px;
  left: 36%;
  width: 28%;
  height: 4px;
  border-radius: 5px;
  background: white;
}/* IPHONE LOCKSCREEN UPGRADE */

.phone {
  background:
    radial-gradient(ellipse at 20% 40%, #77777a 0%, transparent 43%),
    radial-gradient(ellipse at 80% 10%, #454548 0%, transparent 45%),
    linear-gradient(155deg, #29292c, #101012 75%);
}

#lock {
  background:
    linear-gradient(180deg, #00000008 45%, #00000040 100%);
}

#date {
  margin-top: 20px;
  font-size: 18px;
  letter-spacing: 0.2px;
}

#clock {
  font-size: 94px;
  font-weight: 600;
  letter-spacing: -4px;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.notification {
  position: absolute;
  bottom: 112px;
  left: 12px;
  right: 12px;
  width: calc(100% - 24px);
  padding: 12px;
  text-align: left;
  color: white;
  background: #333338e8;
  border: 1px solid #ffffff16;
  border-radius: 17px;
  backdrop-filter: blur(20px);
}

.notif-top {
  display: flex;
  justify-content: space-between;
  margin-bottom: 9px;
  color: #c5c5c9;
  font-size: 11px;
  text-transform: uppercase;
}

.notif-body {
  display: flex;
  align-items: center;
  gap: 10px;
}

.notif-avatar {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #77777c;
  font-size: 19px;
}

.notif-body strong {
  font-size: 13px;
}

.notif-body p {
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.4;
  color: #eeeeef;
}

.lock-bottom {
  bottom: 35px;
}

#unlock {
  color: #dddddf;
  font-size: 13px;
}

/* HOMESCREEN */

#home {
  background: #19191c55;
}

.apps {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px 5px;
  margin-top: 35px;
}

.app-icon {
  width: min(100%, 58px);
  aspect-ratio: 1;
  height: auto;
  border-radius: 14px;
  box-shadow: 0 2px 5px #0002;
}

.app {
  font-size: 11px;
}

.dock {
  background: #ffffff24;
  border: 1px solid #ffffff30;
  backdrop-filter: blur(18px);
}

/* DARK IMESSAGE */

#appscreen {
  background: #000;
  padding-left: 15px;
  padding-right: 15px;
}

#appscreen header {
  background: #080808;
  position: sticky;
  top: -45px;
  z-index: 2;
  padding: 5px 0 12px;
}

#app-title {
  font-weight: 600;
}

.chat-message {
  margin: 19px 0;
}

.sender {
  font-size: 12px;
  color: #929298;
  margin-bottom: 5px;
}

.bubble {
  border-radius: 19px;
  background: #29292d;
  font-size: 15px;
}

#appscreen .chat-input {
  position: sticky;
  bottom: 0;
  padding: 10px 0;
  background: #000;
}

#appscreen .chat-input input {
  border-radius: 22px;
  border-color: #45454a;
}