.line-chat-animation {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem 0;
}

.phone-frame {
  width: 375px;
  height: 667px;
  background: #000;
  border-radius: 40px;
  box-shadow: 
    0 0 0 12px #1a1a1a,
    0 0 0 14px #333,
    0 20px 60px rgba(0, 0, 0, 0.5);
  position: relative;
  overflow: hidden;
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  25% {
    transform: translateY(-10px) rotate(1deg);
  }
  75% {
    transform: translateY(-5px) rotate(-1deg);
  }
}

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

.phone-screen {
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, #f0f0f0 0%, #e8e8e8 100%);
  display: flex;
  flex-direction: column;
  position: relative;
}

.line-header {
  background: #00B900;
  padding: 50px 15px 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.line-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.back-button {
  color: white;
  font-size: 24px;
  font-weight: 300;
  cursor: pointer;
}

.agent-avatar {
  width: 40px;
  height: 40px;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.agent-name {
  color: white;
  font-weight: 600;
  font-size: 16px;
}

.line-header-right {
  color: white;
  font-size: 24px;
  cursor: pointer;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #f0f0f0;
}

.message-container {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  animation: messageSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.user-message {
  flex-direction: row-reverse;
  justify-content: flex-start;
}

.agent-message {
  flex-direction: row;
  justify-content: flex-start;
}

.message-avatar {
  width: 36px;
  height: 36px;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.message-bubble {
  max-width: 70%;
  padding: 12px 16px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.5;
  word-wrap: break-word;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  animation: bubblePop 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes bubblePop {
  0% {
    transform: scale(0.8);
    opacity: 0;
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.user-message .message-bubble {
  background: #00B900;
  color: white;
  border-bottom-right-radius: 4px;
}

.agent-message .message-bubble {
  background: white;
  color: #333;
  border-bottom-left-radius: 4px;
}

.line-footer {
  background: white;
  padding: 10px 15px 25px;
  border-top: 1px solid #e0e0e0;
}

.input-area {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f5f5f5;
  border-radius: 20px;
  padding: 8px 15px;
}

.input-icon {
  color: #666;
  font-size: 20px;
  cursor: pointer;
}

.input-field {
  flex: 1;
  color: #999;
  font-size: 14px;
}

.phone-home-indicator {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 134px;
  height: 5px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 100px;
}

/* スクロールバーのスタイリング */
.chat-messages::-webkit-scrollbar {
  width: 4px;
}

.chat-messages::-webkit-scrollbar-track {
  background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 2px;
}

/* レスポンシブ対応 */
@media (max-width: 480px) {
  .phone-frame {
    width: 320px;
    height: 568px;
    border-radius: 30px;
  }

  .message-bubble {
    font-size: 13px;
    max-width: 75%;
  }
}

