* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 1rem;
}

.phone-frame {
  position: relative;
  width: 620px;
  height: 820px;
  background: linear-gradient(145deg, #1a1a1a, #000);
  border-radius: 48px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.7);
  padding: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  border: 2px solid rgba(255,255,255,0.05);
}

.phone-notch {
  position: absolute;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: 160px;
  height: 28px;
  background: #000;
  border-radius: 0 0 18px 18px;
  z-index: 10;
}

.volume-up,
.volume-down,
.power-btn {
  position: absolute;
  background: #1a1a1a;
  border-radius: 2px;
}

.volume-up {
  left: -4px;
  top: 120px;
  width: 8px;
  height: 50px;
}

.volume-down {
  left: -4px;
  top: 180px;
  width: 8px;
  height: 50px;
}

.power-btn {
  right: -4px;
  top: 160px;
  width: 8px;
  height: 70px;
}

.chat-container {
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, #ffffff, #f5f7fa);
  border-radius: 36px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: inset 0 0 20px rgba(0,0,0,0.05);
}

.chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.2rem;
  background: linear-gradient(135deg, #128c7e, #075e54);
  color: #ffffff;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.back-icon {
  font-size: 1.2rem;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.back-icon:hover {
  transform: scale(1.1);
}

.contact-info {
  display: flex;
  flex-direction: column;
}

.contact-name {
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: 0.5px;
}

.contact-status {
  font-size: 0.8rem;
  opacity: 0.85;
}

.topic-select {
  padding: 0.4rem 0.6rem;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.15);
  color: #ffffff;
  font-size: 0.9rem;
  backdrop-filter: blur(4px);
  transition: background 0.3s ease;
  max-width: 140px;
  text-overflow: ellipsis;
}

.topic-select:hover {
  background: rgba(255,255,255,0.25);
}

.topic-select option {
  background: #075e54;
  color: #ffffff;
}

.chat-box {
  flex: 1;
  overflow-y: auto;
  padding: 0.8rem 1rem;
  background: linear-gradient(to bottom, #e5ddd5, #d4ccc4);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.message {
  max-width: 70%;
  padding: 0.7rem 1rem;
  border-radius: 12px;
  font-size: 0.95rem;
  line-height: 1.35;
  position: relative;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  animation: fadeIn 0.3s ease forwards;
}

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

.message.user {
  align-self: flex-end;
  background: linear-gradient(135deg, #dcf8c6, #c5f0a3);
  color: #000000;
  border-top-right-radius: 0;
}

.message.bot {
  align-self: flex-start;
  background: linear-gradient(135deg, #ffffff, #f2f2f2);
  color: #000000;
  border-top-left-radius: 0;
}

.chat-form {
  display: flex;
  align-items: center;
  border-top: 1px solid #e5e7eb;
  padding: 0.6rem 0.8rem;
  gap: 0.5rem;
  background: linear-gradient(to right, #f0f0f0, #e0e0e0);
}

#chatInput {
  flex: 1;
  padding: 0.7rem 1.2rem;
  border: none;
  border-radius: 24px;
  font-size: 0.95rem;
  outline: none;
  background: #ffffff;
  box-shadow: inset 0 0 4px rgba(0,0,0,0.05);
  transition: box-shadow 0.3s ease;
}

#chatInput:focus {
  box-shadow: inset 0 0 8px rgba(18, 140, 126, 0.2);
}

.chat-form button {
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: linear-gradient(135deg, #25d366, #128c7e);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(18, 140, 126, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.chat-form button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(18, 140, 126, 0.4);
}

.chat-form button:active {
  transform: translateY(0);
}

.chat-form button svg {
  width: 22px;
  height: 22px;
}

.level-bar {
  display: flex;
  justify-content: space-around;
  background: linear-gradient(135deg, #128c7e, #075e54);
  padding: 0.5rem;
  gap: 0.5rem;
}

.level-btn {
  flex: 1;
  padding: 0.5rem 0.6rem;
  border: none;
  border-radius: 20px;
  background: rgba(255,255,255,0.15);
  color: #ffffff;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
  backdrop-filter: blur(4px);
}

.level-btn:hover {
  background: rgba(255,255,255,0.25);
  transform: translateY(-2px);
}

.level-btn.active {
  background: #ffffff;
  color: #128c7e;
}



