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

body{
  min-height:100vh;
  display:flex;
  justify-content:center;
  align-items:center;
  background: linear-gradient(135deg, #ffe4f3, #fff7fb);
  font-family: Verdana, sans-serif;
}

.window{
  width: min(420px, 100%);
  max-height: 100dvh;

  background:white;
  border:2px solid #7c6666;
  border-radius:10px;
  overflow:hidden;
}

.header{
  text-align:center;
  background:#eed1d1;
  padding:8px;
  font-weight:bold;
  border-bottom:2px solid #7c6666;
}

.clock-section{
  text-align:center;
  padding:20px;
}

.clock-section p{
  color:rgb(63, 59, 59);
}

.clock-section h1{
  font-size:55px;
  font-weight:300;
  color:rgb(63, 59, 59);
}

.request-card{
  width:260px;
  margin:auto;
  margin-top:140px; /* tambah ini */

  padding:15px;
  text-align:center;

  border:none;
  border-radius:15px;

  background:rgba(255,255,255,.85);
  backdrop-filter:blur(6px);
}

#request-screen{
  position:relative;

  background-image:url("/image/meong.jpg");
  background-size:cover;
  background-position:center;
  background-repeat:no-repeat;

  min-height:520px;

  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:center;

  padding:20px;
}

/* overlay tipis biar tulisan tetap kebaca */
#request-screen::before{
  content:"";
  position:absolute;
  inset:0;
  background:rgba(0,0,0,.15);
}

#request-screen > *{
  position:relative;
  z-index:1;
}

.buttons{
  display:flex;
  justify-content:center;
  gap:10px;
  margin:20px;
}

button{
  border:none;
  background:#eee;
  padding:7px 25px;
  border-radius:8px;
  cursor:pointer;
}

.footer{
  display:flex;
  justify-content:space-between;
  font-size:12px;
  padding:8px;
  border-top:2px solid #7c6666;
  background:#eed1d1;
}

.hidden{
  display:none;
}

#chat-screen{
  padding:15px;
  background-image:url("/image/bg.jpg");
  background-size:cover;
  background-position:center;
  background-repeat:no-repeat;
}

.accepted{
  text-align:center;
  color:gray;
  margin-bottom:15px;
}

.chat{
  display:flex;
  align-items:flex-start;
  margin:12px 0;
  gap:8px;
}

.chat.right{
  flex-direction:row-reverse;
}

.chat img{
  width:45px;
  height:45px;
  border-radius:50%;
  object-fit:cover;
}

.bubble{
  background:#f3dada;
  padding:12px;
  border-radius:10px;
  max-width:220px;
}

.hidden-msg{
  opacity:0;
}

.message-link{
  color:#7a4f58;
  text-decoration:underline;
  font-weight:bold;
}

.message-link:hover{
  opacity:.7;
}

.error-popup{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 999;
}

.error-box{
  width: 300px;
  background: white;
  border: 2px solid black;
  box-shadow: 4px 4px 0 black;
}

.error-header{
  background: #f4d7e7;
  padding: 8px;
  font-weight: bold;
  border-bottom: 2px solid black;
}

.error-content{
  padding: 20px;
  text-align: center;
}

.error-content button{
  margin-top: 15px;
  padding: 6px 20px;
  cursor: pointer;
}

.small{
  font-size: 13px;
  color: #666;
}

.hidden{
  display: none;
}

/* START SCREEN */

#start-screen{
  position: fixed;
  inset: 0;
  background: #fefcf8;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  cursor: pointer;
}

.start-content{
  text-align: center;
  color: #444;
  animation: fadeUp 1s ease;
}

.start-content h2{
  font-size: 50px;
  margin-bottom: 15px;
}

.start-content p{
  font-size: 18px;
  margin-bottom: 8px;
}

.start-content span{
  font-size: 13px;
  opacity: .6;
  letter-spacing: 2px;
  text-transform: uppercase;
}

@keyframes fadeUp{
  from{
    opacity:0;
    transform:translateY(20px);
  }
  to{
    opacity:1;
    transform:translateY(0);
  }
}

.chat-header{
  display:flex;
  align-items:center;
  gap:10px;

  padding:12px 15px;
  margin:-15px -15px 15px -15px;

  background:#eed1d1; /* tambahin ini */
}

.chat-avatar {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  object-fit: cover;
}

.chat-info h3 {
  margin: 0;
  font-size: 14px;
}

.chat-info span {
  font-size: 11px;
  color: #888;
}

.paw-icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.hidden{
  display:none !important;
}

/* ========= RESPONSIF MOBILE (HP KECIL) ========= */
@media (max-width: 420px){
  .window{
    width: 100%;
    border-radius: 14px;
  }

  .clock-section{
    padding: 22px 14px;
  }

  .clock-section h1{
    font-size: 46px;
    line-height: 1;
  }

  .clock-section p{
    font-size: 14px;
  }

  #request-screen{
    min-height: 430px;
    padding: 14px;
  }

  .request-card{
    width: min(260px, 92%);
    margin-top: 70px;
    padding: 12px;
  }

  .buttons{
    gap: 8px;
    margin: 14px 0;
  }

  button{
    padding: 7px 18px;
    border-radius: 10px;
    font-size: 14px;
  }

  #chat-screen{
    padding: 10px;
  }

  .chat-header{
    padding: 10px 12px;
    margin: -10px -10px 12px -10px;
  }

  .chat-avatar{
    width: 40px;
    height: 40px;
  }

  .paw-icon{
    width: 20px;
    height: 20px;
  }

  .chat{
    margin: 10px 0;
    gap: 6px;
  }

  .chat img{
    width: 40px;
    height: 40px;
  }

  .bubble{
    padding: 10px;
    max-width: 180px;
    font-size: 13px;
  }

  .message-link{
    display: inline-block;
    max-width: 180px;
    word-break: break-word;
  }

  .footer{
    padding: 0 10px;
    height: 44px;
  }
}

@media (max-height: 700px){
  /* layar HP tinggi kecil: kurangi tinggi/padding biar gak kepotong */
  #request-screen{
    min-height: 430px;
  }

  .clock-section{
    padding: 18px 12px;
  }

  .request-card{
    margin-top: 55px;
  }

  #chat-screen{
    padding: 10px;
  }
}
