*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: #008080;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 13px;
}

.ff-window {
  display: flex;
  flex-direction: column;
  max-width: 720px;
  height: 100%;
  margin: 0 auto;
  background: #f0f0f0;
  border: 1px solid #888;
  box-shadow: 2px 2px 8px rgba(0,0,0,0.3);
}

.ff-titlebar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 10px;
  background: linear-gradient(180deg, #fff 0%, #ddd 100%);
  border-bottom: 1px solid #aaa;
}

.ff-title { font-weight: 600; }

.ff-exit {
  color: #333;
  text-decoration: none;
  padding: 2px 8px;
}

.ff-toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 6px 8px;
  background: #e8e8e8;
  border-bottom: 1px solid #ccc;
}

.ff-toolbar button {
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
}

.ff-toolbar button:disabled { opacity: 0.4; cursor: default; }

.ff-path {
  flex: 1;
  padding: 4px 8px;
  background: #fff;
  border: 1px solid #aaa;
  font-family: Consolas, monospace;
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ff-list {
  flex: 1;
  list-style: none;
  margin: 0;
  padding: 4px;
  overflow-y: auto;
  min-height: 200px;
}

.ff-list.dark { background: #111; }

.ff-list.dark .ff-item {
  color: #333;
  background: #1a1a1a;
}

.ff-list.dark .ff-item:hover,
.ff-list.dark .ff-item:focus {
  color: #ccc;
  background: #222;
}

.ff-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  cursor: pointer;
  border-radius: 2px;
}

.ff-item:hover { background: #cce8ff; }

.ff-item.locked { opacity: 0.7; }

.ff-item.corrupted { color: #800; font-weight: 600; }

.ff-icon { font-size: 16px; }

.ff-preview {
  max-height: 120px;
  overflow: auto;
  padding: 8px;
  background: #fff;
  border-top: 1px solid #ccc;
}

.ff-preview pre {
  margin: 0;
  font-family: Consolas, monospace;
  font-size: 11px;
  white-space: pre-wrap;
}

.ff-statusbar {
  padding: 4px 10px;
  background: #0078d7;
  color: #fff;
  font-size: 11px;
  font-family: Consolas, monospace;
  transition: background 0.3s;
}

.ff-statusbar.creepy { background: #400; }

.ff-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.ff-overlay[hidden] { display: none; }

.ff-overlay--dark {
  background: #000;
  flex-direction: column;
  gap: 20px;
}

.ff-dialog {
  background: #f0f0f0;
  padding: 24px;
  border: 2px solid #888;
  min-width: 280px;
  text-align: center;
}

.ff-dialog h2 { margin: 0 0 12px; font-size: 16px; }

.ff-dialog input {
  width: 100%;
  padding: 8px;
  margin-bottom: 12px;
  font-family: Consolas, monospace;
}

.ff-dialog-btns { display: flex; gap: 8px; justify-content: center; }

.ff-corrupt-msg {
  color: #f44;
  font-family: Consolas, monospace;
  letter-spacing: 0.1em;
  text-align: center;
}

.ff-corrupt-timer {
  font-size: 48px;
  color: #fff;
  font-family: Consolas, monospace;
}
