h2 {
  font-size: 1.15rem;
  margin-bottom: 0.75rem;
  color: #1a1a2e;
  font-weight: 600;
}

.spinner {
  border: 3px solid rgba(102, 126, 234, 0.2);
  border-top: 3px solid #667eea;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  animation: spin 1s linear infinite;
  margin: 1rem auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.error {
  background: rgba(231, 76, 60, 0.1);
  border: 1px solid rgba(231, 76, 60, 0.35);
  color: #a93226;
  padding: 0.75rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.info {
  font-size: 0.85rem;
  color: #666;
  text-align: center;
}

.launch-form {
  max-width: 560px;
  margin: 0 auto;
  padding: 0;
  text-align: left;
  color: #1a1a2e;
}

.form-group {
  margin-bottom: 1.1rem;
}

.form-row {
  gap: 0.75rem;
}

.game-version-info {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.1rem;
  margin-top: -0.55rem;
  margin-bottom: 1.1rem;
  padding: 0 0.1rem;
}

.game-version-meta {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  min-width: 0;
  max-width: 100%;
}

.game-version-label {
  flex-shrink: 0;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #94a3b8;
}

.game-version-value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.78rem;
  font-weight: 500;
  color: #475569;
  line-height: 1.3;
}

.game-version-value.is-missing {
  font-weight: 400;
  font-style: italic;
  color: #94a3b8;
}

.optional-tag {
  opacity: 0.5;
  font-weight: normal;
  text-transform: none;
  letter-spacing: normal;
}

.btn-launch {
  display: block;
  width: 100%;
  padding: 0.65rem 0.75rem;
  margin-top: 1.5rem;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  font-size: 0.9rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
}

.btn-launch:hover {
  opacity: 0.9;
}

.btn-launch:active {
  transform: scale(0.98);
}

.btn-launch:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.launch-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.launch-actions .btn-launch {
  flex: 1;
  width: auto;
  margin-top: 0;
}

.btn-launch-secondary {
  background: linear-gradient(135deg, #334155, #475569);
}

.advanced-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 1.25rem;
  padding: 0;
  border: none;
  background: none;
  color: #667eea;
  font-size: 0.82rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  user-select: none;
}

.advanced-toggle:hover {
  opacity: 0.8;
}

.advanced-toggle svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.15s;
}

.advanced-toggle.open svg {
  transform: rotate(180deg);
}

.advanced-panel {
  display: none;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid #eee;
}

.advanced-panel.open {
  display: block;
}

.toggle-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.toggle-switch {
  position: relative;
  width: 36px;
  height: 20px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.toggle-slider {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: #ccc;
  border-radius: 20px;
  cursor: pointer;
  transition: background 0.2s;
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  left: 3px;
  top: 3px;
  background: white;
  border-radius: 50%;
  transition: transform 0.2s;
}

.toggle-switch input:checked + .toggle-slider {
  background: #667eea;
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(16px);
}

.toggle-label {
  font-size: 0.82rem;
  font-weight: 500;
  color: #666;
}

body.theme-dark .toggle-slider {
  background: rgba(255, 255, 255, 0.2);
}

body.theme-dark .toggle-switch input:checked + .toggle-slider {
  background: #7c8cff;
}

body.theme-dark .toggle-label {
  color: #cbd5e1;
}

body.theme-dark .advanced-toggle {
  color: #7c8cff;
}

body.theme-dark .advanced-panel {
  border-top-color: rgba(255, 255, 255, 0.12);
}

body.theme-dark .launch-form {
  color: #e5e7eb;
}

body.theme-dark .game-version-label,
body.theme-dark .game-version-value.is-missing {
  color: #64748b;
}

body.theme-dark .game-version-value {
  color: #94a3b8;
}

body.theme-dark h2,
body.theme-dark .info {
  color: #cbd5e1;
}

body.theme-dark .error {
  color: #fecaca;
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.35);
}

@media (max-width: 700px) {
  .panel {
    padding: 1.25rem;
  }

  .form-row {
    flex-direction: column;
    gap: 0;
  }

  .game-version-info {
    flex-direction: column;
    gap: 0.15rem;
  }
}
