/* ===== WINDOW SYSTEM ===== */
.win {
  position: fixed;
  background: #12121f;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.7), 0 0 0 1px rgba(255,255,255,0.05);
  display: flex; flex-direction: column;
  overflow: hidden;
  min-width: 320px; min-height: 200px;
  z-index: 100;
  transition: box-shadow 0.2s;
}
.win.focused { box-shadow: 0 20px 60px rgba(0,0,0,0.9), 0 0 0 1px rgba(233,69,96,0.3); z-index: 200; }
.win.minimized { display: none; }

.win-titlebar {
  height: 36px;
  background: rgba(255,255,255,0.04);
  border-bottom: 1px solid rgba(255,255,255,0.07);
  display: flex; align-items: center;
  padding: 0 12px;
  cursor: move;
  gap: 8px;
  flex-shrink: 0;
}
.win-icon { font-size: 16px; }
.win-title { flex: 1; font-size: 13px; color: var(--text-dim); }
.win-btn {
  width: 14px; height: 14px;
  border-radius: 50%;
  cursor: pointer;
  border: none;
  transition: opacity 0.15s;
}
.win-btn:hover { opacity: 0.8; }
.win-close    { background: #ff5f57; }
.win-minimize { background: #ffbd2e; }
.win-maximize { background: #28c840; }

.win-body {
  flex: 1;
  overflow: hidden;
  position: relative;
}
.win-body iframe {
  width: 100%; height: 100%;
  border: none;
  display: block;
}

/* ===== APP SHELLS ===== */
.app-shell {
  width: 100%; height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
}

/* scrollbar */
.app-shell::-webkit-scrollbar { width: 6px; }
.app-shell::-webkit-scrollbar-track { background: transparent; }
.app-shell::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }

/* ===== CLUE PANEL ===== */
#clue-panel {
  position: fixed;
  right: 0; top: 0;
  width: 320px;
  height: calc(100vh - var(--taskbar-h));
  background: rgba(10,10,22,0.97);
  border-left: 1px solid rgba(255,255,255,0.08);
  z-index: 500;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  display: flex; flex-direction: column;
}
#clue-panel.open { transform: translateX(0); }

.clue-header {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: space-between;
}
.clue-header h3 { font-size: 15px; color: #fff; }
.clue-close-btn { cursor: pointer; font-size: 18px; color: var(--text-dim); }
.clue-close-btn:hover { color: #fff; }

.clue-list {
  flex: 1; overflow-y: auto;
  padding: 12px 16px;
  display: flex; flex-direction: column; gap: 10px;
}
.clue-item {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  padding: 10px 14px;
}
.clue-item-title { font-size: 13px; font-weight: bold; color: var(--highlight); margin-bottom: 4px; }
.clue-item-body { font-size: 12px; color: var(--text-dim); line-height: 1.6; }
.clue-item-tag {
  display: inline-block;
  margin-top: 6px;
  padding: 2px 8px;
  background: rgba(233,69,96,0.15);
  border-radius: 12px;
  font-size: 11px;
  color: var(--highlight);
}

/* ===== LOADING SCREEN ===== */
#loading-screen {
  position: fixed; inset: 0;
  background: #000;
  z-index: 99999;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 24px;
}
.loading-logo {
  font-size: 28px; letter-spacing: 6px;
  color: #fff;
  animation: flicker 2s infinite;
}
.loading-sub { color: #555; font-size: 13px; letter-spacing: 2px; }
.loading-bar-outer {
  width: 280px; height: 2px;
  background: #111;
  border-radius: 2px;
  overflow: hidden;
}
.loading-bar-inner {
  height: 100%;
  background: var(--highlight);
  width: 0%;
  transition: width 0.1s linear;
  border-radius: 2px;
}
.loading-text { color: #333; font-size: 11px; font-family: monospace; min-height: 16px; }

@keyframes flicker {
  0%,100% { opacity: 1; }
  92% { opacity: 1; }
  93% { opacity: 0.3; }
  94% { opacity: 1; }
  96% { opacity: 0.5; }
  97% { opacity: 1; }
}

/* ===== GHOST PAGE ===== */
.ghost-page {
  background: #000; color: #0f0;
  font-family: 'Courier New', monospace;
  padding: 30px;
  min-height: 100%;
  line-height: 2;
  font-size: 14px;
}
.ghost-page .log-entry { margin-bottom: 8px; }
.ghost-page .log-date { color: #555; }

/* ===== TRUTH PAGE ===== */
.truth-page {
  background: #000; color: #eee;
  font-family: 'Courier New', monospace;
  min-height: 100%;
  display: flex; flex-direction: column; align-items: center;
  padding: 40px 20px;
}
.truth-scroll {
  max-width: 500px; width: 100%;
  font-size: 13px; line-height: 2.4;
  text-align: center;
  animation: scrollup 60s linear;
  color: #bbb;
}
.truth-scroll .name-item { padding: 4px 0; border-bottom: 1px solid #111; }
.truth-scroll .final-name { color: #e94560; font-weight: bold; font-size: 16px; }

.truth-input-area {
  margin-top: 40px; width: 100%; max-width: 500px;
  display: flex; flex-direction: column; gap: 12px;
}
.truth-question { text-align: center; font-size: 16px; color: #ccc; letter-spacing: 1px; }
.truth-input-area textarea {
  background: #0a0a0a; border: 1px solid #333;
  border-radius: 6px; color: #fff; font-family: inherit;
  font-size: 14px; padding: 12px; resize: vertical;
  min-height: 80px;
}
.truth-input-area button {
  padding: 10px 28px; background: var(--highlight);
  border: none; border-radius: 6px; color: #fff;
  font-size: 14px; cursor: pointer; align-self: center;
}

.ai-response-box {
  margin-top: 24px; padding: 20px;
  border: 1px solid #333; border-radius: 8px;
  font-size: 13px; line-height: 1.8;
  color: #ccc; max-width: 500px; width: 100%;
}
.ai-score { font-size: 32px; font-weight: bold; color: var(--highlight); text-align: center; margin-bottom: 12px; }
.ai-thinking { color: #555; font-size: 12px; animation: pulse 1s infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.3} }
@keyframes scrollup { 0%{transform:translateY(0)} 100%{transform:translateY(-80%)} }
