body {
  font-family: 'Roboto', sans-serif;
  background-color: #f9fbfe;
  color: #222831;
  margin: 0;
  padding: 0;
}

/* Обновленные стили для шапки */
.tm-header {
  background-color: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 12px 0;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

.tm-header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -15px;
}

.col-auto {
  flex: 0 0 auto;
  width: auto;
  padding: 0 15px;
}

.col {
  flex: 1 0 0;
  padding: 0 15px;
}

.tm-header-logo {
  display: flex;
  align-items: center;
  flex-grow: 1; /* Добавьте это */
}

.tm-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: #222831;
  font-weight: 700;
  font-size: 20px;
}

.tm-logo-icon {
  width: 40px;
  height: 40px;
  background-color: #27a6e6;
  border-radius: 8px;
  margin-right: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
}

.tm-nav {
  display: flex;
  align-items: center;
}

.tm-nav-tabs {
  display: flex;
  margin-right: 20px;
}

.tm-nav-tab {
  display: flex;
  align-items: center;
  padding: 10px 16px;
  text-decoration: none;
  color: #27a6e6;
  font-weight: 500;
  border-radius: 8px;
  margin-right: 8px;
  transition: all 0.2s ease;
}

.tm-nav-tab:hover {
  background-color: #f5f5f5;
  color: #27a6e6;
}

.tm-nav-tab.active {
  background-color: rgba(0, 136, 204, 0.1);
  color: #27a6e6;
}

.tm-nav-icon {
  margin-right: 8px;
  font-size: 18px;
}

.btn-telegram {
  background-color: #27a6e6;
  color: white;
  border-radius: 8px;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  text-decoration: none;
  font-weight: 500;
  transition: background-color 0.2s;
}

.btn-telegram:hover {
  background-color: #0077b3;
  color: white;
}

.tm-telegram-icon {
  margin-right: 8px;
  width: 18px;
  height: 18px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm4.64 6.8c-.15 1.58-.8 5.42-1.13 7.19-.14.75-.42 1-.68 1.03-.58.05-1.02-.38-1.58-.75-.88-.58-1.38-.94-2.23-1.5-.99-.65-.35-1.01.22-1.59.15-.15 2.71-2.48 2.76-2.69.03-.1.06-.2-.06-.3-.1-.09-.25-.06-.36-.04-.15.03-2.57 1.66-3.74 2.4-.35.23-.67.34-1.14.34-.76 0-1.27-.22-1.93-.72-.68-.5-1.3-1.14-2.03-1.98-.8-.92-1.48-1.96-2.13-2.97-.22-.34.22-.4.64-1.08.1-.17.05-.32-.02-.45-.08-.12-.21-.2-.52-.35-.25-.12-.54-.25-.53-.53.01-.16.19-.23.58-.12 2.17.68 3.62 1.15 5.46 1.88.6.24 1.14.36 1.64.36.48 0 .75-.17 1.03-.6.39-.6 1.18-1.99 1.59-2.67.4-.67.8-.56 1.35-.34.56.22 3.52 2.07 4.11 2.45.59.38.99.57 1.13.89.16.32.12 1.2-.28 2.36z'/%3E%3C/svg%3E");
  background-size: contain;
}

.tm-welcome-header {
  text-align: center;
  padding: 40px 16px 20px;
}

.tm-welcome-title {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 12px;
  color: #222831;
}

.tm-welcome-text {
  font-size: 16px;
  color: #6b7885;
  max-width: 600px;
  margin: 0 auto 15px;
  line-height: 1.5;
}

.tm-telegram-link {
  display: inline-block;
  margin-top: 10px;
  color: #27a6e6;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.tm-telegram-link:hover {
  color: #006699;
  text-decoration: underline;
}

.tm-tab-switcher {
  display: flex;
  justify-content: center;
  margin: 0 auto 30px;
  border-bottom: 1px solid #ddd;
  max-width: 600px;
}

.tm-tab-btn {
  padding: 12px 24px;
  text-align: center;
  cursor: pointer;
  font-weight: 500;
  color: #6b7885;
  position: relative;
  border: none;
  background: none;
  transition: all 0.2s;
}

.tm-tab-btn:hover {
  color: #27a6e6;
}

.tm-tab-btn.active {
  color: #27a6e6;
}

.tm-tab-btn.active:after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: #27a6e6;
}

.form-container {
  max-width: 600px;
  margin: 0 auto;
  padding: 0 16px;
}

.tm-section {
  background-color: #fff;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.tm-main-form-group {
  margin-bottom: 20px;
}

.tm-main-form-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-weight: 500;
  color: #222831;
}

.tm-main-form-label-badge {
  background-color: #ff3b30;
  color: white;
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 10px;
  margin-left: 8px;
}

.tm-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 16px;
  box-sizing: border-box;
}

.tm-input:focus {
  border-color: #27a6e6;
  outline: none;
  box-shadow: 0 0 0 2px rgba(0,136,204,0.2);
}

.tm-package-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.tm-package-option {
  flex: 1 1 calc(25% - 12px);
  min-width: 120px;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.tm-package-option:hover {
  border-color: #b3d9ff;
}

.tm-package-option.selected {
  border-color: #27a6e6;
  background-color: rgba(0, 136, 204, 0.05);
  box-shadow: 0 0 0 2px rgba(0, 136, 204, 0.2);
}

.tm-package-option.selected:after {
  content: '✓';
  position: absolute;
  top: 30px;
  right: 8px;
  width: 20px;
  height: 20px;
  background: #27a6e6;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

.tm-package-label {
  font-weight: 500;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
}

.tm-package-badge {
  background-color: rgba(0, 136, 204, 0.1);
  color: #27a6e6;
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 10px;
  margin-left: 8px;
}

.tm-package-value {
  color: #27a6e6;
  font-weight: 700;
  font-size: 18px;
  margin: 8px 0;
}

.tm-package-old-price {
  color: #999;
  font-size: 14px;
  text-decoration: line-through;
  margin-bottom: 4px;
}

.tm-package-new-price {
  color: #27a6e6;
  font-weight: 700;
  font-size: 18px;
}

.tm-package-desc {
  color: #6b7885;
  font-size: 14px;
}

.tm-sale-badge {
  position: absolute;
  top: 0;
  right: 0;
  background: #ff3b30;
  color: white;
  padding: 4px 8px;
  font-size: 12px;
  border-radius: 0 12px 0 12px;
}

.btn {
  display: inline-block;
  font-weight: 500;
  text-align: center;
  white-space: nowrap;
  vertical-align: middle;
  user-select: none;
  border: 1px solid transparent;
  padding: 12px 24px;
  font-size: 16px;
  line-height: 1.5;
  border-radius: 8px;
  transition: all 0.2s;
  cursor: pointer;
}

.btn-primary {
  background-color: #27a6e6;
  color: white;
}

.btn-primary:hover {
  background-color: #0077b3;
}

.btn-block {
  display: block;
  width: 100%;
}

.btn-telegram {
  background-color: #27a6e6;
  color: white;
}

.tm-search-field {
  position: relative;
  margin-bottom: 16px;
}

.tm-search-field-photo {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  position: absolute;
  right: 40px;
  top: 50%;
  transform: translateY(-50%);
  background-size: cover;
  background-position: center;
  display: none;
}

.tm-search-clear {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  color: #6b7885;
  display: none;
}

.tm-search-field.has-value .tm-search-clear {
  display: block;
}

.tm-search-field.has-value .tm-search-field-photo {
  display: block;
}

.tm-search-field.has-value .tm-input {
  padding-right: 80px;
}

.tm-coin-field {
  position: relative;
}

.tm-stars-price {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #6b7885;
  font-size: 14px;
}

.tm-price-info {
  color: #6b7885;
  font-size: 14px;
  margin-top: 4px;
}

.old-price {
  text-decoration: line-through;
  color: #999;
  margin-right: 5px;
}

.tm-footer {
  text-align: center;
  padding: 24px;
  color: #6b7885;
  margin-top: 40px;
}

.tm-footer-links {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.tm-footer-link {
  color: #6b7885;
  text-decoration: none;
}

.tm-footer-link:hover {
  text-decoration: underline;
}

.icon {
  width: 24px;
  height: 24px;
  display: inline-block;
  vertical-align: middle;
}

.icon-telegram-premium {
  fill: #27a6e6;
}

.tm-label-new {
  background-color: #ff3b30;
  color: white;
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 10px;
  margin-left: 4px;
}

.form-premium {
  display: none;
}

.mini-frac {
  font-size: 0.8em;
}

.error-message {
  color: #ff3b30;
  font-size: 14px;
  margin-top: 5px;
  display: none;
}

.tm-faq-section {
  max-width: 600px;
  margin: 40px auto;
  padding: 0 16px;
}

.tm-faq-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 20px;
  color: #222831;
  text-align: center;
}

.tm-faq-item {
  background-color: #fff;
  border-radius: 8px;
  margin-bottom: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.tm-faq-question {
  padding: 16px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tm-faq-answer {
  padding: 0 16px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.tm-faq-item.active .tm-faq-answer {
  padding: 0 16px 16px;
  max-height: 500px;
}

.tm-faq-toggle {
  font-size: 20px;
  transition: transform 0.3s;
}

.tm-faq-item.active .tm-faq-toggle {
  transform: rotate(45deg);
}

.username-help-link {
  color: #27a6e6;
  font-size: 14px;
  text-decoration: none;
}

.username-help-link:hover {
  text-decoration: underline;
}

.tm-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}

.tm-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
}

.tm-modal-container {
  position: relative;
  background-color: #fff;
  border-radius: 12px;
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tm-modal-header {
  padding: 20px;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tm-modal-header h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
}

.tm-modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #6b7885;
  padding: 0;
  line-height: 1;
}

.tm-modal-body {
  padding: 20px;
}

.tm-modal-step {
  display: flex;
  margin-bottom: 20px;
}

.tm-modal-step-number {
  width: 30px;
  height: 30px;
  background-color: #27a6e6;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 15px;
  flex-shrink: 0;
  font-weight: 600;
}

.tm-modal-step-content {
  flex-grow: 1;
}

.tm-modal-step-content p {
  margin-top: 0;
  margin-bottom: 10px;
}

.tm-modal-step-content img {
  max-width: 100%;
  border-radius: 8px;
  border: 1px solid #eee;
}

.tm-modal-footer {
  padding: 20px;
  border-top: 1px solid #eee;
  text-align: right;
}

.tm-modal-close-btn {
  min-width: 120px;
}

/* Horizontal Package Selector - Fixed Version */
.tm-package-selector-horizontal {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.tm-package-option-horizontal {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 16px 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  background-color: #fff;
  display: flex;
  align-items: center;
  min-height: 60px;
  position: relative;
  padding-right: 40px;
}

.tm-package-option-horizontal:hover {
  border-color: #b3d9ff;
  background-color: #f5f9ff;
}

.tm-package-option-horizontal.selected {
  border-color: #27a6e6;
  background-color: rgba(0, 136, 204, 0.05);
  box-shadow: 0 0 0 2px rgba(0, 136, 204, 0.2);
}

.tm-package-option-horizontal.selected:after {
  content: '✓';
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  background: #27a6e6;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

.tm-package-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  flex-grow: 1;
  min-width: 0;
}

.tm-package-label {
  font-weight: 500;
  font-size: 16px;
  color: #222831;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 1;
  min-width: 0;
  margin-bottom: 0;
  display: flex;
  align-items: center;
}

.tm-package-prices {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  margin-left: auto;
  padding-left: 10px;
}

.tm-package-old-price {
  color: #999;
  font-size: 13px;
  text-decoration: line-through;
  white-space: nowrap;
  margin-bottom: 0;
}

.tm-package-new-price {
  color: #27a6e6;
  font-weight: 700;
  font-size: 16px;
  white-space: nowrap;
}

.btn-show-more {
  width: 100%;
  background-color: transparent;
  color: #27a6e6;
  border: 1px solid #27a6e6;
  margin-top: 10px;
}

.btn-show-more:hover {
  background-color: rgba(0, 136, 204, 0.1);
}

.hidden-option {
  display: none;
}

/* Мобильное меню */
.tm-mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  width: 32px;
  height: 32px;
  flex-direction: column;
  justify-content: space-around;
  padding: 0;
  margin-left: auto; /* Измените это с margin-left: 15px */
  cursor: pointer;
}

.tm-mobile-menu-toggle span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: #222831;
  border-radius: 3px;
  transition: all 0.3s ease;
}

@media (max-width: 992px) {
  .tm-nav {
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    background-color: white;
    flex-direction: column;
    align-items: stretch;
    padding: 20px;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
    transform: translateY(-150%);
    transition: transform 0.3s ease;
    z-index: 999;
  }

  .tm-nav.active {
    transform: translateY(0);
  }

  .tm-nav-tabs {
    flex-direction: column;
    margin-right: 0;
    margin-bottom: 20px;
  }

  .tm-nav-tab {
    margin-right: 0;
    margin-bottom: 8px;
    padding: 12px 16px;
  }

  .tm-mobile-menu-toggle {
    display: flex;
  }

  .tm-mobile-menu-toggle.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .tm-mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
  }

  .tm-mobile-menu-toggle.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  /* Добавленные стили */
  .tm-nav-actions {
    width: 100%;
  }

  .btn-telegram {
    width: 100%;
    justify-content: center;
  }

  .btn-telegram span {
    display: inline-block !important; /* Переопределяем скрытие текста */
    margin-left: 8px;
  }
}

@media (max-width: 768px) {
  .tm-package-option {
    flex: 1 1 100%;
  }

  .tm-tab-btn {
    padding: 12px 16px;
  }

  .tm-welcome-title {
    font-size: 28px;
  }

  .col {
    flex: 0 0 100%;
    margin-bottom: 10px;
  }

  .tm-header-actions {
    margin-top: 10px;
  }

  .tm-package-option-horizontal {
    padding: 10px 12px;
    padding-right: 36px;
  }

  .tm-package-label {
    font-size: 14px;
    max-width: 50%;
  }

  .tm-package-new-price {
    font-size: 14px;
  }
}

@media (max-width: 576px) {
  .tm-package-content {
    flex-direction: column;
    align-items: flex-start;
  }

  .tm-package-prices {
    width: 100%;
    justify-content: flex-start;
    margin-top: 4px;
    margin-left: 0;
    padding-left: 0;
    flex-direction: row;
    align-items: center;
    gap: 8px;
  }

  .tm-package-label {
    max-width: 100%;
    margin-bottom: 4px;
  }

  .tm-package-option-horizontal {
    padding-right: 36px;
  }

  .tm-logo-text {
    font-size: 18px;
  }

  .btn-telegram span {
    display: none;
  }

  .btn-telegram .tm-telegram-icon {
    margin-right: 0;
  }
}

/* Стили для картинки в мобильном меню */
.tm-mobile-image-container {
  display: none; /* Скрыто по умолчанию */
  padding: 15px;
  text-align: center;
  border-bottom: 1px solid #eee;
  margin-bottom: 15px;
}

.tm-mobile-telegram-image {
  max-width: 100%;
  height: auto;

  border-radius: 8px;
  object-fit: contain;
}

@media (max-width: 992px) {
  .tm-mobile-image-container {
    display: block; /* Показываем только в мобильной версии */
  }

  /* Уменьшаем отступы для экономии места */
  .tm-nav {
    padding: 10px;
  }

  /* Уменьшаем размер картинки на очень маленьких экранах */
  @media (max-height: 700px) {
    .tm-mobile-telegram-image {
      max-height: 360px;
    }
  }

  /* Еще более компактный вариант для совсем маленьких экранов */
  @media (max-height: 600px) {
    .tm-mobile-telegram-image {
      max-height: 80px;
    }

    .tm-nav-tab {
      padding: 8px 12px;
    }

    .btn-telegram {
      padding: 8px 12px;
    }
  }
}

/* Стили для iPad Mini (портретная ориентация) */
@media only screen
  and (min-device-width: 721px)
  and (max-device-width: 1024px)
  and (orientation: portrait)
  and (-webkit-min-device-pixel-ratio: 1) {

  .tm-mobile-telegram-image {
    max-height: 400px; /* или любое другое подходящее значение */
    width: auto;
    margin: 0 auto;
  }

  .tm-nav {
    max-height: 80vh;
    overflow-y: auto;
  }
}

/* Для iPad Mini (альбомная ориентация) */
@media only screen
  and (min-device-width: 768px)
  and (max-device-width: 1024px)
  and (orientation: landscape)
  and (-webkit-min-device-pixel-ratio: 1) {

  .tm-mobile-telegram-image {
    max-height: 550px;
  }
}

/* Стили для Surface Duo в развернутом состоянии (два экрана) */
@media (min-width: 540px) and (max-width: 720px) and (min-height: 720px) and (max-height: 900px) {
  .tm-mobile-telegram-image {
    max-height: 420px;
    margin-bottom: 10px;
  }

  .tm-nav {
    padding: 15px;
    max-height: 80vh;
    overflow-y: auto;
  }
}

/* Стили для Surface Duo в сложенном состоянии (один экран) */
@media (max-width: 540px) and (min-height: 720px) {
  .tm-mobile-telegram-image {
    max-height: 320px;
  }

  .tm-nav-tab {
    padding: 10px 12px;
  }

  .btn-telegram {
    padding: 10px 12px;
  }
}

/* Страница платежа */
/* Добавьте эти стили в ваш основной CSS файл */

/* Общие стили для страницы платежей */
.tm-payment-status {
  background-color: #fff;
  border-radius: 12px;
  padding: 30px;
  margin: 40px 0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  text-align: center;
}

.tm-status-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 40px;
}

.tm-status-success {
  background-color: #4CAF50;
  color: white;
}

.tm-status-error {
  background-color: #f44336;
  color: white;
}

.tm-status-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 15px;
  color: #222831;
}

.tm-status-message {
  font-size: 16px;
  color: #6b7885;
  margin-bottom: 25px;
  line-height: 1.5;
}

.tm-order-details {
  background-color: #f9f9f9;
  border-radius: 8px;
  padding: 15px;
  margin: 20px 0 30px;
  text-align: left;
}

.tm-order-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.tm-order-label {
  color: #6b7885;
}

.tm-order-value {
  font-weight: 500;
}

/* Дополнительные стили кнопок (если их нет в основном CSS) */
.btn {
  display: inline-block;
  font-weight: 500;
  text-align: center;
  white-space: nowrap;
  vertical-align: middle;
  user-select: none;
  border: 1px solid transparent;
  padding: 12px 24px;
  font-size: 16px;
  line-height: 1.5;
  border-radius: 8px;
  transition: all 0.2s;
  cursor: pointer;
  text-decoration: none;
}

.btn-primary {
  background-color: #27a6e6;
  color: white;
}

.btn-primary:hover {
  background-color: #0077b3;
}

.btn-block {
  display: block;
  width: 100%;
  box-sizing: border-box;
}

/* Стили для flex-контейнера (если их нет) */
.flex-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ================== */
/* 404 Page Styles */
/* ================== */

.tm-404-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 20px;
  text-align: center;
}

.tm-404-title {
  font-size: 120px;
  font-weight: 700;
  color: #27a6e6;
  margin: 0;
  line-height: 1;
  position: relative;
  display: inline-block;
}

.tm-404-title span {
  position: relative;
  display: inline-block;
  animation: tm-404-bounce 0.5s ease infinite alternate;
}

.tm-404-title span:nth-child(1) { animation-delay: 0.1s; }
.tm-404-title span:nth-child(2) { animation-delay: 0.2s; }
.tm-404-title span:nth-child(3) { animation-delay: 0.3s; }

@keyframes tm-404-bounce {
  100% {
    transform: translateY(-20px);
    text-shadow: 0 5px 0 rgba(0,0,0,0.1);
  }
}

.tm-404-subtitle {
  font-size: 24px;
  font-weight: 500;
  color: #222831;
  margin: 20px 0;
}

.tm-404-text {
  font-size: 18px;
  color: #6b7885;
  margin-bottom: 30px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.tm-404-illustration {
  max-width: 400px;
  margin: 30px auto;
  position: relative;
}

.tm-404-illustration img {
  width: 100%;
  height: auto;
  border-radius: 12px;
}

.tm-404-search {
  max-width: 500px;
  margin: 30px auto;
  position: relative;
}

.tm-404-search input {
  width: 100%;
  padding: 15px 20px;
  border: 1px solid #ddd;
  border-radius: 50px;
  font-size: 16px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.tm-404-search button {
  position: absolute;
  right: 5px;
  top: 5px;
  background: #27a6e6;
  color: white;
  border: none;
  border-radius: 50px;
  padding: 10px 20px;
  cursor: pointer;
  transition: background 0.2s;
}

.tm-404-search button:hover {
  background: #0077b3;
}

.tm-404-links {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 30px;
  flex-wrap: wrap;
}

.tm-404-link {
  background: #27a6e6;
  color: white;
  padding: 12px 25px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s;
  display: inline-block;
}

.tm-404-link:hover {
  background: #0077b3;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.tm-404-link.secondary {
  background: white;
  color: #27a6e6;
  border: 1px solid #27a6e6;
}

.tm-404-link.secondary:hover {
  background: #f5f9ff;
}

.tm-404-robot {
  position: absolute;
  bottom: -50px;
  right: -50px;
  width: 120px;
  animation: tm-404-float 3s ease-in-out infinite;
}

@keyframes tm-404-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-15px); }
}

/* Responsive Styles */
@media (max-width: 768px) {
  .tm-404-title {
    font-size: 80px;
  }

  .tm-404-subtitle {
    font-size: 20px;
  }

  .tm-404-text {
    font-size: 16px;
  }

  .tm-404-robot {
    width: 80px;
    bottom: -30px;
    right: -30px;
  }

  .tm-404-search {
    max-width: 100%;
    padding: 0 15px;
  }
}

@media (max-width: 480px) {
  .tm-404-title {
    font-size: 60px;
  }

  .tm-404-links {
    flex-direction: column;
    gap: 10px;
  }

  .tm-404-link {
    width: 100%;
    box-sizing: border-box;
    text-align: center;
  }
}


.bots-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

.bot-category {
  margin-bottom: 40px;
}

.bot-category-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 20px;
  color: #222831;
  padding-bottom: 8px;
  border-bottom: 2px solid #27a6e6;
}

.bot-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 16px;
}

.bot-card {
  background-color: #fff;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  display: flex;
  align-items: flex-start;
  transition: transform 0.2s, box-shadow 0.2s;
  height: 100%;
}

.bot-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.bot-avatar {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  margin-right: 16px;
  flex-shrink: 0;
  background-color: #f5f5f5;
  overflow: hidden;
}

.bot-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bot-info {
  flex-grow: 1;
}

.bot-name {
  font-weight: 700;
  margin-bottom: 6px;
  color: #222831;
  display: flex;
  align-items: center;
  font-size: 18px;
}

.bot-emoji {
  margin-right: 8px;
}

.bot-link {
  color: #27a6e6;
  text-decoration: none;
  word-break: break-all;
  font-size: 14px;
  display: inline-block;
  margin-bottom: 8px;
}

.bot-description {
  color: #6b7885;
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 12px;
}

.bot-button {
  background-color: #27a6e6;
  color: white;
  border-radius: 8px;
  padding: 8px 16px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  display: inline-block;
  transition: background-color 0.2s;
}

.bot-button:hover {
  background-color: #0077b3;
  color: white;
}

@media (max-width: 992px) {
  .bot-cards-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .bot-card {
    flex-direction: column;
  }

  .bot-avatar {
    margin-right: 0;
    margin-bottom: 12px;
    width: 50px;
    height: 50px;
  }
}

/* Стили для проверки username */
.tm-search-field {
    position: relative;
}

.tm-search-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: #27a6e6;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
}

.tm-user-confirmed {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f5f5f5;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 10px;
}

.tm-user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tm-user-photo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.tm-user-details {
    display: flex;
    flex-direction: column;
}

.tm-user-name {
    font-weight: bold;
}

.tm-user-username {
    color: #666;
    font-size: 0.9em;
}

.tm-clear-username {
    background: none;
    border: none;
    color: #999;
    font-size: 1.2em;
    cursor: pointer;
    padding: 5px;
}

.tm-clear-username:hover {
    color: #f00;
}

.username-check-form {
    width: 100%;
    position: relative;
}

/* Стили для формы проверки username */
.username-check-form {
    position: relative;
    width: 100%;
}

.tm-search-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: #27a6e6;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    height: 32px;
}

.tm-search-btn:hover {
    background: #0077b3;
}

.tm-search-btn-text {
    display: inline-block;
}

.tm-search-btn-icon {
    display: none;
}

.tm-user-confirmed {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8f9fa;
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    margin-bottom: 8px;
    transition: all 0.2s ease;
}

.tm-user-confirmed:hover {
    border-color: #b3d9ff;
}

.tm-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    overflow: hidden;
}

.tm-user-photo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.tm-user-details {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
}

.tm-user-name {
    font-weight: 500;
    color: #222831;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.tm-user-username {
    color: #6b7885;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tm-clear-username-form {
    flex-shrink: 0;
    margin-left: 12px;
}

.tm-clear-username {
    background: none;
    border: none;
    color: #6b7885;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.tm-clear-username:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #f44336;
}

/* Адаптивные стили */
@media (max-width: 576px) {
    .tm-search-btn-text {
        display: none;
    }

    .tm-search-btn-icon {
        display: inline-block;
    }

    .tm-search-btn {
        padding: 6px;
        width: 32px;
        justify-content: center;
    }

    .tm-user-info {
        gap: 8px;
    }

    .tm-user-photo {
        width: 32px;
        height: 32px;
    }
}

.tm-search-queries {
  padding-top: 40px;
}

.tm-query-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.tm-query-item {
  background-color: #fff;
  border: 1px solid #e3e6e8;
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 15px;
  font-weight: 400;
  color: #222831;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
  transition: all 0.2s ease-in-out;
}

.tm-query-item:hover {
  background-color: #f4f7f8;
  transform: translateY(-2px);
}

.tm-stars-feature-block {
  padding: 60px 0;
  background-color: transparent; /* без фона */
}

.tm-feature-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  max-width: 1200px;
  margin: 0 auto;
}

.tm-feature-card {
  background-color: #ffffff;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  padding: 32px;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
}

.tm-feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.tm-stars-feature-header {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
}

.tm-stars-feature-icon {
  font-size: 28px;
  margin-right: 12px;
}

.tm-stars-feature-title {
  font-size: 20px;
  font-weight: 600;
  margin: 0;
}

.tm-stars-feature-body p {
  font-size: 15px;
  line-height: 1.8;
  margin-bottom: 18px;
  color: #2c2f33;
}

.tm-stars-feature-body a {
  color: #27a6e6;
  text-decoration: none;
}

.tm-stars-feature-body a:hover {
  text-decoration: underline;
}

@media (max-width: 992px) {
  .tm-feature-columns {
    grid-template-columns: 1fr;
  }
}



a:hover {
    color: #27a6e6
}