/* Zrenderer Studio — Dark Sci-Fi HUD theme */

:root {
  --bg-deep: #07090a;
  --bg-charcoal: #0a0c0d;
  --glass: rgba(90, 140, 140, 0.16);
  --glass-strong: rgba(100, 150, 150, 0.28);
  --glass-border: rgba(118, 200, 200, 0.35);
  --teal: #76c8c8;
  --teal-dim: rgba(118, 200, 200, 0.55);
  --teal-glow: rgba(118, 200, 200, 0.45);
  --amber: #ffbf00;
  --amber-hot: #f2b705;
  --text: #f2f5f5;
  --text-muted: #a8b8b8;
  --danger: #ff6b6b;
  --radius: 2px;
  --font: "Exo 2", "Segoe UI", sans-serif;
  --grid-line: rgba(118, 200, 200, 0.06);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font);
  color: var(--text);
  background: radial-gradient(ellipse at 30% 20%, #12181a 0%, var(--bg-charcoal) 45%, var(--bg-deep) 100%);
  line-height: 1.45;
}

body.page-login,
body.page-studio {
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

/* Technical grid backdrop */
.hud-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at center, black 20%, transparent 75%);
}

.glass-panel {
  position: relative;
  z-index: 1;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.35) inset,
    0 0 24px rgba(0, 0, 0, 0.35);
}

.hud-eyebrow,
.hud-section-label,
.hud-label {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 400;
  font-size: 0.68rem;
  color: var(--teal);
  text-shadow: 0 0 10px var(--teal-glow);
}

.hud-section-label {
  margin-bottom: 0.85rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid rgba(118, 200, 200, 0.25);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 2.4rem;
  padding: 0.55rem 1.25rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.btn--primary {
  background: var(--amber);
  color: #141414;
  border-color: var(--amber-hot);
  box-shadow: 0 0 18px rgba(255, 191, 0, 0.35);
}

.btn--primary:hover,
.btn--primary:focus-visible {
  background: #ffd24d;
  box-shadow: 0 0 28px rgba(255, 191, 0, 0.55);
  outline: none;
}

.btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--glass-border);
}

.btn--ghost:hover,
.btn--ghost:focus-visible {
  background: var(--glass-strong);
  border-color: var(--teal);
  outline: none;
}

/* Form fields */
.hud-field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-bottom: 1rem;
}

.hud-input {
  width: 100%;
  min-height: 2.6rem;
  padding: 0.55rem 0.75rem;
  color: var(--text);
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(118, 200, 200, 0.3);
  border-radius: var(--radius);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.hud-input:focus {
  border-color: var(--amber);
  box-shadow: 0 0 0 1px rgba(255, 191, 0, 0.35), 0 0 16px rgba(255, 191, 0, 0.2);
}

.hud-alert {
  margin: 0 0 1rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid rgba(255, 107, 107, 0.45);
  background: rgba(255, 107, 107, 0.12);
  color: #ffd0d0;
  font-size: 0.88rem;
}

/* Login */
.login-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
}

.login-panel {
  width: min(420px, 100%);
  padding: 1.75rem 1.6rem 1.5rem;
  animation: panel-in 0.45s ease-out;
}

.login-panel__header {
  margin-bottom: 1.35rem;
}

.login-panel__title {
  margin: 0.55rem 0 0.35rem;
  font-size: clamp(1.45rem, 3vw, 1.85rem);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.login-panel__subtitle {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.login-panel__actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.5rem;
}

@keyframes panel-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Studio shell */
.studio-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 220px;
  grid-template-rows: auto 1fr;
  gap: 0.85rem;
  padding: 0.85rem;
}

.studio-topbar {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.1rem;
}

.studio-topbar__title {
  margin: 0.25rem 0 0;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.studio-topbar__meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.studio-user {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.35rem 0.65rem;
  border: 1px solid rgba(118, 200, 200, 0.25);
  background: rgba(0, 0, 0, 0.25);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.studio-user__level {
  color: var(--amber);
  font-weight: 600;
  font-size: 0.72rem;
}

.studio-nav,
.studio-side,
.studio-workspace {
  padding: 1rem;
  min-height: 0;
}

.studio-nav__list,
.side-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.nav-item,
.side-item {
  width: 100%;
  text-align: left;
  padding: 0.7rem 0.8rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.2);
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.nav-item:hover,
.side-item:hover {
  border-color: var(--glass-border);
  background: var(--glass-strong);
}

.nav-item.is-active,
.side-item.is-active {
  background: var(--amber);
  color: #141414;
  border-color: var(--amber-hot);
  box-shadow: 0 0 16px rgba(255, 191, 0, 0.35);
  font-weight: 700;
}

.side-hint {
  margin: 1rem 0 0;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.workspace-panel__header {
  margin-bottom: 1.1rem;
}

.workspace-panel__title {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal);
  text-shadow: 0 0 12px var(--teal-glow);
}

.workspace-panel__desc {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  max-width: 52ch;
}

.workspace-placeholder {
  display: grid;
  gap: 1rem;
}

.workspace-placeholder--empty {
  min-height: 220px;
  place-items: center;
  border: 1px dashed rgba(118, 200, 200, 0.3);
  background: rgba(0, 0, 0, 0.22);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
}

.preview-frame {
  position: relative;
  min-height: 280px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(118, 200, 200, 0.3);
  background:
    linear-gradient(rgba(118, 200, 200, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(118, 200, 200, 0.04) 1px, transparent 1px),
    rgba(0, 0, 0, 0.35);
  background-size: 24px 24px, 24px 24px, auto;
}

.preview-frame__crosshair {
  position: absolute;
  top: 0.75rem;
  right: 0.9rem;
  color: var(--text);
  font-size: 1.1rem;
  opacity: 0.7;
}

.preview-frame__label {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.75rem;
  color: var(--teal-dim);
}

.url-slot {
  padding: 0.9rem 1rem;
  border: 1px solid rgba(118, 200, 200, 0.25);
  background: rgba(0, 0, 0, 0.28);
}

.url-slot.is-disabled {
  opacity: 0.72;
}

.url-slot__value {
  margin: 0.45rem 0 0;
  color: var(--text-muted);
  font-size: 0.88rem;
}

@media (max-width: 960px) {
  .studio-shell {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto auto;
  }

  .studio-topbar {
    flex-wrap: wrap;
  }

  .studio-nav__list {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .nav-item {
    width: auto;
    flex: 1 1 auto;
  }

  .side-list {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .side-item {
    width: auto;
  }
}
