/* Сброс и база */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  background: linear-gradient(145deg, #eef4fa 0%, #e3ecf7 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  padding: 0 1.5rem 2rem;
  margin: 0;
  line-height: 1.4;
  color: #1a2a3a;
}

/* ===== ОТДЕЛЬНЫЙ ХЕДЕР (без отступов сверху) ===== */
.header-wrapper {
  max-width: 920px;
  width: 100%;
  margin-bottom: 1.2rem;
  margin-top: 0;
}

.header-card {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 0 0 28px 28px;
  box-shadow: 0 20px 40px -12px rgba(73, 129, 218, 0.12), 0 8px 24px -8px rgba(73, 129, 218, 0.06);
  padding: 1.2rem 2.5rem 0.8rem;
  transition: box-shadow 0.3s ease, background 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.header-card:hover {
  box-shadow: 0 24px 48px -12px rgba(73, 129, 218, 0.18);
  background: rgba(255, 255, 255, 0.95);
}

.header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  padding: 0.2rem 0 0.6rem 0;
}

.header-left {
  display: flex;
  align-items: baseline;
  gap: 0.4rem 0.8rem;
  flex-wrap: wrap;
}

.header-title {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(to right, rgb(73, 129, 218), rgb(107, 175, 238));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  transition: transform 0.3s ease;
}

.header-title:hover {
  transform: scale(1.02);
}

.header-title a {
  text-decoration: none;
  color: inherit;
  background: inherit;
  -webkit-text-fill-color: inherit;
  transition: opacity 0.2s ease;
}

.header-title a:hover {
  opacity: 0.85;
}

.header-sub {
  font-weight: 400;
  font-size: 0.85rem;
  color: #5a7a9a;
  letter-spacing: 0.3px;
  background: rgba(107, 175, 238, 0.15);
  padding: 0.15rem 0.9rem;
  border-radius: 30px;
  border: 1px solid rgba(107, 175, 238, 0.1);
}

/* ===== ССЫЛКИ ХЕДЕРА ===== */
.header-nav {
  display: flex;
  gap: 0.3rem;
  flex-wrap: wrap;
  align-items: center;
}

.header-copy-link {
  display: inline-block;
  text-decoration: none;
  color: #4a6a8a;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.4rem 0.8rem;
  border-radius: 40px;
  transition: all 0.25s ease;
  cursor: pointer;
  background: transparent;
  border: none;
  font-family: inherit;
  line-height: 1;
  position: relative;
}

.header-copy-link::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(to right, rgb(73, 129, 218), rgb(107, 175, 238));
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

@media (max-width: 460px) {
  .header-copy-link::after {
    bottom: 0;
  }
}

.header-copy-link:hover {
  color: rgb(73, 129, 218);
  transform: translateY(-2px);
}

.header-copy-link:hover::after {
  width: 60%;
}

.header-copy-link:active {
  transform: scale(0.96);
}

.header-copy-link.copied {
  color: #27ae60;
}

.header-copy-link.copied::after {
  background: linear-gradient(to right, #6fcf97, #27ae60);
  width: 60%;
}

/* ===== ОСНОВНОЙ КАРД ===== */
.card {
  max-width: 920px;
  width: 100%;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 28px;
  box-shadow: 0 20px 40px -12px rgba(73, 129, 218, 0.12), 0 8px 24px -8px rgba(73, 129, 218, 0.06);
  padding: 1.8rem 2.5rem 1.8rem;
  transition: all 0.3s ease;
  margin-bottom: 1.2rem;
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.card:hover {
  box-shadow: 0 24px 48px -12px rgba(73, 129, 218, 0.18);
  background: rgba(255, 255, 255, 0.95);
}

/* ===== СПИСОК ===== */
.link-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 0.2rem;
}

.link-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  padding: 0.55rem 0.8rem 0.55rem 0.8rem;
  border-radius: 14px;
  background: rgba(245, 249, 254, 0.5);
  transition: all 0.3s ease;
  border: 1px solid transparent;
  gap: 0.5rem 0.8rem;
  position: relative;
}

.link-item::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 14px;
  padding: 1px;
  background: linear-gradient(to right, transparent, rgba(73, 129, 218, 0.1), transparent);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.link-item:hover {
  background: rgba(237, 243, 252, 0.7);
  border-color: rgba(107, 175, 238, 0.2);
  box-shadow: 0 4px 12px rgba(73, 129, 218, 0.08);
}

.link-item:hover::before {
  opacity: 1;
}

.link-content {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  flex: 1;
  min-width: 180px;
}

.link-title {
  font-weight: 600;
  font-size: 1rem;
  color: #1a2a3a;
  transition: color 0.2s ease;
  letter-spacing: 0.01em;
}

.link-item:hover .link-title {
  color: rgb(73, 129, 218);
}

.link-desc {
  color: #5a6a7a;
  font-size: 0.9rem;
}

.link-source {
  font-size: 0.85rem;
  color: #6a7a8a;
  font-weight: 450;
  margin-top: 0.1rem;
}

.link-source a {
  text-decoration: none;
  color: rgb(73, 129, 218);
  font-weight: 500;
  transition: all 0.2s ease;
  position: relative;
}

.link-source a::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 0;
  height: 1px;
  background: rgb(73, 129, 218);
  transition: width 0.3s ease;
}

.link-source a:hover {
  color: rgb(50, 100, 190);
}

.link-source a:hover::after {
  width: 100%;
}

.link-actions {
  flex-shrink: 0;
  margin-left: auto;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
  position: relative;
}

/* ===== КНОПКИ В LINK-ACTIONS ===== */
.copy-btn,
.edit-btn,
.delete-link-btn {
  border: 1.5px solid rgba(73, 129, 218, 0.25);
  font-weight: 600;
  font-size: 0.75rem;
  padding: 0 1rem;
  height: 38px;
  width: auto;
  min-width: 110px;
  border-radius: 40px;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  line-height: 1;
  background: transparent;
  color: #3a5a7a;
  box-shadow: none;
  position: relative;
  overflow: hidden;
}

.copy-btn::before,
.edit-btn::before,
.delete-link-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 40px;
  background: linear-gradient(to right, rgba(73, 129, 218, 0.08), rgba(107, 175, 238, 0.08));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.copy-btn:hover::before,
.edit-btn:hover::before,
.delete-link-btn:hover::before {
  opacity: 1;
}

.copy-btn:hover,
.edit-btn:hover {
  border-color: rgb(73, 129, 218);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(73, 129, 218, 0.15);
}

.copy-btn:active,
.edit-btn:active {
  transform: scale(0.96);
}

.copy-btn.copied {
  border-color: #6fcf97;
  background: rgba(111, 207, 151, 0.08);
  color: #27ae60;
}

.delete-link-btn {
  border-color: rgba(200, 80, 100, 0.25);
  color: #8a4a5a;
}

.delete-link-btn:hover {
  border-color: rgb(200, 80, 100);
  background: rgba(200, 80, 100, 0.06);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(200, 80, 100, 0.12);
}

/* ===== КНОПКА "Добавить ссылку" (градиент) ===== */
.btn-primary {
  border: none;
  background: linear-gradient(to right, rgb(73, 129, 218), rgb(107, 175, 238));
  color: white;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0 1.5rem;
  height: 40px;
  border-radius: 40px;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.25s ease, background 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  line-height: 1;
  text-decoration: none;
  flex-shrink: 0;
  min-width: 120px;
  box-shadow: 0 2px 8px rgba(73, 129, 218, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(to right, rgb(60, 110, 200), rgb(90, 160, 230));
  box-shadow: 0 4px 16px rgba(73, 129, 218, 0.45);
  transform: translateY(-2px);
  color: white;
}

.btn-primary:active {
  transform: scale(0.96);
  color: white;
}

/* ===== КНОПКИ ДЛЯ СООБЩЕНИЙ ===== */
.message-copy-btn {
  border: 1.5px solid rgba(73, 129, 218, 0.25);
  background: transparent;
  color: #3a5a7a;
  width: auto;
  min-width: 130px;
  height: 38px;
  padding: 0 1rem;
  border-radius: 40px;
  font-size: 0.75rem;
  box-shadow: none;
  font-weight: 600;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  line-height: 1;
  position: relative;
  overflow: hidden;
}

.message-copy-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 40px;
  background: linear-gradient(to right, rgba(73, 129, 218, 0.08), rgba(107, 175, 238, 0.08));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.message-copy-btn:hover::before {
  opacity: 1;
}

.message-copy-btn:hover {
  border-color: rgb(73, 129, 218);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(73, 129, 218, 0.12);
}

.message-copy-btn:active {
  transform: scale(0.96);
}

.message-copy-btn.copied {
  border-color: #6fcf97;
  background: rgba(111, 207, 151, 0.06);
  color: #27ae60;
}

.message-delete-btn {
  border: 1.5px solid rgba(200, 80, 100, 0.25);
  background: transparent;
  color: #8a4a5a;
  width: auto;
  min-width: 100px;
  height: 38px;
  padding: 0 1rem;
  border-radius: 40px;
  font-size: 0.75rem;
  box-shadow: none;
  font-weight: 600;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  line-height: 1;
  position: relative;
  overflow: hidden;
}

.message-delete-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 40px;
  background: rgba(200, 80, 100, 0.06);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.message-delete-btn:hover::before {
  opacity: 1;
}

.message-delete-btn:hover {
  border-color: rgb(200, 80, 100);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(200, 80, 100, 0.12);
}

.message-delete-btn:active {
  transform: scale(0.96);
}

/* ===== ФОРМА ===== */
.form-container {
  width: 100%;
}

.form-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: #1a2a3a;
  margin-bottom: 1.2rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid rgba(73, 129, 218, 0.12);
  letter-spacing: -0.01em;
}

.form-group {
  margin-bottom: 1.2rem;
}

.form-label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  color: #3a5a7a;
  margin-bottom: 0.3rem;
}

.form-control {
  width: 100%;
  padding: 0.7rem 1rem;
  font-size: 16px;
  font-family: inherit;
  color: #1a2a3a;
  background: rgba(245, 249, 254, 0.5);
  border: 1.5px solid rgba(73, 129, 218, 0.15);
  border-radius: 12px;
  transition: all 0.3s ease;
  outline: none;
}

.form-control:focus {
  border-color: rgb(73, 129, 218);
  box-shadow: 0 0 0 4px rgba(73, 129, 218, 0.1);
  background: rgba(255, 255, 255, 0.8);
}

.form-control::placeholder {
  color: #8a9aaa;
}

textarea.form-control {
  resize: vertical;
  min-height: 120px;
}

.form-actions {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(73, 129, 218, 0.1);
}

.btn-secondary {
  border: 1.5px solid rgba(73, 129, 218, 0.2);
  background: transparent;
  color: #5a6a7a;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0 1.5rem;
  height: 38px;
  border-radius: 40px;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: all 0.25s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  line-height: 1;
  text-decoration: none;
  flex-shrink: 0;
  min-width: 120px;
  box-shadow: none;
}

.btn-secondary:hover {
  background: rgba(73, 129, 218, 0.05);
  border-color: rgba(73, 129, 218, 0.35);
  transform: translateY(-2px);
}

.btn-secondary:active {
  transform: scale(0.96);
}

.btn-primary {
  border: none;
  background: linear-gradient(to right, rgb(73, 129, 218), rgb(107, 175, 238));
  color: white;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0 1.5rem;
  height: 40px;
  border-radius: 40px;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.25s ease, background 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  line-height: 1;
  text-decoration: none;
  flex-shrink: 0;
  min-width: 120px;
  box-shadow: 0 2px 8px rgba(73, 129, 218, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(to right, rgb(60, 110, 200), rgb(90, 160, 230));
  box-shadow: 0 4px 16px rgba(73, 129, 218, 0.45);
  transform: translateY(-2px);
  color: white;
}

.btn-primary:active {
  transform: scale(0.96);
  color: white;
}

/* ===== СООБЩЕНИЯ ===== */
.message-lict {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 2px solid rgba(73, 129, 218, 0.1);
}

.message-item {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  padding: 0.6rem 0.8rem;
  border-radius: 14px;
  background: rgba(245, 249, 254, 0.4);
  transition: all 0.3s ease;
  border: 1px solid transparent;
  gap: 0.4rem 0.6rem;
}

.message-item:hover {
  background: rgba(237, 243, 252, 0.6);
  border-color: rgba(107, 175, 238, 0.15);
  box-shadow: 0 4px 12px rgba(73, 129, 218, 0.06);
}

.message-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  width: 100%;
  flex: 0 0 100%;
}

.message-date {
  font-size: 0.7rem;
  color: #8a9aaa;
  font-weight: 400;
  letter-spacing: 0.2px;
  flex-shrink: 0;
}

.message-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.message-content {
  color: #1a2a3a;
  font-size: 0.92rem;
  line-height: 1.6;
  width: 100%;
  flex: 0 0 100%;
  padding-top: 0.1rem;
  word-break: break-word;
}

/* ===== ПОИСК ===== */
.message-area {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 1rem;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 0.2rem 0.8rem 0.2rem 1.4rem;
  border-radius: 60px;
  border: 1.5px solid rgba(73, 129, 218, 0.15);
  margin: 1rem 0 0 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
  transition: all 0.3s ease;
}

.message-area:focus-within {
  border-color: rgb(73, 129, 218);
  box-shadow: 0 4px 20px rgba(73, 129, 218, 0.1);
  background: rgba(255, 255, 255, 0.9);
}

.message-area .message-input {
  flex: 1;
  min-width: 140px;
  border: none;
  outline: none;
  font-size: 16px;
  padding: 0.4rem 0;
  background: transparent;
  color: #1a2a3a;
  font-family: inherit;
  height: 40px;
}

.message-area .message-input::placeholder {
  color: #8a9aaa;
  font-weight: 400;
}

.message-area .submit-btn {
  border: none;
  background: linear-gradient(to right, rgb(73, 129, 218), rgb(107, 175, 238));
  color: white;
  width: 180px;
  height: 40px;
  padding: 0 0.5rem;
  border-radius: 40px;
  font-size: 0.75rem;
  box-shadow: 0 2px 8px rgba(73, 129, 218, 0.3);
  font-weight: 600;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.25s ease, background 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  line-height: 1;
  flex-shrink: 0;
}

.message-area .submit-btn:hover {
  background: linear-gradient(to right, rgb(60, 110, 200), rgb(90, 160, 230));
  box-shadow: 0 4px 16px rgba(73, 129, 218, 0.45);
  transform: translateY(-2px);
  color: white;
}

.message-area .submit-btn:active {
  transform: scale(0.96);
  color: white;
}

/* ===== ФУТЕР ===== */
.footer-wrapper {
  max-width: 920px;
  width: 100%;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  color: #4a6a8a;
  padding: 0.8rem 0.5rem;
  border-top: 1px solid rgba(73, 129, 218, 0.12);
}

.footer-links {
  display: flex;
  gap: 1.8rem;
}

.footer-links a {
  text-decoration: none;
  color: #4a6a8a;
  font-weight: 450;
  transition: all 0.2s ease;
  position: relative;
}

.footer-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: linear-gradient(to right, rgb(73, 129, 218), rgb(107, 175, 238));
  transition: width 0.3s ease;
}

.footer-links a:hover {
  color: rgb(73, 129, 218);
}

.footer-links a:hover::after {
  width: 100%;
}

.footer-copy {
  color: #7a8a9a;
  font-size: 0.85rem;
}

/* ===== АДАПТИВ ===== */
@media (max-width: 720px) {
  body {
    padding: 0 1rem 1.5rem;
  }

  .header-card {
    padding: 0.8rem 1rem 0.5rem;
    border-radius: 0 0 20px 20px;
  }

  .card {
    padding: 1.2rem 1.2rem 1.5rem;
    border-radius: 20px;
  }

  .header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3rem;
    padding: 0.1rem 0 0.3rem 0;
  }

  .header-left {
    gap: 0.3rem;
    width: 100%;
  }

  .header-title {
    font-size: 1.4rem;
  }

  .header-sub {
    font-size: 0.7rem;
    padding: 0.1rem 0.7rem;
  }

  .header-nav {
    gap: 0.2rem;
    font-size: 0.85rem;
    flex-wrap: wrap;
    padding-top: 0.4rem;
    width: 100%;
  }

  .header-copy-link {
    padding: 0.25rem 0.6rem;
    font-size: 0.8rem;
  }

  .link-item {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    padding: 0.6rem 0.4rem;
    border-radius: 10px;
    gap: 0.3rem 0.5rem;
    transform: none !important;
  }

  .link-item:hover {
    transform: none !important;
  }

  .link-top-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    flex: 0 0 100%;
    order: 0;
  }

  .link-title {
    font-size: 0.95rem;
    flex: 1;
    min-width: 0;
    word-break: break-word;
    font-weight: 600;
    color: #1a2a3a;
  }

  .link-bottom-row {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    width: 100%;
    flex: 0 0 100%;
    padding-left: 0;
    order: 1;
  }

  .link-desc {
    font-size: 0.85rem;
    color: #5a6a7a;
    width: 100%;
  }

  .link-source {
    font-size: 0.8rem;
    margin-top: 0;
    align-self: flex-start;
    color: #6a7a8a;
  }

  .link-actions {
    width: 100%;
    margin-left: 0;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-top: 0.2rem;
    order: 2;
    align-items: center;
    justify-content: flex-start;
  }

  .copy-btn,
  .edit-btn,
  .delete-link-btn {
    height: 34px;
    font-size: 0.7rem;
    padding: 0 0.8rem;
    min-width: 80px;
    flex: 1 1 auto;
    border-radius: 40px;
    transform: none !important;
  }

  .copy-btn:hover,
  .edit-btn:hover,
  .delete-link-btn:hover {
    transform: none !important;
  }

  .btn-primary {
    height: 34px;
    font-size: 0.7rem;
    padding: 0 0.8rem;
    min-width: 100px;
    flex: 1 1 auto;
    border-radius: 40px;
    transform: none !important;
  }

  .btn-primary:hover {
    transform: none !important;
  }

  .message-item {
    padding: 0.5rem 0.4rem;
    gap: 0.3rem;
    transform: none !important;
  }

  .message-item:hover {
    transform: none !important;
  }

  .message-header {
    gap: 0.3rem;
    flex-wrap: wrap;
  }

  .message-date {
    font-size: 0.65rem;
  }

  .message-actions {
    gap: 0.3rem;
    /*width: 100%;*/
    flex-wrap: wrap;
  }

  .message-copy-btn,
  .message-delete-btn {
    height: 34px;
    font-size: 0.7rem;
    padding: 0 0.8rem;
    min-width: 80px;
    flex: 1 1 auto;
    border-radius: 40px;
    transform: none !important;
  }

  .message-copy-btn:hover,
  .message-delete-btn:hover {
    transform: none !important;
  }

  .message-content {
    font-size: 0.85rem;
  }

  .message-area {
    flex-wrap: wrap;
    padding: 0.3rem 0.8rem 0.3rem 1rem;
    border-radius: 28px;
    gap: 0.4rem 0.6rem;
  }

  .message-area .message-input {
    min-width: 100px;
    width: 100%;
    height: 34px;
    font-size: 16px;
  }

  .message-area .submit-btn {
    width: 100%;
    height: 34px;
    justify-content: center;
    border-radius: 40px;
    font-size: 0.7rem;
    min-width: unset;
    transform: none !important;
  }

  .message-area .submit-btn:hover {
    transform: none !important;
  }

  .form-title {
    font-size: 1.2rem;
  }

  .form-control {
    font-size: 16px;
    padding: 0.5rem 0.8rem;
  }

  .form-actions {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .btn-secondary {
    width: auto;
    flex: 1 1 auto;
    justify-content: center;
    height: 34px;
    font-size: 0.8rem;
    min-width: unset;
    border-radius: 40px;
    transform: none !important;
  }

  .btn-secondary:hover {
    transform: none !important;
  }

  .btn-primary {
    width: auto;
    flex: 1 1 auto;
    justify-content: center;
    height: 34px;
    font-size: 0.8rem;
    min-width: unset;
    border-radius: 40px;
    transform: none !important;
  }

  .btn-primary:hover {
    transform: none !important;
  }

  .footer-nav {
    flex-direction: column;
    gap: 0.3rem;
    align-items: flex-start;
    padding: 0.5rem 0;
  }
}

@media (max-width: 460px) {
  body {
    padding: 0 0.8rem 1rem;
  }

  .header-card {
    padding: 0.5rem 0.8rem 0.4rem;
  }

  .header-title {
    font-size: 1.2rem;
  }

  .header-sub {
    font-size: 0.6rem;
    padding: 0.1rem 0.6rem;
  }

  .header-nav {
    gap: 0.15rem;
    justify-content: space-around;
  }

  .header-copy-link {
    padding: 0.2rem 0.5rem;
    font-size: 0.9rem;
  }

  .card {
    padding: 0.8rem 0.6rem 1rem;
    border-radius: 16px;
  }

  .link-item {
    padding: 0.4rem 0.3rem;
    gap: 0.2rem 0.4rem;
  }

  .link-title {
    font-size: 0.85rem;
  }

  .link-bottom-row {
    padding-left: 0;
  }

  .link-desc {
    font-size: 0.78rem;
  }

  .link-source {
    font-size: 0.72rem;
  }

  .copy-btn,
  .edit-btn,
  .delete-link-btn {
    height: 30px;
    font-size: 0.6rem;
    padding: 0 0.6rem;
    min-width: 60px;
    flex: 1 1 auto;
  }

  .btn-primary {
    height: 30px;
    font-size: 0.6rem;
    padding: 0 0.6rem;
    min-width: 80px;
    flex: 1 1 auto;
  }

  .message-item {
    padding: 0.4rem 0.3rem;
  }

  .message-date {
    font-size: 0.6rem;
  }

  .message-copy-btn,
  .message-delete-btn {
    height: 30px;
    font-size: 0.6rem;
    padding: 0 0.6rem;
    min-width: 60px;
    flex: 1 1 auto;
  }

  .message-content {
    font-size: 0.8rem;
    padding-top: 0.05rem;
  }

  .message-area .message-input {
    font-size: 16px;
    height: 30px;
  }

  .message-area .submit-btn {
    height: 30px;
    font-size: 0.6rem;
    padding: 0 0.6rem;
  }

  .form-title {
    font-size: 1rem;
  }

  .form-group {
    margin-bottom: 0.8rem;
  }

  .form-label {
    font-size: 0.8rem;
  }

  .form-control {
    font-size: 16px;
    padding: 0.4rem 0.7rem;
    border-radius: 8px;
  }

  textarea.form-control {
    min-height: 80px;
  }

  .btn-secondary {
    height: 30px;
    font-size: 0.7rem;
    padding: 0 0.6rem;
    flex: 1 1 auto;
  }

  .btn-primary {
    height: 30px;
    font-size: 0.7rem;
    padding: 0 0.6rem;
    flex: 1 1 auto;
  }

  .footer-nav {
    gap: 0.2rem;
    padding: 0.3rem 0;
  }
}