/* game search поиск игр */
.game-selector-form {
    background: white;
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
    border: 1px solid #f0f0f0;
    max-width: 600px;
    margin: 0 auto;
    transition: transform 0.3s ease;
  }

  .game-selector-form:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
  }

  .form-section {
    margin-bottom: 24px;
  }

  .section-label {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: #4b5563;
    margin-bottom: 12px;
    padding-left: 8px;
    position: relative;
  }

  .section-label::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 16px;
    background: #78BF9B;
    border-radius: 2px;
  }


/* Стили для радиокнопок */
/* Radio Group Container */
.radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Radio Option Container */
.radio-option {
  position: relative;
}

/* Hide Native Radio Input */
.radio-option input[type="radio"] {
  position: absolute;
  opacity: 0;
}

/* Radio Label Styling */
.radio-option label {
  display: flex;
  align-items: center;
  padding: 10px 16px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
}

/* Custom Radio Design */
.radio-design {
  width: 16px;
  height: 16px;
  margin-right: 10px;
  border: 2px solid #d1d5db;
  border-radius: 50%;
  position: relative;
  transition: all 0.3s ease;
}

/* Hover States */
.radio-option:hover label {
  background: #f3f4f6;
}

/* Focus State */
.radio-option input[type="radio"]:focus + label {
  box-shadow: 0 0 0 3px rgba(120, 191, 155, 0.2);
}

/* Checked State */
.radio-option input[type="radio"]:checked + label {
  background: #F0F9F4;
  border-color: #78BF9B;
  color: #2E6D4D;
  box-shadow: 0 0 0 1px #78BF9B;
}

.radio-option input[type="radio"]:checked + label .radio-design {
  border-color: #4D9972;
  background: #4D9972;
  box-shadow: inset 0 0 0 2px #F0F9F4;
}

/* Hover on Checked State */
.radio-option input[type="radio"]:checked + label:hover {
  background: #E0F2E9;
  border-color: #5FAF84;
}





  /* Стили для выпадающего списка */
  .select-wrapper {
    position: relative;
  }

  .select-wrapper select {
    width: 100%;
    padding: 12px 16px;
    font-size: 0.95rem;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #f9fafb;
    appearance: none;
    transition: all 0.2s ease;
  }

  .select-wrapper select:focus {
    outline: none;
    border-color: #a5b4fc;
    box-shadow: 0 0 0 3px rgba(199, 210, 254, 0.5);
  }

  .select-arrow {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #9ca3af;
  }



/* Стили для кнопок */
.form-actions {
    display: flex;
    flex-direction: column;  /* Главное изменение - столбец вместо строки */
    gap: 12px;
    margin-top: 32px;
    align-items: center;     /* Центрируем кнопки по горизонтали */
    width: 100%;            /* На всю доступную ширину */
}

.action-button {
    position: relative;
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    overflow: hidden;
    min-width: 200px;       /* Увеличил минимальную ширину для стабильности */
    width: 100%;            /* На всю ширину родителя */
    max-width: 260px;       /* Максимальная ширина для контроля */
    box-sizing: border-box;  /* Чтобы padding не влиял на ширину */
    white-space: nowrap;    /* Запрещаем перенос текста */
}

/* Стили для состояний кнопок */
.action-button.loading .button-content span:last-child {
    content: 'Подбираем...';
}

.action-button.loading[value="random"] .button-content span:last-child {
    content: 'Ищем...';
}

.action-button.loading .bi {
    display: none;
}

.action-button.loading .button-loader::after {
    content: '';
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid currentColor;
    border-radius: 50%;
    border-right-color: transparent;
    animation: spinner-border 0.75s linear infinite;
    margin-left: 8px;
    vertical-align: -2px;
}

@keyframes spinner-border {
    to { transform: rotate(360deg); }
}



  /* Выбор необычных игр */
  .unusual-selector {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.checkbox-option {
    position: relative;
    margin-bottom: 5px;
}

.checkbox-option input[type="checkbox"] {
    opacity: 0;
    position: absolute;
}

.checkbox-design {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid #6c5ce7;
    border-radius: 4px;
    margin-right: 10px;
    position: relative;
    top: 3px;
    transition: all 0.3s;
}

input[type="checkbox"]:checked + label .checkbox-design {
    background-color: #6c5ce7;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='white' viewBox='0 0 24 24'%3e%3cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: center;
}

.option-hint {
    display: block;
    font-size: 0.8em;
    color: #777;
    margin-top: 3px;
    margin-left: 28px;
}
/* Выбор необычных игр */






  .primary-button {
  background: linear-gradient(135deg, #78BF9B 0%, #5FAF84 100%);
  color: white;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
  box-shadow:
    0 2px 4px rgba(120, 191, 155, 0.2),
    inset 0 1px 1px rgba(255, 255, 255, 0.2);
}

.primary-button:hover {
  background: linear-gradient(135deg, #6CB490 0%, #4D9972 100%);
  box-shadow:
    0 4px 8px rgba(120, 191, 155, 0.3),
    inset 0 1px 1px rgba(255, 255, 255, 0.2);
}

.primary-button:active {
  background: linear-gradient(135deg, #5FAF84 0%, #3C8360 100%);
  box-shadow:
    inset 0 2px 4px rgba(0, 0, 0, 0.1);
}


  .secondary-button {
    background: linear-gradient(135deg, #ec4899 0%, #f43f5e 100%);
    color: white;
    padding-right: 44px;
  }

  .action-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  }

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

  .button-content {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    z-index: 1;
  }

  .button-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
    opacity: 0;
    transition: opacity 0.2s ease;
  }

  .action-button.loading .button-content {
    opacity: 0;
  }

  .action-button.loading .button-loader {
    opacity: 1;
  }


  .action-button {
  position: relative; /* Добавляем для нового контекста */
  overflow: visible; /* Разрешаем показ за пределами кнопки */
}

.tooltip-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  cursor: help;
  transition: background 0.2s ease;
}

.tooltip-icon::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 5px);
  left: 50%;
  width: max-content;
  max-width: 200px;
  padding: 6px 10px;
  background: #2E6D4D;
  color: white;
  font-size: 12px;
  border-radius: 4px;
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity 0.2s;
  z-index: 1000;
}

.tooltip-icon:hover::after {
  opacity: 1;
}

  /* Анимации */
  @keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
  }

  /* Сообщение об ошибке */
  .form-error-message {
    background: #fee2e2;
    color: #b91c1c;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: shake 0.5s ease;
  }

  @keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-4px); }
    40%, 80% { transform: translateX(4px); }
  }
