/* Retro BIOS / CRT style */
:root {
  --green: #00ff7f;
  --blue1: #003b8e;
  --blue2: #1a5fb4;
  --bg: #000000;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body.crt {
  margin: 0;
  background: var(--bg);
  color: var(--green);
  font-family: Consolas, 'Courier New', monospace;
  text-shadow: 0 0 2px rgba(0,255,127,0.6), 0 0 6px rgba(0,255,127,0.4);
}

.bios-frame {
  min-height: 100vh;
  border: 8px solid #0af;
  background: linear-gradient(180deg, var(--blue2), var(--blue1)) padding-box,
              radial-gradient(circle at 20% 20%, rgba(255,255,255,0.08), rgba(0,0,0,0)) border-box;
  padding: 12px;
  position: relative;
  overflow: auto;
}

/* CRT scanlines overlay */
.bios-frame::after {
  content: "";
  position: absolute; inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0,0,0,0.2), rgba(0,0,0,0.2) 1px,
    rgba(0,0,0,0.0) 2px, rgba(0,0,0,0.0) 4px
  );
  pointer-events: none;
}

.bios-header { margin-bottom: 8px; }
.bios-title { font-weight: bold; letter-spacing: 1px; }
.bios-subtitle { opacity: 0.85; }
.bios-warning { color: #ff5; }

/* F10 prompt */
.bios-header { position: relative; }
.bios-f10 { position: absolute; right: 12px; top: 6px; font-weight: bold; }
.bios-f10 a { color: var(--green); text-decoration: none; cursor: pointer; }

.bios-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  border: 1px dashed rgba(0,255,127,0.5);
  padding: 8px;
}
.menu-item {
  color: var(--green);
  text-decoration: none;
  border: 1px solid rgba(0,255,127,0.3);
  padding: 4px 8px;
  display: inline-block;
}
.menu-item.active { background: rgba(0,255,127,0.08); }
.menu-item:hover { background: rgba(0,255,127,0.12); }

.bios-content { margin-top: 8px; }
.bios-content h2 { margin: 6px 0 10px; }
.bios-line { opacity: 0.9; }

.article-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px; }
.article-item { display: flex; gap: 8px; border: 1px solid rgba(0,255,127,0.25); padding: 6px; }
.article-item .thumb { width: 88px; height: 66px; background: #000; display:flex; align-items:center; justify-content:center; }
.article-item img { width: 100%; height: 100%; object-fit: contain; }
.no-thumb { font-weight: bold; font-size: 12px; }
.article-item .meta .title { font-weight: bold; }
.article-item .meta .date { font-size: 12px; opacity: 0.8; }

/* Artykuły: białe litery na czarnym tle */
.article-item .meta, .article-item .meta .title, .article-item .meta .date { color: #fff; }

.video-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.video-item { color: var(--green); border: 1px solid rgba(0,255,127,0.25); padding: 6px; display:block; }
.video-item:hover { background: rgba(0,255,127,0.1); }
.video-item .published { opacity: 0.8; }

/* YouTube single-column layout */
/* Dedicated YouTube list layout */
.youtube-list { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.youtube-list .video-item { width: 100%; max-width: 860px; }

/* YouTube embeds */
.yt-embed { width: 100%; aspect-ratio: 16/9; height: auto; background: #000; display:block; }

.bios-footer { margin-top: 12px; border-top: 1px dashed rgba(0,255,127,0.3); padding-top: 6px; font-size: 12px; }

.blink { animation: blink 1s steps(2, start) infinite; }
@keyframes blink { to { visibility: hidden; } }

/* Matrix overlay */
.matrix-overlay { position: fixed; inset: 0; z-index: 9999; pointer-events: none; background: rgba(0,0,0,0.78); }
.matrix-canvas { width: 100%; height: 100%; display:block; }

/* Snake overlay */
.snake-overlay { position: fixed; inset: 0; z-index: 10000; background: rgba(0,0,0,0.82); display:flex; align-items:center; justify-content:center; padding: 16px; box-sizing: border-box; }
.snake-window { font-family: Consolas, monospace; color: #fff; background: #000; border: 2px solid rgba(0,255,127,0.5); padding: 8px; width: 100%; max-width: 420px; margin: 0 auto; }
.snake-title { color: var(--green); text-align:center; margin-bottom: 6px; }
.snake-menu { margin-top: 6px; }
.snake-grid { white-space: pre; line-height: 1.0; font-size: 14px; }
.snake-btn { display:inline-block; padding: 4px 8px; border: 1px dashed rgba(0,255,127,0.5); margin: 2px; cursor: pointer; }
.snake-btn[disabled] { opacity: 0.5; cursor: default; }
.snake-ranking { margin-top: 6px; border-top: 1px dashed rgba(0,255,127,0.3); padding-top: 6px; }

/* responsywność */
@media (max-width: 600px) {
  .article-item { flex-direction: column; }
  .article-item .thumb { width: 100%; height: 140px; }
}

/* Drag & drop upload */
.file-drop { margin: 8px 0; }
.drop-zone { border: 2px dashed rgba(0,255,127,0.4); min-height: 84px; display:flex; align-items:center; justify-content:center; color: var(--green); background: rgba(0,255,127,0.03); }
.drop-zone.dragover { background: rgba(0,255,127,0.12); }
.previews { display:flex; flex-wrap:wrap; gap: 6px; margin-top: 6px; }
.preview-item { width: 88px; height: 66px; border: 1px solid rgba(0,255,127,0.25); background: #000; display:flex; align-items:center; justify-content:center; }
.preview-item img { width: 100%; height: 100%; object-fit: cover; }
.video-item .title { font-weight: bold; margin-bottom: 6px; }

/* Global responsive images */
img { max-width: 100%; height: auto; }
/* Ensure content images scale within main content area */
.bios-content img { max-width: 100%; height: auto; }

/* WYSIWYG editor */
.wys-editor { border: 1px solid rgba(0,255,127,0.25); padding: 6px; background: rgba(0,255,127,0.03); }
.wys-toolbar { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.wys-area { min-height: 300px; max-height: 80vh; overflow: auto; background: #000; color: #fff; padding: 6px; border: 1px dashed rgba(0,255,127,0.3); }
.wys-area:focus { outline: 1px solid rgba(0,255,127,0.6); }