* {
  box-sizing: border-box;
}
body,
html {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family:
    system-ui,
    -apple-system,
    sans-serif;
  display: flex;
  flex-direction: column;
  background: #09090b; /* Match Uvilno dark-first theme */
}

#toolbar {
  height: 48px;
  background: #18181b;
  border-bottom: 1px solid #27272a;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  flex-shrink: 0;
}

.toolbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-icon {
  width: 20px;
  height: 20px;
  color: #fff;
}

.watermark {
  font-size: 13px;
  font-weight: 500;
  opacity: 0.8;
  letter-spacing: -0.01em;
  font-family: "JetBrains Mono", monospace; /* Match Uvilno brand */
}

.toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

button {
  background: transparent;
  border: 1px solid transparent;
  color: #a1a1aa;
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

button:hover {
  color: #fff;
  background: #27272a;
}

#iframe-container {
  flex-grow: 1;
  position: relative;
  background: #09090b;
  display: flex;
  align-items: center;
  justify-content: center;
}

#preview-iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  background: #ffffff;
}

@media (max-width: 640px) {
  #toolbar {
    height: 36px;
    padding: 0 10px;
  }
  .watermark {
    font-size: 11px;
  }
  .brand-icon {
    width: 15px;
    height: 15px;
  }
  button {
    padding: 4px;
  }
}

#toolbar.collapsed {
  display: none;
}

#btn-expand-toolbar {
  display: none;
  position: fixed;
  top: 8px;
  right: 8px;
  z-index: 9999;
  background: rgba(24, 24, 27, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid #3f3f46;
  color: #e4e4e7;
  padding: 6px;
  border-radius: 9999px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

body.toolbar-hidden #btn-expand-toolbar {
  display: flex;
}

body.desktop-simulator #toolbar,
body.desktop-simulator #btn-expand-toolbar {
  display: none;
}

.preview-empty {
  margin: auto;
  color: #a1a1aa;
  font:
    13px/1.8 system-ui,
    sans-serif;
  padding: 24px;
}
.preview-status {
  box-sizing: border-box;
  margin: auto;
  padding: 32px;
  max-width: 440px;
  color: #ededee;
  font-family: system-ui, sans-serif;
}
.preview-status small {
  color: #c8ed8a;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.preview-status h1 {
  font-size: 26px;
  letter-spacing: -0.04em;
  font-weight: 500;
  line-height: 1.3;
  margin: 15px 0 12px;
}
.preview-status p {
  color: #a1a1aa;
  font-size: 13px;
  line-height: 1.8;
  margin: 0;
}
.preview-status:not(.is-error)::after {
  content: "";
  display: block;
  width: 60px;
  height: 2px;
  margin-top: 24px;
  background: #c8ed8a;
  animation: preview-pulse 1.5s ease-in-out infinite;
}
@keyframes preview-pulse {
  50% {
    opacity: 0.3;
    transform: scaleX(0.7);
  }
}
@media (prefers-reduced-motion: reduce) {
  .preview-status::after {
    animation: none !important;
  }
}
