@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@300;400;500&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #0e0f13;
  --surface:   #16181f;
  --border:    #2a2d38;
  --accent:    #5e7fff;
  --accent-hl: #8ca3ff;
  --text:      #e4e6f0;
  --muted:     #6b7080;
  --error:     #ff5f72;
  --radius:    10px;
  --font:      'DM Mono', 'Fira Code', 'Consolas', monospace;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── шапка ── */
.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  height: 60px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent-hl);
  white-space: nowrap;
  flex-shrink: 0;
}

.logo span { color: var(--muted); }

form {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  max-width: 720px;
}

.input-wrap {
  position: relative;
  flex: 1;
}

.input-wrap::before {
  content: '→';
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 14px;
  pointer-events: none;
}

input[type="url"] {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font);
  font-size: 13px;
  padding: 9px 14px 9px 34px;
  outline: none;
  transition: border-color .2s;
}

input[type="url"]:focus       { border-color: var(--accent); }
input[type="url"]::placeholder { color: var(--muted); }

button[type="submit"] {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 9px 20px;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .05em;
  cursor: pointer;
  white-space: nowrap;
  transition: background .2s, transform .1s;
}

button[type="submit"]:hover  { background: var(--accent-hl); }
button[type="submit"]:active { transform: scale(.97); }

/* ── статус-бар ── */
.statusbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 6px 24px;
  font-size: 11px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 10px;
}

.statusbar.error { color: var(--error); border-bottom-color: var(--error); }

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted);
  flex-shrink: 0;
}

.statusbar:not(.error) .dot { background: #4caf7d; }
.statusbar.error .dot       { background: var(--error); }

/* ── пустой экран ── */
.empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: var(--muted);
  user-select: none;
}

.empty-icon {
  font-size: 56px;
  line-height: 1;
  opacity: .25;
}

.empty p { font-size: 13px; letter-spacing: .06em; }

/* ── iframe ── */
.frame-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
}

iframe {
  flex: 1;
  width: 100%;
  border: none;
  background: #fff;
  min-height: calc(100vh - 61px - 33px);
}