/* Global Font Defaults */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Noto Sans Emoji", "Segoe UI Emoji";
}

/* Monospace Fonts */
code, pre, kbd, textarea, .terminal-block, .code-inline-box, .share-link-box {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

/* Button Normalization */
.primary-btn, .secondary-btn, .danger-btn {
  display: inline-block;
  text-decoration: none;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  text-align: center;
  border: 1px solid transparent;
  font-family: inherit;
  box-sizing: border-box;
}

.primary-btn {    
  background: #24292e; color: #fff; border-color: #24292e;
  padding: 8px 16px; font-size: 0.95rem;
}
.primary-btn:hover { background: #1b1f23; border-color: #1b1f23; }

.secondary-btn {
  background: #eee; color: #333; border-color: #ccc;
  padding: 6px 12px; font-size: 0.85rem;
}
.secondary-btn:hover { background: #e0e0e0; border-color: #bbb; }

.danger-btn {
  background: #ff4444; color: #fff; border-color: #ff4444;
  padding: 6px 12px; font-size: 0.85rem; width: 85px; flex-shrink: 0;
}
.danger-btn:hover { background: #cc0000; border-color: #cc0000; }
/* Text replacement jitter prevention */
.copy-token-btn, #copy-btn {
  width: 90px;
  flex-shrink: 0;
}

/* Global Layout & Core Selectors */
body {
  margin: 0; padding: 0; background-color: transparent;
}
#root { line-height: 1.5; padding: 1rem; max-width: 1200px; margin: 0 auto; color: #333; background-color: #fff; min-height: 100vh; box-sizing: border-box; }
h1 { margin-top: 0; }
textarea, input, select { width: 100%; box-sizing: border-box; padding: 0.5rem; margin-bottom: 1rem; }
textarea { font-size: 0.95rem; resize: none; }
button { font-family: inherit; font-size: 1rem; background: #000; color: #fff; border: none; padding: 0.5rem 1rem; cursor: pointer; border-radius: 4px;}
button:hover { background: #444; }
pre { background: #f4f4f4; padding: 1rem; overflow-x: auto; border-radius: 4px; font-size: 0.9rem; }
.card { border: 1px solid #ddd; padding: 1rem; margin-bottom: 1rem; border-radius: 4px;}

/* Interaction States */
.blur-hover:hover { filter: none !important; }

/* Media Queries */
@media (max-width: 768px) {
  .hide-on-mobile { display: none !important; }
}

@media (prefers-color-scheme: dark) {
  html { background-color: #000; }
  #root { filter: invert(1) hue-rotate(180deg); }
  .terminal-block, img, video, iframe { filter: invert(1) hue-rotate(180deg); }
}

/* Card Headers */
.card-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.card-header-left {
  display: flex;
  flex-direction: row;
  align-items: center;
  flex-wrap: nowrap;
  gap: 12px;
}
.card-note-form { margin: 0; flex: 1 1 500px; max-width: 100%; min-width: 80px; }
.card-note-input {
  color: #333; font-size: 1rem; font-weight: bold;
  background: #fff; border: 1px solid #ccc;
  border-radius: 4px; padding: 4px 8px;
  margin: 0; font-family: inherit; width: 100%; box-sizing: border-box;
}
.card-note-title { margin: 0; color: #333; font-size: 1.1rem; }
.card-meta-row { display: flex; align-items: center; gap: 10px; }
.badge {
  padding: 2px 8px; border-radius: 12px;
  font-size: 0.8rem; font-weight: bold;
  white-space: nowrap; flex-shrink: 0;
}
.badge-public { color: #155724; background-color: #d4edda; border: 1px solid #c3e6cb; }
.badge-private { color: #721c24; background-color: #f8d7da; border: 1px solid #f5c6cb; }

/* Timeline Footers */
.terminal-container { margin-top: 1rem; }
.card-time-wrapper { margin-top: 12px; text-align: right; }
.card-time { color: #888; font-size: 0.85rem; }

/* Forms & Spacing */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}
.form-label-title {
  font-size: 1rem;
  color: #333;
  margin: 0;
}
.form-textarea {
  margin: 0;
}
.form-checkbox-group {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  margin-bottom: 24px;
}
