:root {
  --bg: #0f1116;
  --panel: #161a22;
  --panel-2: #1d2433;
  --text: #e6e9ef;
  --muted: #9aa3b2;
  --accent: #4aa3ff;
  --border: #2a3242;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Georgia", "Times New Roman", serif;
  background:
    radial-gradient(circle at top, rgba(66, 84, 118, 0.25), transparent 55%),
    linear-gradient(180deg, #0b0d12 0%, var(--bg) 100%);
  color: var(--text);
}

.page {
  min-height: 100vh;
}

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 56px;
  display: flex;
  align-items: center;
  padding: 0 24px;
  background: rgba(12, 14, 19, 0.65);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);
  z-index: 20;
}

.brand-name {
  font-size: 18px;
  letter-spacing: 0.6px;
  font-weight: 600;
}

.viewer {
  position: relative;
  width: 100vw;
  height: 100vh;
  display: grid;
  place-items: center;
  padding: 0;
}

.image-frame {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
}

.image-frame img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.image-name {
  position: absolute;
  left: 22px;
  bottom: 20px;
  padding: 6px 12px;
  background: rgba(12, 14, 19, 0.7);
  border: 1px solid rgba(42, 50, 66, 0.7);
  border-radius: 10px;
  font-size: 12px;
}

.controls {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: 25vw;
  max-width: 90vw;
  background: var(--panel);
  border-left: 1px solid var(--border);
  box-shadow: -12px 0 24px rgba(0, 0, 0, 0.25);
  transform: translateX(100%);
  transition: transform 0.25s ease;
  z-index: 30;
}

.controls.open {
  transform: translateX(0);
}

.controls-toggle {
  position: absolute;
  left: -36px;
  top: 120px;
  width: 36px;
  height: 56px;
  border-radius: 12px 0 0 12px;
  border: 1px solid var(--border);
  border-right: none;
  background: var(--panel-2);
  color: var(--text);
  cursor: pointer;
}

.controls-body {
  padding: 20px 32px 20px 20px;
  display: grid;
  gap: 16px;
}

.controls-body h2 {
  margin: 0;
  font-size: 18px;
}

label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}

input[type="number"] {
  width: 100%;
  padding: 10px 12px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-family: inherit;
}

.button-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

button {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: none;
  background: var(--accent);
  color: #0b0d12;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

button.secondary {
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--border);
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.status {
  font-size: 12px;
  color: var(--muted);
}

@media (max-width: 720px) {
  .controls {
    width: 240px;
  }

  .controls-toggle {
    top: 90px;
  }
}
