.logo {
  width: clamp(200px, 30vw, 600px);
  height: auto;
  display: block;
  margin: 0 auto;
}

@media (max-width: 359px) {
  body {
    font-size: 0.8rem;
  }
  .floating-buttons {
    bottom: 0.8rem;
    right: 0.8rem;
    gap: 0.4rem;
  }
  .float-btn {
    width: 36px;
    height: 36px;
    font-size: 0.85rem;
  }
  .message-inner {
    padding: 0 0.5rem;
    gap: 0.4rem;
  }
  .message-avatar {
    width: 24px;
    height: 24px;
    font-size: 0.75rem;
  }
  .message-content {
    font-size: 0.85rem;
    line-height: 1.3;
  }
  .code-block {
    margin: 0.5rem 0;
  }
  .code-header {
    padding: 0.4rem 0.6rem;
  }
  .code-content {
    font-size: 0.75rem;
    padding: 0.5rem;
  }
  .copy-btn {
    font-size: 0.65rem;
    padding: 0.25rem 0.5rem;
  }
  textarea {
    font-size: 0.85rem;
    min-height: 32px;
    max-height: 120px;
    padding: 0.4rem 0.6rem;
  }
  .send-btn {
    width: 36px;
    height: 36px;
    font-size: 0.85rem;
    padding: 0.4rem;
  }
  .empty-state h1 {
    font-size: 1.1rem;
  }
  .empty-state p {
    font-size: 0.75rem;
  }
  .modal-content {
    width: 95%;
    max-height: 70vh;
    padding: 0.8rem 1rem;
  }
  .modal-header h2 {
    font-size: 1.1rem;
  }
  .modal-body {
    font-size: 0.75rem;
  }
}

@media (min-width: 360px) and (max-width: 480px) {
  body {
    font-size: 0.85rem;
  }
  .floating-buttons {
    bottom: 1rem;
    right: 1rem;
    gap: 0.5rem;
  }
  .float-btn {
    width: 40px;
    height: 40px;
    font-size: 0.9rem;
  }
  .message-inner {
    padding: 0 0.75rem;
    gap: 0.5rem;
  }
  .message-avatar {
    width: 28px;
    height: 28px;
    font-size: 0.8rem;
  }
  .message-content {
    font-size: 0.9rem;
    line-height: 1.35;
  }
  .code-block {
    margin: 0.6rem 0;
  }
  .code-header {
    padding: 0.5rem 0.75rem;
  }
  .code-content {
    font-size: 0.8rem;
    padding: 0.6rem;
  }
  .copy-btn {
    font-size: 0.7rem;
    padding: 0.3rem 0.5rem;
  }
  textarea {
    font-size: 0.9rem;
    min-height: 36px;
    max-height: 150px;
    padding: 0.5rem 0.75rem;
  }
  .send-btn {
    width: 40px;
    height: 40px;
    font-size: 0.9rem;
  }
  .empty-state h1 {
    font-size: 1.25rem;
  }
  .empty-state p {
    font-size: 0.85rem;
  }
  .modal-content {
    width: 92%;
    max-height: 75vh;
    padding: 1rem 1.25rem;
  }
  .modal-header h2 {
    font-size: 1.25rem;
  }
  .modal-body {
    font-size: 0.8rem;
  }
}

@media (min-width: 481px) and (max-width: 768px) {
  body {
    font-size: 0.9rem;
  }
  .floating-buttons {
    bottom: 1.5rem;
    right: 1.5rem;
    gap: 0.6rem;
  }
  .float-btn {
    width: 44px;
    height: 44px;
    font-size: 1rem;
  }
  .message-inner {
    padding: 0 1rem;
    gap: 0.6rem;
  }
  .message-avatar {
    width: 30px;
    height: 30px;
    font-size: 0.85rem;
  }
  .message-content {
    font-size: 0.93rem;
    line-height: 1.4;
  }
  .code-block {
    margin: 0.75rem 0;
  }
  .code-header {
    padding: 0.6rem 0.85rem;
  }
  .code-content {
    font-size: 0.85rem;
    padding: 0.75rem;
  }
  .copy-btn {
    font-size: 0.75rem;
    padding: 0.35rem 0.6rem;
  }
  textarea {
    font-size: 0.93rem;
    min-height: 40px;
    max-height: 180px;
  }
  .send-btn {
    width: 42px;
    height: 42px;
    font-size: 0.95rem;
  }
  .empty-state h1 {
    font-size: 1.5rem;
  }
  .empty-state p {
    font-size: 0.95rem;
  }
  .modal-content {
    width: 90%;
    max-height: 80vh;
    padding: 1.2rem 1.5rem;
  }
  .modal-header h2 {
    font-size: 1.4rem;
  }
  .modal-body {
    font-size: 0.85rem;
  }
}

@media (min-width: 769px) and (max-width: 1200px) {
  body {
    font-size: 0.95rem;
  }
  .floating-buttons {
    bottom: 2rem;
    right: 2rem;
    gap: 0.75rem;
  }
  .float-btn {
    width: 48px;
    height: 48px;
    font-size: 1.1rem;
  }
  .message-inner {
    padding: 0 1.25rem;
    gap: 0.75rem;
  }
  .message-avatar {
    width: 32px;
    height: 32px;
    font-size: 0.9rem;
  }
  .message-content {
    font-size: 0.95rem;
    line-height: 1.5;
  }
  .code-block {
    margin: 1rem 0;
  }
  .code-header {
    padding: 0.75rem 1rem;
  }
  .code-content {
    font-size: 0.875rem;
    padding: 1rem;
  }
  .copy-btn {
    font-size: 0.75rem;
    padding: 0.4rem 0.8rem;
  }
  textarea {
    font-size: 0.95rem;
    min-height: 44px;
    max-height: 200px;
  }
  .send-btn {
    width: 44px;
    height: 44px;
    font-size: 1rem;
  }
  .empty-state h1 {
    font-size: 1.75rem;
  }
  .empty-state p {
    font-size: 1rem;
  }
  .modal-content {
    width: 85%;
    max-width: 500px;
    padding: 1.5rem 2rem;
  }
  .modal-header h2 {
    font-size: 1.5rem;
  }
  .modal-body {
    font-size: 0.9rem;
  }
}

@media (min-width: 1201px) {
  body {
    font-size: 1rem;
  }
  .floating-buttons {
    bottom: 2.5rem;
    right: 2.5rem;
    gap: 1rem;
  }
  .float-btn {
    width: 52px;
    height: 52px;
    font-size: 1.15rem;
  }
  .message-inner {
    padding: 0 2rem;
    gap: 1rem;
  }
  .message-avatar {
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }
  .message-content {
    font-size: 1rem;
    line-height: 1.6;
  }
  .code-block {
    margin: 1.25rem 0;
  }
  .code-header {
    padding: 0.85rem 1.25rem;
  }
  .code-content {
    font-size: 0.9rem;
    padding: 1.25rem;
  }
  .copy-btn {
    font-size: 0.8rem;
    padding: 0.5rem 0.9rem;
  }
  textarea {
    font-size: 1rem;
    min-height: 48px;
    max-height: 220px;
  }
  .send-btn {
    width: 48px;
    height: 48px;
    font-size: 1.05rem;
  }
  .empty-state h1 {
    font-size: 2rem;
  }
  .empty-state p {
    font-size: 1.05rem;
  }
  .modal-content {
    width: 60%;
    max-width: 600px;
    padding: 2rem 2.5rem;
  }
  .modal-header h2 {
    font-size: 1.75rem;
  }
  .modal-body {
    font-size: 0.95rem;
  }
}

@media (hover: none) and (pointer: coarse) {
  .float-btn,
  .send-btn,
  .copy-btn,
  .modal-close {
    min-touch-target: 48px;
    padding: 0.5rem;
  }
}

@media (max-width: 1200px) {
  .messages-container,
  .messages-area {
    gap: 0.5rem;
  }
  .message {
    padding: 0.75rem 0;
  }
  .message-content h1 {
    font-size: 1.5rem;
  }
  .message-content h2 {
    font-size: 1.3rem;
  }
  .message-content h3 {
    font-size: 1.1rem;
  }
}
