* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  min-height: 100vh;
}

body {
  font-family: Arial, sans-serif;
  background:
    radial-gradient(circle at top, rgba(20, 40, 80, 0.35), transparent 30%),
    radial-gradient(circle at bottom, rgba(0, 255, 200, 0.08), transparent 25%),
    linear-gradient(180deg, #05070d 0%, #02040a 100%);
  color: #d1d5db;
}

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  height: 64px;
  border-bottom: 1px solid rgba(0, 255, 200, 0.14);
  background: rgba(4, 8, 18, 0.95);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-mark {
  color: #67e8f9;
  font-size: 20px;
}

.brand-text {
  color: #7dd3fc;
  font-size: 20px;
  font-weight: bold;
  letter-spacing: 2px;
}

.topbar-status {
  display: flex;
  gap: 18px;
  font-size: 12px;
  color: #94a3b8;
}

.layout {
  flex: 1;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 20px;
  padding: 20px;
  min-height: 0;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.panel {
  background: rgba(10, 14, 24, 0.96);
  border: 1px solid rgba(0, 255, 200, 0.14);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 0 24px rgba(0, 255, 200, 0.05);
}

.panel-title {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(0, 255, 200, 0.1);
  color: #67e8f9;
  font-size: 13px;
  font-weight: bold;
  letter-spacing: 1px;
  background: rgba(255, 255, 255, 0.02);
}

.panel-body {
  padding: 16px;
}

.small-text {
  font-size: 14px;
  line-height: 1.6;
  color: #a7f3d0;
}

.status-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 14px;
}

.status-row:last-child {
  border-bottom: none;
}

.client-frame {
  display: flex;
  flex-direction: column;
  background: rgba(10, 14, 24, 0.96);
  border: 1px solid rgba(0, 255, 200, 0.14);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 0 24px rgba(0, 255, 200, 0.05);
  min-height: 700px;
  min-width: 0;
}

.client-header {
  height: 52px;
  padding: 0 18px;
  border-bottom: 1px solid rgba(0, 255, 200, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #67e8f9;
  font-size: 14px;
  background: rgba(255, 255, 255, 0.02);
  flex-shrink: 0;
}

.client-state {
  color: #facc15;
}

.client-window {
  flex: 1;
  min-height: 0;
  padding: 0;
  background: #000;
}

.embedded-client {
  overflow: hidden;
}

.game-frame {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 600px;
  border: none;
  background: #000;
}

.prompt {
  color: #22d3ee;
  font-weight: bold;
}

.input-bar {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 16px 18px;
  border-top: 1px solid rgba(0, 255, 200, 0.1);
  background: rgba(255, 255, 255, 0.02);
  flex-shrink: 0;
}

.input-bar input {
  flex: 1;
  height: 42px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(103, 232, 249, 0.18);
  border-radius: 8px;
  color: #e2e8f0;
  padding: 0 14px;
  outline: none;
  font-size: 14px;
}

.input-bar input:focus {
  border-color: rgba(103, 232, 249, 0.5);
  box-shadow: 0 0 0 1px rgba(103, 232, 249, 0.2);
}

.input-bar button {
  height: 42px;
  padding: 0 16px;
  border: none;
  border-radius: 8px;
  background: #67e8f9;
  color: #03131a;
  font-weight: bold;
  cursor: pointer;
}

.input-bar button:hover {
  opacity: 0.92;
}

@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .client-frame {
    min-height: 500px;
  }

  .topbar {
    height: auto;
    padding: 14px 18px;
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
  }

  .topbar-status {
    flex-wrap: wrap;
    gap: 10px;
  }
}

/* REMOVE iframe debug border */
iframe,
#game-frame,
.game-frame {
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
}

.client-window,
.client-frame,
.client-window iframe,
.client-frame iframe {
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
}

.client-frame * {
  border-color: transparent !important;
  outline: none !important;
  box-shadow: none !important;
}
