:root {
  --glass: rgba(10, 10, 20, 0.7);
  --glass-strong: rgba(15, 15, 30, 0.9);
  --shadow: 0 0 20px rgba(0, 255, 200, 0.6);
  --text: #e0e0ff;
  --accent: #ff00ff; /* neon magenta */
  --accent2: #00ffe0; /* neon cyan */
}

body {
  margin: 0;
  font-family: 'Segoe UI', sans-serif;
  background-image: url("/static/wallpaper.jpg");
  background-position: center center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-size: cover;
  color: var(--text);
}

/* --- Neon Glow Animations --- */
@keyframes pulse {
  0% { text-shadow: 0 0 5px var(--accent2), 0 0 10px var(--accent2); }
  50% { text-shadow: 0 0 15px var(--accent2), 0 0 30px var(--accent); }
  100% { text-shadow: 0 0 5px var(--accent2), 0 0 10px var(--accent2); }
}

@keyframes glow {
  0% { box-shadow: 0 0 8px var(--accent2); }
  50% { box-shadow: 0 0 20px var(--accent); }
  100% { box-shadow: 0 0 8px var(--accent2); }
}

/* Menubar */
.menubar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 34px;
  background: var(--glass);
  display: flex; align-items: center;
  padding: 0 12px;
  backdrop-filter: blur(12px);
  box-shadow: 0 0 15px var(--accent2);
}
.menubar .brand {
  font-weight: bold;
  margin-right: 20px;
  color: var(--accent);
  text-shadow: 0 0 10px var(--accent);
  animation: pulse 3s infinite;
}
.menubar nav a {
  margin-right: 12px;
  text-decoration: none;
  color: var(--text);
  font-size: 14px;
  transition: 0.2s;
}
.menubar nav a:hover {
  color: var(--accent2);
  text-shadow: 0 0 8px var(--accent2);
}
.menubar .right {
  margin-left: auto;
  font-size: 14px;
  color: var(--accent2);
}

/* Desktop icons */
.desktop {
  margin-top: 60px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 20px;
}
.icon {
  width: 90px;
  text-align: center;
  cursor: pointer;
}
.glyph {
  font-size: 42px;
  color: var(--accent2);
  text-shadow: 0 0 10px var(--accent2);
  animation: pulse 4s infinite;
}
.label {
  font-size: 13px;
  margin-top: 5px;
  background: var(--glass-strong);
  padding: 3px 6px;
  border-radius: 6px;
  color: var(--accent2);
  text-shadow: 0 0 8px var(--accent2);
}

/* Window */
.window {
  position: absolute;
  top: 100px; left: 150px;
  width: 420px; height: 300px;
  background: var(--glass-strong);
  border-radius: 12px;
  box-shadow: 0 0 25px var(--accent);
  color: var(--text);
  animation: glow 5s infinite;
}
.hidden { display: none; }

.titlebar {
  background: var(--glass);
  height: 28px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 8px;
  cursor: grab;
  border-bottom: 1px solid var(--accent2);
}
.btn { width: 12px; height: 12px; border-radius: 50%; }
.btn-close { background: #ff0040; box-shadow: 0 0 5px #ff0040; }
.btn-min { background: #ffaa00; box-shadow: 0 0 5px #ffaa00; }
.btn-full { background: #00ff80; box-shadow: 0 0 5px #00ff80; }
.title { font-weight: bold; margin-left: 10px; color: var(--accent2); }
.content { padding: 12px; }

/* Dock */
.dock {
  position: fixed;
  bottom: 15px; left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
  background: var(--glass);
  padding: 8px 18px;
  border-radius: 24px;
  backdrop-filter: blur(12px);
  box-shadow: 0 0 20px var(--accent);
}
.dock-item {
  font-size: 22px;
  cursor: pointer;
  background: var(--glass-strong);
  padding: 8px;
  border-radius: 12px;
  color: var(--accent2);
  transition: 0.3s;
}
.dock-item:hover {
  background: var(--accent);
  color: #fff;
  text-shadow: 0 0 10px #fff;
  transform: translateY(-5px) scale(1.2);
}
/* Finder window layout */
.finder {
  display: flex;
  height: calc(100% - 28px);
}

/* Sidebar */
.sidebar {
  width: 180px;
  background: var(--glass);
  padding: 10px;
  border-right: 1px solid var(--accent2);
  color: var(--text);
}
.sidebar h4 {
  font-size: 12px;
  margin-bottom: 8px;
  color: var(--accent);
}
.sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.sidebar li {
  margin: 6px 0;
  cursor: pointer;
  opacity: 0.8;
}
.sidebar li:hover {
  color: var(--accent2);
  opacity: 1;
}

/* File List */
.file-list {
  flex: 1;
  padding: 10px;
  overflow-y: auto;
}
.file-list .header {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  font-weight: bold;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--accent2);
}
.file-list .row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  cursor: pointer;
}
.file-list .row:hover {
  background: var(--glass);
}
/* --- Viewer polish --- */
.window.modal{
  width: 820px;
  height: 520px;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);   /* centers by default */
  background: var(--glass-strong);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,.55), 0 0 24px var(--accent);
  border: 1px solid rgba(255,255,255,0.08);
}

.window .content{
  height: calc(100% - 28px);          /* titlebar height */
  overflow: auto;
  padding: 14px;
}

.video-wrap{
  position: relative;
  width: 100%;
  max-width: 100%;
  padding-top: 56.25%;                 /* 16:9 responsive */
  border-radius: 12px;
  overflow: hidden;
  background:#000;
  box-shadow: 0 6px 24px rgba(0,0,0,.45);
  margin-bottom: 12px;
}
.video-wrap iframe{
  position: absolute; inset: 0;
  width: 100%; height: 100%;
}

.doc-desc{ line-height: 1.6; opacity: .92; margin-bottom: 10px; }
.doc-actions{ display: flex; gap: 12px; }

/* Keep theories window tidy on small screens */
#theories-window{ width: 720px; height: 420px; }
.file-list{ font-size: 14px; }
.file-list .row{ align-items: center; }
.file-list .row span:nth-child(2), .file-list .row span:nth-child(3){ opacity:.85; font-size: 12px; }

/* Remove any outlines that may show as bright borders */
*:focus{ outline: none; }
.doc-body {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text, #eee);
  overflow-y: auto;
  max-height: calc(100% - 28px);
}

.doc-body h2 {
  margin-top: 0;
  color: var(--accent, #0ff);
}

.doc-body .disclaimer {
  background: rgba(255, 200, 0, 0.1);
  border-left: 4px solid #ffcc00;
  padding: 8px 10px;
  margin: 12px 0;
  font-size: 13px;
  color: #ffcc00;
}
/* ---------- Documentary Viewer Styles ---------- */
.doc-body {
  font-size: 15px;
  line-height: 1.7;
  color: #f5f5f5;
  overflow-y: auto;
  max-height: 100%;
  padding-right: 8px;
}

.doc-body h2 {
  margin-top: 0;
  margin-bottom: 12px;
  font-size: 22px;
  font-weight: bold;
  color: #00e5ff; /* accent color */
  border-bottom: 1px solid rgba(255,255,255,0.1);
  padding-bottom: 6px;
}

.doc-body p {
  margin: 10px 0;
}

.doc-body strong {
  color: #ffcc00;
}

.doc-body .disclaimer {
  background: rgba(255, 200, 0, 0.1);
  border-left: 4px solid #ffcc00;
  padding: 10px 12px;
  margin: 14px 0;
  font-size: 13px;
  line-height: 1.5;
  color: #ffcc00;
  border-radius: 4px;
}

/* Scrollbar for the doc window */
.doc-body::-webkit-scrollbar {
  width: 8px;
}
.doc-body::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.05);
}
.doc-body::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.3);
  border-radius: 4px;
}
.doc-body::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,0.5);
}
/* ---------- Paper-like Document Style ---------- */
.doc-body {
  background: rgba(255,255,255,0.05);
  padding: 24px 32px;
  margin: 10px auto;
  max-width: 640px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.35);
  color: #f8f8f8;
  font-size: 15px;
  line-height: 1.75;
}

/* Page title */
.doc-body h2 {
  font-size: 24px;
  font-weight: 700;
  color: #00e5ff;
  margin-top: 0;
  margin-bottom: 16px;
  border-bottom: 2px solid rgba(255,255,255,0.1);
  padding-bottom: 8px;
  letter-spacing: 0.5px;
}

/* Paragraphs */
.doc-body p {
  margin: 14px 0;
  text-align: justify;
}

/* Strong emphasis */
.doc-body strong {
  color: #ffcc00;
}

/* Disclaimer callout */
.doc-body .disclaimer {
  background: rgba(255, 200, 0, 0.08);
  border-left: 5px solid #ffcc00;
  padding: 12px 14px;
  margin: 20px 0;
  font-size: 14px;
  line-height: 1.5;
  color: #ffcc66;
  border-radius: 6px;
  box-shadow: inset 0 0 6px rgba(255, 200, 0, 0.2);
}

/* Scrollbar for long docs */
.doc-body::-webkit-scrollbar {
  width: 10px;
}
.doc-body::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.05);
  border-radius: 10px;
}
.doc-body::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #00e5ff, #0066ff);
  border-radius: 10px;
}
.doc-body::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #33eeff, #3399ff);
}
#ca-box {
  position: absolute;
  top: 15%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.7);
  padding: 20px 40px;
  border-radius: 12px;
  text-align: center;
  color: #0ff;
  font-size: 22px;
  font-weight: bold;
  box-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
}
#ca-box h2 {
  margin: 0 0 10px;
  color: #ff0;
  font-size: 24px;
}
#ca-box p {
  margin: 0;
  font-size: 20px;
  color: #fff;
}
#copy-btn {
  margin-top: 10px;
  padding: 8px 15px;
  font-size: 14px;
  border: none;
  border-radius: 8px;
  background: #0ff;
  color: #000;
  font-weight: bold;
  cursor: pointer;
  transition: 0.2s ease-in-out;
}

#copy-btn:hover {
  background: #ff0;
  color: #000;
  transform: scale(1.05);
}
