* {
  box-sizing: border-box;
}

body {
  margin: 0;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: Arial, sans-serif;
  background: linear-gradient(135deg, #6c63ff, #7b5cff);
}

.phone {
  width: 360px;
  display: flex;
  justify-content: center;
}

.screen {
  width: 320px;
  height: 640px;
  background: #fff;
  border-radius: 35px;
  position: relative;
  overflow: hidden;
  padding-bottom: 90px;
}

.header {
  height: 60px;
  background: linear-gradient(135deg, #7b5cff, #b388ff);
  color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: bold;
}

.modeSwitch {
  display: flex;
  gap: 8px;
  padding: 10px 14px 0;
}

.modeBtn {
  flex: 1;
  border: 1px solid #ddd;
  border-radius: 999px;
  background: #f6f6f6;
  color: #666;
  padding: 8px 12px;
  font-weight: bold;
  cursor: pointer;
}

.modeBtn.active {
  background: linear-gradient(135deg, #7b5cff, #b388ff);
  border-color: transparent;
  color: #fff;
}

#homeScreen,
#chatScreen,
#eventsScreen,
#profileScreen {
  width: 100%;
  height: 100%;
}

#profileScreen {
  overflow-y: auto;
  padding-bottom: 120px;
}

#homeScreen {
  overflow-y: auto;
  padding-bottom: 170px;
}

.card {
  width: 90%;
  height: 420px;
  margin: 10px auto;
  border-radius: 20px;
  overflow: hidden;
  position: relative;
}

.card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cardInfo {
  position: absolute;
  top: 20px;
  left: 20px;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
}

.cardInfo h2,
.cardInfo p {
  margin: 0;
}

.buttons {
  position: sticky;
  bottom: 95px;
  width: 100%;
  display: flex;
  justify-content: center;
  gap: 40px;
  z-index: 3;
}

.buttons button {
  width: 65px;
  height: 65px;
  border-radius: 50%;
  border: none;
  font-size: 24px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  cursor: pointer;
}

.eventDetailsPanel {
  width: 90%;
  margin: 10px auto 0;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
  padding: 12px;
}

.eventDetailsHeader {
  font-size: 14px;
  font-weight: bold;
  margin-bottom: 8px;
}

.eventDetailRow {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid #f1f1f1;
  font-size: 13px;
}

.eventDetailRow:last-of-type {
  border-bottom: none;
}

.eventDetailDesc {
  margin-top: 8px;
  font-size: 13px;
  color: #666;
  line-height: 1.45;
}

.menu {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 80px;
  display: flex;
  justify-content: space-around;
  align-items: center;
  background: linear-gradient(135deg, #7b5cff, #b388ff);
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  z-index: 10;
}

.menuItem {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #fff;
  font-size: 11px;
  cursor: pointer;
}

.circle {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 5px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

#login {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 20px;
}

#login h2 {
  text-align: center;
  margin-bottom: 30px;
}

#login input,
.authBox input,
.authBox select {
  padding: 12px;
  border-radius: 12px;
  border: 1px solid #ddd;
  background: #fff;
}

#login input {
  margin: 8px 0;
}

#login button,
.authBox button {
  margin-top: 10px;
  padding: 12px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, #6c63ff, #7b5cff);
  color: #fff;
  font-weight: bold;
  cursor: pointer;
}

.chatTop {
  padding: 15px;
}

.chatTitle {
  font-size: 20px;
  font-weight: bold;
}

.likesHeader {
  font-size: 12px;
  color: gray;
  margin-top: 5px;
}

#likesRow {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  overflow-x: auto;
}

.likeAvatar,
.chatAvatar,
.avatar {
  border-radius: 50%;
  object-fit: cover;
}

.likeAvatar {
  width: 50px;
  height: 50px;
}

#chatList {
  max-height: 390px;
  overflow-y: auto;
  padding-bottom: 90px;
}

.chatSection {
  padding: 0 10px;
}

.chatSectionTitle {
  font-size: 13px;
  font-weight: bold;
  color: #666;
  margin: 8px 2px 2px;
}

.chatCard {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #f3f3f3;
  padding: 12px;
  margin: 10px;
  border-radius: 15px;
  cursor: pointer;
}

.chatAvatar {
  width: 50px;
  height: 50px;
}

.chatText {
  display: flex;
  flex-direction: column;
}

.chatName {
  font-weight: bold;
}

.chatMsg {
  font-size: 12px;
  color: gray;
}

#dialog {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.chatHeader {
  display: flex;
  align-items: center;
  padding: 10px;
  border-bottom: 1px solid #eee;
}

.backBtn {
  border: none;
  background: #eee;
  border-radius: 50%;
  width: 35px;
  height: 35px;
  margin-right: 10px;
  cursor: pointer;
}

#messages {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
}

.message {
  max-width: 70%;
  padding: 10px 14px;
  border-radius: 18px;
  margin: 6px 0;
  word-break: break-word;
}

.myMessage {
  background: #7b5cff;
  color: #fff;
  margin-left: auto;
}

.userMessage {
  background: #eee;
}

.chatInput {
  display: flex;
  gap: 8px;
  padding: 10px;
  border-top: 1px solid #eee;
  background: #fff;
  position: absolute;
  left: 0;
  bottom: 80px;
  width: 100%;
}

.chatInput input {
  flex: 1;
  padding: 10px;
  border-radius: 20px;
  border: 1px solid #ccc;
}

.chatInput button {
  padding: 10px 15px;
  border-radius: 20px;
  border: none;
  background: #7b5cff;
  color: #fff;
  cursor: pointer;
}

.eventCard {
  background: #fff;
  border-radius: 20px;
  margin: 15px;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.eventCard img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.eventTitle {
  font-weight: bold;
  font-size: 16px;
  margin: 10px 12px 4px;
}

.eventInfo {
  font-size: 12px;
  color: gray;
  margin: 0 12px 12px;
}

.eventButtons {
  padding: 0 12px 12px;
}

.eventButtons button {
  width: 100%;
  padding: 8px;
  border-radius: 10px;
  border: none;
  background: #7b5cff;
  color: #fff;
  cursor: pointer;
}

.profileCard {
  width: 90%;
  margin: 20px auto;
  text-align: center;
}

.aboutMeBox {
  margin-top: 14px;
  padding: 10px;
  border-radius: 12px;
  background: #f8f8ff;
  text-align: left;
  font-size: 13px;
  line-height: 1.5;
}

.aboutMeTitle {
  font-weight: bold;
  margin-bottom: 6px;
}

.avatar {
  width: 90px;
  height: 90px;
  margin-bottom: 10px;
}

.profileButtons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
}

.profileButtons button {
  padding: 12px;
  border-radius: 12px;
  border: none;
  background: #f3f3f3;
  cursor: pointer;
}

.profileButtons .logout {
  background: #ff4d4d;
  color: #fff;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 999;
}

.authBox {
  width: 280px;
  max-height: 85vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 20px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  animation: pop 0.2s ease;
}

@keyframes pop {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}