/* ==========================================================================
   WEB GAME WINDOWS
   Hosted games run in their own Zeon OS window with a compact game toolbar.
   ========================================================================== */

.webgame-app {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  background: #05070c;
}

.webgame-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 6px 10px;
  flex-shrink: 0;
  background: var(--bg-surface-elevated);
  border-bottom: var(--glass-border-subtle);
}

.webgame-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.webgame-brand-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  color: var(--accent);
}

.webgame-brand-icon svg {
  width: 22px;
  height: 22px;
}

.webgame-brand-copy {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.webgame-title {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.2;
}

.webgame-host {
  font-size: 10px;
  color: var(--text-muted);
  line-height: 1.2;
}

.webgame-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  flex: none;
}

.webgame-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 28px;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  font-size: 11px;
  cursor: pointer;
  transition: background-color var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
}

.webgame-btn:hover {
  background: rgba(127, 127, 127, 0.16);
  border-color: var(--glass-border-subtle);
  color: var(--text-primary);
}

.webgame-btn svg {
  width: 15px;
  height: 15px;
}

.webgame-stage {
  position: relative;
  flex: 1;
  min-height: 0;
  background: #000;
}

.webgame-frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #000;
}

.webgame-loading {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #05070c;
  color: #f8fafc;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.webgame-loading.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.webgame-spinner {
  width: 28px;
  height: 28px;
  border: 2px solid rgba(255, 255, 255, 0.16);
  border-top-color: #f8fafc;
  border-radius: 50%;
  animation: webgameSpin 0.8s linear infinite;
}

@keyframes webgameSpin {
  to { transform: rotate(360deg); }
}

.webgame-loading-title {
  font-size: 13px;
  font-weight: 600;
}

.webgame-loading-hint {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.55);
}

.webgame-stage:fullscreen {
  background: #000;
}
