:root {
  --bg: #000000;
  --fg: #ffffff;
  --font-apple: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: var(--font-apple);
}

html, body {
  width: 100%;
  height: 100%;
  background: #000000;
  color: #ffffff;
  font-family: var(--font-apple);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
  user-select: none;
}

/* start screen: literally just whydoismile.gif centered */
#intro {
  position: fixed;
  inset: 0;
  background: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

#intro.done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

#intro-gif {
  width: 310px;
  height: 310px;
  object-fit: contain;
}

/* main workspace */
#app {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 1;
  transition: opacity 0.35s ease;
}

#app.hidden {
  opacity: 0;
  pointer-events: none;
}

/* minimal macos window matching catboys.fun */
.mac-window {
  width: 520px;
  max-width: 94vw;
  max-height: 82vh;
  background: #000000;
  border: 1.5px solid #2c2c2c;
  border-radius: 14px 11px 15px 12px / 11px 14px 12px 15px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.95), 0 0 0 1px #141414;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: width 0.25s cubic-bezier(0.16, 1, 0.3, 1), height 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.mac-window.has-code {
  width: 680px;
}

.mac-titlebar {
  height: 38px;
  background: #0a0a0a;
  border-bottom: 1px solid #1a1a1a;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 14px;
  flex-shrink: 0;
}

.mac-dots {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mac-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: none;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.mac-dot svg {
  opacity: 0;
  transition: opacity 0.12s ease;
}

.mac-dots:hover .mac-dot svg {
  opacity: 1;
}

.mac-close { background-color: #ff5f57; }
.mac-back  { background-color: #28c840; }

.mac-title {
  font-size: 12px;
  font-weight: 500;
  color: #888888;
  text-align: center;
  white-space: nowrap;
}

.bar-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
}

.bar-right[hidden] {
  display: none !important;
}

.mode-btn {
  background: #0f0f0f;
  border: 1px solid #222222;
  color: #777777;
  font-size: 11px;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.12s ease;
}

.mode-btn:hover {
  color: #ffffff;
  border-color: #383838;
}

.mode-btn.active {
  background: #ffffff;
  color: #000000;
  border-color: #ffffff;
}

.mac-content {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.drop-view {
  padding: 54px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.drop-view[hidden] {
  display: none !important;
}

.drop-view.dragover {
  background: #090909;
}

.drop-main {
  font-size: 15px;
  font-weight: 600;
  color: #f2f2f2;
  letter-spacing: -0.01em;
}

.drop-sub {
  font-size: 12.5px;
  color: #6e6e6e;
}

.drop-link {
  color: #b8b8b8;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.drop-link:hover {
  color: #ffffff;
}

.drop-sep {
  margin: 0 4px;
  color: #3d3d3d;
}

.code-view {
  flex: 1;
  padding: 18px 20px;
  overflow: auto;
  font-size: 13px;
  line-height: 1.6;
  color: #e4e4e4;
  white-space: pre-wrap;
  word-break: break-word;
  user-select: text;
}

.code-view[hidden] {
  display: none !important;
}

.tok-kw  { color: #72bcf7; font-weight: 600; }
.tok-str { color: #ebd06a; }
.tok-num { color: #e8a88a; }
.tok-cmt { color: #5c5c5c; }
.tok-fn  { color: #8fa8f5; }

.docs-view {
  flex: 1;
  padding: 18px 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  user-select: text;
}

.doc-sec {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.doc-label {
  font-size: 11.5px;
  font-weight: 600;
  color: #888888;
}

.doc-box {
  background: #080808;
  border: 1px solid #1e1e1e;
  border-radius: 7px;
  padding: 8px 12px;
  font-size: 12.5px;
  color: #eeeeee;
}

.doc-note {
  font-size: 12px;
  color: #777777;
  line-height: 1.45;
}

.doc-pre {
  background: #080808;
  border: 1px solid #1c1c1c;
  border-radius: 8px;
  padding: 11px 13px;
  font-size: 12.5px;
  line-height: 1.55;
  color: #e4e4e4;
  white-space: pre-wrap;
  word-break: break-word;
}
