* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  background: #f4f4f4;
  min-height: 100vh;
  overflow: hidden;
}

.fd-page {
  padding: 24px;
  max-width: 640px;
  margin: 0 auto;
  transition: filter 0.3s;
}

.fd-page.is-frozen { filter: blur(2px) grayscale(0.6); pointer-events: none; }

.fd-site {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 24px;
}

.fd-article h1 { font-size: 1.5rem; color: #222; margin-bottom: 8px; }
.fd-article p { color: #555; }

.fd-corrupt { position: fixed; pointer-events: none; opacity: 0.85; }
.fd-corrupt--mirror {
  inset: 0;
  background: radial-gradient(circle at 70% 30%, rgba(80,0,0,0.15), transparent 50%);
}
.fd-corrupt--text {
  bottom: 12%;
  left: 8%;
  font-family: 'Courier New', monospace;
  font-size: 0.75rem;
  color: #800;
  text-transform: lowercase;
  animation: fd-flicker 2s infinite;
}
#fd-corrupt-watcher {
  top: 18%;
  right: 12%;
  font-size: 2rem;
  animation: fd-blink 3s infinite;
}

@keyframes fd-flicker {
  0%, 100% { opacity: 0.2; }
  50% { opacity: 0.9; }
}
@keyframes fd-blink {
  0%, 90%, 100% { opacity: 0; }
  95% { opacity: 1; }
}

.fd-freeze {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
}

.fd-freeze[hidden] { display: none !important; }

.fd-dialog {
  background: #fff;
  border-radius: 8px;
  padding: 28px 32px;
  max-width: 400px;
  text-align: center;
  box-shadow: 0 8px 40px rgba(0,0,0,0.35);
}

.fd-dialog-icon { font-size: 2rem; color: #e8a000; margin-bottom: 8px; }
.fd-dialog h2 { font-size: 1.1rem; font-weight: 600; margin-bottom: 8px; }
.fd-dialog p { font-size: 0.88rem; color: #444; line-height: 1.45; }

.fd-dialog-btns {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin: 20px 0 12px;
}

.fd-btn {
  padding: 8px 20px;
  font-size: 0.85rem;
  border-radius: 4px;
  border: 1px solid #ccc;
  background: #f0f0f0;
  color: #999;
  cursor: not-allowed;
}

.fd-dialog-hint {
  font-size: 0.72rem !important;
  color: #888 !important;
  font-style: italic;
}

.fd-inspect-trigger {
  position: fixed;
  bottom: 12px;
  right: 12px;
  z-index: 60;
  padding: 6px 12px;
  font-size: 0.7rem;
  font-family: 'Courier New', monospace;
  background: #1e1e1e;
  color: #9cdcfe;
  border: 1px solid #444;
  cursor: pointer;
  opacity: 0.35;
  transition: opacity 0.2s;
}

.fd-inspect-trigger:hover { opacity: 1; }

.fd-devtools {
  position: fixed;
  inset: 8% 4% 4%;
  z-index: 80;
  background: #1e1e1e;
  color: #d4d4d4;
  border: 1px solid #333;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 0.8rem;
}

.fd-devtools[hidden] { display: none !important; }

.fd-devtools-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: #252526;
  border-bottom: 1px solid #333;
}

.fd-devtools-title { color: #ccc; font-size: 0.75rem; }

#fd-devtools-close {
  background: none;
  border: none;
  color: #888;
  cursor: pointer;
  font-size: 1rem;
}

.fd-devtools-hint {
  padding: 8px 12px;
  font-size: 0.72rem;
  color: #888;
  border-bottom: 1px solid #333;
}

.fd-devtools-hint code { color: #ce9178; }

.fd-source {
  flex: 1;
  margin: 0;
  padding: 12px;
  background: #1e1e1e;
  color: #d4d4d4;
  border: none;
  resize: none;
  font-family: inherit;
  font-size: 0.78rem;
  line-height: 1.5;
  tab-size: 2;
}

.fd-devtools-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-top: 1px solid #333;
}

.fd-corrupt-count { font-size: 0.72rem; color: #f48771; }

#fd-save {
  padding: 8px 16px;
  background: #0e639c;
  color: #fff;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  font-family: inherit;
}

.fd-devtools-msg {
  padding: 0 12px 10px;
  font-size: 0.72rem;
  min-height: 1.2em;
  color: #f48771;
}

.fd-win {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0,0,0,0.9);
  color: #c8a84b;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-family: 'Courier New', monospace;
}

.fd-win[hidden] { display: none !important; }
.fd-win h2 { color: #6a6; font-size: 1.4rem; }
.fd-win button, .fd-win a { color: #c8a84b; font-family: inherit; }
