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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(120deg, #e0eafc, #cfdef3);
  color: #333;
  min-height: 100vh;
  padding: 20px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.container {
  max-width: 900px;
  width: 100%;
  background-color: white;
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  animation: fadeIn 1s ease-in-out;
}

/* Profile Card */
.profile-card {
  margin-bottom: 40px;
  text-align: center;
}

.profile-pic {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 20px;
  border: 4px solid #4f8ef7;
  box-shadow: 0 0 15px rgba(79, 142, 247, 0.4);
}

.profile-card h1 {
  font-size: 2rem;
  margin-bottom: 30px;
}

.profile-info {
  text-align: left;
  margin-top: 20px;
}

.profile-info p {
  font-size: 1rem;
  margin: 8px 0;
  color: #555;
}

/* Music Section */
.music-section h2 {
  font-size: 1.5rem;
  margin-bottom: 20px;
  text-align: center;
  color: #333;
}

.music-item {
  background-color: #f2f6fc;
  border-left: 6px solid #4f8ef7;
  border-radius: 10px;
  padding: 15px 20px;
  margin-bottom: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: 0.3s ease;
  cursor: pointer;
}

.music-item:hover {
  background-color: #e6efff;
  transform: scale(1.02);
}

.music-item.playing {
  border-left-color: #23c483;
  background-color: #d9fff0;
}

.music-item h3 {
  margin-bottom: 5px;
  font-size: 1.1rem;
}

.music-item p {
  font-size: 0.9rem;
  color: #666;
}

.music-item button {
  padding: 8px 14px;
  background-color: #4f8ef7;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: 0.3s ease;
}

.music-item button:hover {
  background-color: #306de0;
}

/* Audio Player Styling */
.audio-player {
  margin-top: 25px;
  width: 100%;
  outline: none;
}

/* Game Section */
.game-section {
  margin-top: 40px;
  text-align: center;
}

.toggle-button {
  margin-top: 10px;
  padding: 10px 20px;
  background-color: #4f8ef7;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  transition: 0.3s ease;
}

.toggle-button:hover {
  background-color: #306de0;
}

.game-loader {
  text-align: center;
  padding: 20px;
  font-size: 1.2rem;
  color: #555;
}

/* Game Frame with Portrait Aspect Ratio */
.game-frame {
  position: relative;
  padding-bottom: 150%; /* Portrait aspect ratio */
  height: 0;
  overflow: hidden;
  border-radius: 12px;
  margin-top: 20px;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
}

.game-frame iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 12px;
}

/* Fade Animation */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Responsive Layout */
@media (max-width: 768px) {
  .container {
    padding: 20px;
  }

  .profile-pic {
    width: 120px;
    height: 120px;
  }

  .music-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .music-item button {
    margin-top: 10px;
    width: 100%;
  }

  .game-frame {
    padding-bottom: 150%; /* Maintain portrait ratio on tablets */
  }
}

@media (max-width: 480px) {
  .profile-card h1 {
    font-size: 1.6rem;
  }

  .music-section h2 {
    font-size: 1.3rem;
  }

  .game-frame {
    padding-bottom: 180%; /* Extra height for small screens */
  }
}


/* === Chatbot Section Styles === */
.chatbot-section {
  margin-top: 50px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Chat container */
.chat-window {
  background-color: #1e1e1e;
  border-radius: 20px;
  padding: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  height: 500px; /* fixed height to prevent growing */
  width: 100%;
  max-width: 500px;
  overflow: hidden;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

/* Header inside chat window */
.chatbot-header {
  background-color: #1e1e1e;
  color: #fff;
  font-size: 18px;
  font-weight: bold;
  padding: 16px;
  text-align: center;
  margin: 0;
  border-bottom: 1px solid #333;
} 

.chat-title {
  font-size: 22px;
  font-weight: bold;
  color: #000;
  text-align: center;
  margin-top: -70px;
  margin-bottom: 30px;
}


/* Message container */
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Chat bubbles */
.chat-bubble {
  padding: 12px 16px;
  border-radius: 20px;
  max-width: 75%;
  line-height: 1.4;
  word-wrap: break-word;
}

.user-bubble {
  align-self: flex-end;
  background-color: #4f8ef7;
  color: white;
}

.bot-bubble {
  align-self: flex-start;
  background-color: #333;
  color: white;
}

/* Chat input area */
.chat-input-area {
  display: flex;
  padding: 12px;
  gap: 8px;
  background-color: #1e1e1e;
  border-top: 1px solid #333;
}

.chat-input-area input[type="text"] {
  flex: 1;
  padding: 10px 12px;
  border-radius: 20px;
  border: none;
  outline: none;
  background-color: #2a2a2a;
  color: white;
}

.chat-input-area button {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background-color: #4f8ef7;
  color: white;
  font-size: 18px;
  cursor: pointer;
}
