* { box-sizing: border-box; }
body {
  background: linear-gradient(135deg, #008080 0%, #005f5f 100%);
  font-family: Tahoma, Verdana, sans-serif;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  margin: 0;
  padding: 20px;
}

.window {
  background-color: #ECE9D8;
  border: 2px solid #0054E3;
  border-radius: 6px 6px 0 0;
  width: 370px;
  box-shadow: 3px 3px 14px rgba(0,0,0,0.5);
  display: flex;
  flex-direction: column;
}

.title-bar {
  background: linear-gradient(to right, #0058e6, #3a93ff);
  color: white;
  font-weight: bold;
  padding: 6px 10px;
  font-size: 14px;
  border-radius: 4px 4px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.title-bar span { display: flex; align-items: center; gap: 6px; }

.close-btn {
  background-color: #E04343;
  color: white;
  border: 1px solid white;
  border-radius: 3px;
  font-weight: bold;
  cursor: pointer;
  padding: 0 6px;
}

.content {
  padding: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 560px;
  position: relative;
}

#swipe-view, #match-view, #chat-view, #date-view {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#match-view, #chat-view, #date-view { display: none; }

.card {
  width: 100%;
  background: #fff;
  border: 2px solid #999;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 1px 1px 6px rgba(0,0,0,0.3);
}

.profile-pic {
  width: 100%;
  height: 260px;
  object-fit: cover;
  display: block;
  image-rendering: pixelated;
  background: #333;
}

.name-age {
  padding: 8px 10px 0 10px;
  font-size: 19px;
  font-weight: bold;
  color: #222;
}

.gender-tag {
  font-size: 13px;
  color: #555;
  padding: 0 10px;
}

.bio-box {
  padding: 8px 10px 10px 10px;
  font-size: 13px;
  height: 100px;
  overflow-y: auto;
  color: #333;
  line-height: 1.35;
}

.buttons {
  display: flex;
  gap: 24px;
  margin-top: 14px;
}

.btn {
  padding: 10px 22px;
  font-size: 22px;
  cursor: pointer;
  border: 2px outset #fff;
  background: #d4d0c8;
  border-radius: 50%;
  line-height: 1;
}

.btn:active { border: 2px inset #fff; }

.btn-text {
  border-radius: 5px;
  font-size: 13px;
  padding: 8px 14px;
}

/* Match view */
#match-view {
  justify-content: center;
  text-align: center;
  background: linear-gradient(160deg, #ffd6d6, #ffb3b3);
  min-height: 560px;
  border-radius: 4px;
}

#match-view h1 {
  color: #d10000;
  font-size: 30px;
  margin: 6px 0;
  text-shadow: 2px 2px #fff;
}

.match-img {
  width: 150px;
  height: 150px;
  object-fit: cover;
  border: 4px solid #fff;
  border-radius: 50%;
  box-shadow: 1px 1px 8px rgba(0,0,0,0.4);
  margin: 10px 0;
}

/* Chat view */
#chat-view { min-height: 560px; }

.chat-header {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding-bottom: 8px;
  border-bottom: 1px solid #999;
  margin-bottom: 8px;
}

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

.chat-header .cname { font-weight: bold; font-size: 14px; }
.chat-header .back-btn {
  margin-left: auto;
  font-size: 12px;
  cursor: pointer;
  background: none;
  border: none;
  color: #0054E3;
  text-decoration: underline;
}

.chat-box {
  flex-grow: 1;
  width: 100%;
  background: white;
  border: 1px inset #999;
  padding: 10px;
  overflow-y: auto;
  margin-bottom: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: 340px;
}

.message {
  max-width: 82%;
  padding: 8px 10px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.3;
}

.msg-them { background-color: #e5e5ea; align-self: flex-start; color: #000; }
.msg-me { background-color: #007aff; color: white; align-self: flex-end; }
.msg-typing { background-color: #e5e5ea; align-self: flex-start; color: #888; font-style: italic; }

.chat-input-area { display: flex; gap: 5px; width: 100%; }
.chat-input-area input {
  flex-grow: 1;
  padding: 7px;
  border: 1px inset #999;
  font-size: 13px;
}

.date-btn-row { width: 100%; margin-top: 6px; }
.match-back-btn { margin-top: 8px; }
.date-action { width: 100%; }

/* Date view */
#date-view { min-height: 560px; justify-content: flex-start; }
.date-scene {
  width: 100%;
  background: #fff;
  border: 1px inset #999;
  padding: 12px;
  font-size: 13px;
  line-height: 1.5;
  height: 380px;
  overflow-y: auto;
  color: #222;
}
.date-title {
  font-weight: bold;
  font-size: 16px;
  margin-bottom: 8px;
  color: #b8003c;
}
