/* =========================================
   LAYOUT
   ========================================= */

/* и для мульти, и для сингла одинаковый контейнер */
.create-room-wrap,
.single-player-wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 28px 16px 40px;
}

/* Header (класс тот же, что и на create-room) */

.create-room-header {
  margin-bottom: 20px;
  text-align: center;
}

.create-room-header .page-title {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  text-transform: uppercase;
  margin: 0 0 6px;
  font-size: 1.8rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #f9fafb;
}

.create-room-header .subtitle {
  font-size: 0.98rem;
  color: var(--muted, #9ca3af);
  max-width: 560px;
  margin: 0 auto;
}

/* Card */

.form-card.gff-card {
  border-radius: 20px;
  background:
    radial-gradient(circle at 0 0, rgba(59,130,246,.18), transparent 60%),
    radial-gradient(circle at 100% 100%, rgba(236,72,153,.18), transparent 60%),
    rgba(15,23,42,.96);
  border: 1px solid var(--border-subtle, rgba(148,163,184,0.4));
  box-shadow: 0 18px 52px rgba(15,23,42,.95);
  padding: 22px 20px 24px;
  color: #e5e7eb;
}

@media (min-width: 768px) {
  .form-card.gff-card {
    padding: 24px 26px 26px;
  }
}

/* =========================================
   FORM FIELDS
   ========================================= */

.create-room-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.gff-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.gff-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #e5e7eb;
}

/* Wrapper для инпута + иконка */

.gff-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

/* Текстовые инпуты и селекты */

.gff-input,
.gff-select {
  width: 100%;
  padding: 9px 12px;
  padding-right: 36px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.55);
  background: rgba(15, 23, 42, 0.96);
  color: #e5e7eb;
  font-size: 0.95rem;

  outline: none;
  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    background 0.16s ease;
}

.gff-input:focus,
.gff-select:focus {
  border-color: var(--accent-blue, #38bdf8);
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.55);
  background: rgba(15, 23, 42, 1);
}

/* Иконка справа */

.gff-input-icon {
  position: absolute;
  right: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  color: rgba(148, 163, 184, 0.9);
  font-size: 0.95rem;
}

/* убиваем системную стрелку у select и рисуем свою */
.create-room-wrap .gff-select,
.single-player-wrap .gff-select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;

  padding-right: 46px;
  background-color: var(--field-bg, #020617);

  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23CBD5F5' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
}

/* чтобы наша иконка не залезала на стрелку */
.create-room-wrap .gff-input-wrap .gff-input-icon,
.single-player-wrap .gff-input-wrap .gff-input-icon {
  right: 40px;
}

/* Ошибки */
.gff-error-msg {
  font-size: 0.8rem;
  color: var(--accent-pink, #fb7185);
  display: none;
}

.gff-input.is-invalid,
.gff-select.is-invalid {
  border-color: var(--accent-pink, #fb7185);
  box-shadow: 0 0 0 1px rgba(248, 113, 113, 0.65);
}

.gff-input.is-invalid ~ .gff-error-msg,
.gff-select.is-invalid ~ .gff-error-msg {
  display: block;
}

/* запас для старых .invalid-feedback */
.invalid-feedback {
  font-size: 0.8rem;
  color: var(--accent-pink, #fb7185);
  display: none;
}

/* ===========================
   CHECKBOX (если вдруг появится для SP)
   =========================== */

.gff-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.gff-checkbox input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

/* BOX */
.gff-checkbox-box {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 2px solid #60a5fa;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;

  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

/* LABEL */
.gff-checkbox-label {
  font-size: 0.92rem;
  color: #e5e7eb;
}

/* CHECKED STATE */
.gff-checkbox input[type="checkbox"]:checked + .gff-checkbox-box {
  background: #38bdf8;
  border-color: #38bdf8;
  box-shadow: 0 0 6px rgba(59,130,246,0.45);
}

/* CHECKMARK */
.gff-checkbox input[type="checkbox"]:checked + .gff-checkbox-box::after {
  content: "";
  width: 10px;
  height: 10px;
  mask: url("data:image/svg+xml;utf8,<svg fill='white' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'><path fill-rule='evenodd' d='M16.707 5.293a1 1 0 010 1.414l-8.0 8.0a1 1 0 01-1.414 0l-4.0-4.0a1 1 0 111.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z' clip-rule='evenodd'/></svg>");
  mask-size: contain;
  mask-repeat: no-repeat;
  background: white;
  display: block;
}

/* =========================================
   HELP + PILL LINKS (Store / Create pack)
   ========================================= */

.help.sm {
  font-size: 0.8rem;
  color: #cbd5e1;
}

.help.sm.muted {
  color: var(--muted, #9ca3af);
}

/* wrapper */
.pill-links {
  margin-left: 6px;
}

/* pill-like links */
.pill-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 4px 14px;
  margin: 0 6px;

  border-radius: 999px;
  border: none;

  background: linear-gradient(135deg, #00B0FF, #8A2BE2);
  box-shadow:
    0 0 10px rgba(56, 189, 248, 0.5),
    0 0 18px rgba(138, 43, 226, 0.45);

  font-size: 0.8rem;
  font-weight: 500;
  color: #020617;
  text-decoration: none;

  white-space: nowrap;
  position: relative;
  overflow: hidden;

  transition:
    box-shadow 0.16s ease,
    transform 0.12s ease;
}

.pill-link:hover {
  transform: translateY(-1px) scale(1.02);
  box-shadow:
    0 0 16px rgba(56, 189, 248, 0.7),
    0 0 26px rgba(138, 43, 226, 0.7);
}

/* =========================================
   ACTIONS / BUTTONS
   ========================================= */

.actions {
  margin-top: 6px;
  display: flex;
  justify-content: flex-end;
}

.gff-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;

  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;

  transition:
    background 0.16s ease,
    border-color 0.16s ease,
    color 0.16s ease,
    transform 0.12s ease,
    box-shadow 0.16s ease;
}

.gff-btn--accent {
  background: linear-gradient(
    135deg,
    rgba(0,0,205,0.35),
    rgba(138,43,226,0.35)
  );
  border: 1px solid rgba(0,0,205,0.35);
  color: #f9fafb;
  box-shadow:
    0 0 10px rgba(60,120,255,0.35),
    0 0 20px rgba(138,43,226,0.25),
    inset 0 0 18px rgba(255,255,255,0.06);
}

.gff-btn--accent:hover {
  transform: translateY(-1px);
  box-shadow:
    0 16px 40px rgba(15, 23, 42, 0.95),
    0 0 22px rgba(56, 189, 248, 0.4);
}

/* =========================================
   SINGLE PLAYER — START BUTTON
   ========================================= */
.start-link-wrap {
  margin-top: 24px;
  display: flex;
  justify-content: flex-end; /* по центру → center */
}
/* d-none для совместимости */
.d-none {
  display: none !important;
}

/* сам линк Launch Game */
#single-player-start-link {
  margin-top: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-width: 180px;
  padding: 10px 20px;
  border-radius: 999px;
  border: 1px solid rgba(56, 189, 248, 0.55);
  background:
    radial-gradient(circle at 0 0, rgba(56,189,248,0.2), transparent 55%),
    radial-gradient(circle at 100% 100%, rgba(147,51,234,0.24), transparent 55%),
    rgba(15,23,42,0.96);
  color: #e5e7eb;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-decoration: none;

  box-shadow:
    0 0 0 1px rgba(15,23,42,1),
    0 12px 30px rgba(15,23,42,0.9);
  transition:
    transform 0.12s ease,
    box-shadow 0.18s ease,
    background 0.18s ease;
}

/* чтобы внутри можно было стилизовать label, если захочешь */
.gff-start-link-label {
  pointer-events: none;
}

#single-player-start-link:hover {
  transform: translateY(-1px);
  box-shadow:
    0 0 0 1px rgba(56,189,248,0.7),
    0 16px 40px rgba(15,23,42,1);
}

#single-player-start-link:active {
  transform: translateY(0);
}

/* подсветка после создания игры (та же host-link-highlight) */
#single-player-start-link.host-link-highlight {
  box-shadow:
    0 0 0 1px rgba(56,189,248,0.9),
    0 0 22px rgba(56,189,248,0.8),
    0 0 40px rgba(147,51,234,0.6);
}

/* =========================================
   MODAL (Tutorial) — общий стиль как у мульти
   ========================================= */

.gff-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9000;
}

.gff-modal--open {
  display: flex;
}

.gff-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(10px);
}

.gff-modal-dialog {
  position: relative;
  z-index: 1;
  max-width: 720px;
  width: 92%;
  border-radius: 22px;
  background: radial-gradient(
      circle at top left,
      rgba(56, 189, 248, 0.12),
      transparent 55%
    ),
    rgba(15, 23, 42, 0.98);
  border: 1px solid rgba(148, 163, 184, 0.5);
  box-shadow:
    0 28px 70px rgba(15, 23, 42, 0.95),
    0 0 30px rgba(56, 189, 248, 0.18);
  padding: 22px 20px 20px;

  display: flex;
  flex-direction: column;
  gap: 12px;
}

@media (min-width: 768px) {
  .gff-modal-dialog {
    padding: 24px 24px 22px;
  }
}

.gff-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  background: rgba(15, 23, 42, 0.96);
  color: #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition:
    background 0.16s ease,
    border-color 0.16s ease,
    transform 0.1s ease;
}

.gff-modal-close:hover {
  background: rgba(30, 64, 175, 0.9);
  border-color: rgba(191, 219, 254, 0.9);
  transform: translateY(-1px);
}

.gff-modal-eyebrow {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--accent-blue, #38bdf8);
}

.gff-modal-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: #e5e7eb;
}

.gff-modal-lead {
  font-size: 0.95rem;
  color: #cbd5e1;
}

/* Видео */

.gff-video-frame {
  margin-top: 8px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: #020617;
  position: relative;
  padding-top: 56.25%; /* 16:9 */
}

.gff-video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* =========================================
   RESPONSIVE
   ========================================= */

@media (max-width: 600px) {
  .create-room-header .page-title {
    font-size: 1.6rem;
  }

  .form-card.gff-card {
    padding: 18px 14px 20px;
  }
}