:root {
  --bg: #0f172a;
  --panel: #1e293b;
  --border: #334155;
  --fg: #f1f5f9;
  --muted: #94a3b8;
  --accent: #3b82f6;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
}

#app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  min-height: 0;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.toolbar h1 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.apk-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
}

.apk-link:hover { filter: brightness(1.1); }
.apk-link::before { content: '📥'; }

.toolbar select {
  padding: 8px 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--fg);
  border-radius: 6px;
  font-size: 13px;
}

.spacer { flex: 1; }

.stage {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 20px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.device-frame {
  border: 6px solid #1f2937;
  border-radius: 36px;
  background: #fff;
  color: #1f2937;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  position: relative;
  flex-shrink: 0;
}

.device-frame::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 24px;
  background: #1f2937;
  border-radius: 0 0 14px 14px;
  z-index: 2;
}

.scene {
  width: 100%;
  height: 100%;
  overflow-y: auto;
  padding-top: 30px;
  font-size: 14px;
  line-height: 1.4;
}

.footer-info {
  padding: 10px 20px;
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: var(--muted);
  flex-shrink: 0;
  background: var(--panel);
}

@media (max-width: 600px) {
  .stage { padding: 0; }
  .device-frame {
    border: 0;
    border-radius: 0;
    box-shadow: none;
    width: 100% !important;
    height: 100% !important;
  }
  .device-frame::before { display: none; }
  .scene { padding-top: 0; }
  .toolbar { flex-wrap: wrap; }
}
