/* =============================================================
   IPHONE MESSAGE TEMPLATE — STYLESHEET
   -------------------------------------------------------------
   use Ctrl+F / Cmd+F and search a section name in all-caps
   (e.g. "DOCK") to jump straight to it.
============================================================= */

@import url("https://fonts.googleapis.com/css2?family=Nunito:ital,wght@0,200..1000;1,200..1000&display=swap");

/* -----------------------------------------------------------
   BASE STYLES & CURSOR
----------------------------------------------------------- */

* {
  box-sizing: border-box;
}

/* this is the page background behind the phone (not the phone screen itself —
   that's further down under IPHONE SCREEN). 📝 EDIT ME: swap background-image
   for your own pattern/image, or delete it to just use background-color. */
html,
body {
  height: 100vh !important;
  width: 100vw !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden;
  background-color: #4b0101;
  background-image: url("/WEBSITE/BLOODBITES/main-bg.gif");
}

body {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  perspective: 2500px;
  -webkit-font-smoothing: subpixel-antialiased;
  image-rendering: -webkit-optimize-contrast;
  font-size: 12px;
  color: #616161;
  font-family: "Nunito", sans-serif;
  background: transparent !important;
}

@media (max-width: 350px) {
  .iphone6-bezel {
    transform: scale(0.9);
  }
}

/* -----------------------------------------------------------
   LINKS, SELECTION & SCROLLBARS
----------------------------------------------------------- */

a {
  color: red;
  text-decoration: none;
  font-weight: 700;
  transition: color 0.2s ease;
}

a:hover {
  color: indianred;
  text-decoration: underline;
}

/* -----------------------------------------------------------
   POPUP NOTIFICATION 
----------------------------------------------------------- */
.win-window {
  position: absolute;
  top: 40px;
  left: 50%;
  transform: translateX(-50%);
  width: 260px;
  max-width: 90%;
  background: black;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  z-index: 3000;
  border: 1px solid red;
  touch-action: none;
  user-select: none;
  animation: slideDown 0.4s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

@keyframes slideDown {
  from {
    transform: translate(-50%, -20px);
    opacity: 0;
  }
  to {
    transform: translate(-50%, 0);
    opacity: 1;
  }
}

.win-header {
  background: red;
  padding: 8px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid red;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
  cursor: move;
  box-shadow:
    inset 2px 2px 0px darkred(255, 255, 255, 0.8),
    inset -2px -2px 2px #4b0101(215, 127, 171, 0.15);
}

.win-title {
  font-size: 0.7rem;
  font-weight: 800;
  color: black;
  text-transform: lowercase;
  font-family: nunito;
}

.win-controls {
  display: flex;
  gap: 5px;
}

.win-btn {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: black;
  border: 1px solid white;
}

.win-btn.close {
  background: white;
  cursor: pointer;
  transition: 0.2s;
}

.win-btn.close:hover {
  background: grey;
}

.win-body {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  font-weight: normal;
  font-family: "Nunito", sans-serif;
  font-size: 12px;
  color: red;
}

/* -----------------------------------------------------------
   IPHONE CONTAINER 
----------------------------------------------------------- */

.iphone6-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  width: 100vw;
  padding: 0;
  position: relative;
  z-index: 10;
  overflow: hidden;
}

.iphone6-bezel {
  width: 320px;
  height: 656px;
  background: #000000;
  border-radius: 40px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow:
    0 15px 35px rgba(0, 0, 0, 0.12),
    inset 0 0 5px rgba(0, 0, 0, 0.05),
    0 0 0 2px #1a1a1a;
  border: 1px solid #1a1a1a;
  padding: 50px 12px 60px 12px;
  margin: auto;
  transform-origin: center center;
  will-change: transform;
}

/* -----------------------------------------------------------
   RESPONSIVE / MOBILE SCALING
   the phone's real size is fixed at 320x656px (set above under
   .iphone6-bezel). instead of letting it overflow small screens,
   these rules scale the whole bezel down using transform: scale(),
   based on the viewport height. tweak the multipliers (0.78 / 0.72)
   if you want the phone to appear bigger or smaller on small screens.
----------------------------------------------------------- */
@media (max-width: 1024px) {
  .iphone6-container {
    height: 100vh !important;
    width: 100vw !important;
  }

  .iphone6-bezel {
    transform: scale(calc((100vh / 656px) * 0.78)) !important;
  }
}

@media (max-height: 600px) {
  .iphone6-bezel {
    transform: scale(calc((100vh / 656px) * 0.72)) !important;
  }
}

/* -----------------------------------------------------------
   TOP ELEMENTS & HOME BUTTON
----------------------------------------------------------- */
.iphone6-top-elements {
  position: absolute;
  top: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.camera {
  width: 6px;
  height: 6px;
  background: #1a1a1a;
  border-radius: 50%;
}

.speaker {
  width: 40px;
  height: 4px;
  background: #dcdcdc;
  border-radius: 10px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

.iphone6-home-button {
  width: 45px;
  height: 45px;
  background: #000000;
  border: 1px solid #333333;
  border-radius: 50%;
  position: absolute;
  bottom: 8px;
  cursor: pointer;
  box-shadow:
    inset 0 2px 4px rgba(0, 0, 0, 0.05),
    0 1px 2px rgba(0, 0, 0, 0.1);
  transition: all 0.1s ease;
  outline: none;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 30;
}

.iphone6-home-button:active {
  transform: scale(0.96);
  background: #f0f0f0;
}

.iphone6-home-button::after {
  content: "";
  width: 14px;
  height: 14px;
  border: 1.5px solid #bebebe;
  border-radius: 4px;
  opacity: 0.7;
}

/* -----------------------------------------------------------
   IPHONE SCREEN & STATUS BAR
----------------------------------------------------------- */
/* 📝 EDIT ME: this is the "wallpaper" shown on the home screen, behind the
   dock. swap the url() below for your own image. */
.iphone6-screen {
  width: 100%;
  flex: 1;
  min-height: 0;
  border-radius: 4px;
  position: relative;
  border: 2px solid #1a1a1a;
  background: url("/WEBSITE/BLOODBITES/phone-bg.jpg") no-repeat center center !important;
  background-size: cover !important;
  display: flex;
  flex-direction: column;
  overflow: hidden !important;
}

.ipad-status-bar {
  border-radius: 4px 4px 0 0;
  height: 25px;
  padding: 0 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 11px;
  font-weight: 600;
  color: grey;
  background-color: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 10;
  transition:
    background-color 0.3s ease,
    color 0.3s ease,
    backdrop-filter 0.3s ease;
}

.status-right {
  display: flex;
  gap: 8px;
  align-items: center;
}

.status-battery-icon {
  width: 18px;
  height: 8px;
  border: 1px solid currentColor;
  border-radius: 2px;
  position: relative;
  display: inline-block;
  vertical-align: middle;
}

.status-battery-juice {
  width: 15px;
  height: 4.5px;
  background-color: currentColor;
  border-radius: 0.5px;
  position: absolute;
  top: 1px;
  left: 1px;
}

/* -----------------------------------------------------------
   GRID & APPS
----------------------------------------------------------- */
.iphone6-scroll-area {
  flex: 1;
  overflow-y: auto;
  padding-top: 8px;
}

.iphone6-scroll-area::-webkit-scrollbar {
  display: none;
}

.iphone-home-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  padding: 145px 12px 12px;
  justify-items: center;
}

.app-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.app-icon {
  width: 45px;
  height: 45px;
  border-radius: 10px;
  background-size: cover;
  background-position: center;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  position: relative;
  overflow: hidden;
}

.app-icon::before {
  content: "";
  position: absolute;
  top: -25%;
  left: -25%;
  width: 150%;
  height: 100%;
  background: radial-gradient(
    circle at 50% 0%,
    rgba(255, 255, 255, 0.4) 0%,
    transparent 60%
  );
  pointer-events: none;
}

.app-label {
  color: white;
  font-family: "Nunito", sans-serif;
  font-size: 10px;
  font-weight: 600;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

/* -----------------------------------------------------------
   DOCK
----------------------------------------------------------- */
.iphone6-dock-container {
  position: absolute;
  bottom: 12px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  z-index: 20;
  pointer-events: none;
  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
}

.iphone6-dock-container.app-is-open {
  transform: translateY(120%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.iphone6-dock {
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  padding: 6px 10px;
  border-radius: 14px;
  display: flex;
  gap: 8px;
  pointer-events: auto;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.dock-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background-size: cover;
  background-position: center;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.dock-item {
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.dock-item:hover {
  transform: scale(1.1) translateY(-4px);
  z-index: 10;
}

.dock-item:active {
  transform: scale(0.9);
}

/* -----------------------------------------------------------
   IMESSAGE APP LAYOUT & ANIMATIONS
----------------------------------------------------------- */
.app-screen {
  position: absolute;
  top: 25px;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 15;
  display: none;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.app-screen.is-open {
  transform: translateY(0);
}

.imessage-header {
  background: #131313;
  border-bottom: 1px solid black;
  padding: 10px;
  display: flex;
  align-items: center;
  min-height: 44px;
}

.imessage-back-btn,
.imessage-header-spacer {
  width: 75px;
  flex-shrink: 0;
}

.imessage-header-spacer {
  display: block;
}

.imessage-back-btn {
  color: darkred;
  font-size: 14px;
  font-weight: 600;
  background: none;
  border: none;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 3px;
}

.imessage-contact-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
}

.imessage-avatar {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  margin-bottom: 2px;
}

.imessage-contact-name {
  font-size: 9px;
  font-weight: 700;
  color: red;
  margin-top: 3px;
}

.imessage-chat-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #121111;
}

.message-bubble {
  max-width: 85%;
  padding: 8px 12px;
  border-radius: 16px;
  font-size: 11px;
  line-height: 1.4;
  word-wrap: break-word;
  font-family: "Nunito", sans-serif;
  font-weight: 500;
}

.message-bubble.received {
  background-color: grey;
  color: #000000;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

.message-bubble.sent {
  background-color: red;
  color: white;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.imessage-input-bar {
  border-top: 1px solid grey;
  padding: 8px;
  background: #1e1e1e;
  display: flex;
  align-items: center;
}

.imessage-fake-input {
  flex: 1;
  background: #2c2c2c;
  border: 1px solid grey;
  border-radius: 16px;
  padding: 6px 12px;
  color: grey;
  font-size: 11px;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}

.imessage-chat-body {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.imessage-chat-body::-webkit-scrollbar {
  display: none;
}
