/* Amiga Workbench-inspired theme overrides */
:root {
  --wb-bg: #bfbfbf;            /* classic gray desktop */
  --wb-window: #d6d6d6;        /* lighter window body */
  --wb-titlebar: #2f6fa7;      /* Workbench blue */
  --wb-titlebar-dark: #24567f; /* darker edge */
  --wb-titlebar-light: #5a96c5;/* lighter edge */
  --wb-button: #dcdcdc;        /* button surface */
  --wb-button-dark: #7a7a7a;   /* shadow */
  --wb-button-light: #ffffff;  /* highlight */
  --wb-accent: #ff8c00;        /* orange accent */
  --wb-text: #1a1a1a;          /* dark text */
}

body.crt { background: var(--wb-bg); color: var(--wb-text); }

.bios-frame { 
  background: var(--wb-window);
  border: 2px solid #000;
  box-shadow: inset 0 0 0 1px #fff, 0 2px 0 0 #000, 0 3px 0 0 #fff;
}

.bios-header {
  background: linear-gradient(180deg, var(--wb-titlebar-light), var(--wb-titlebar));
  color: #fff;
  border-bottom: 2px solid var(--wb-titlebar-dark);
  padding: 6px 8px;
  display: flex; align-items: center; gap: 8px;
}

.bios-title { font-weight: bold; letter-spacing: 0.5px; }

/* Titlebar gadgets */
.bios-title::before { content: "◻ ◼ ◻"; margin-right: 8px; color: #fff; opacity: 0.9; }

.bios-menu { padding: 6px 8px; background: rgba(0,0,0,0.05); border-bottom: 2px solid #000; }

.menu-item {
  color: #000;
  background: var(--wb-button);
  border: 2px solid #000;
  box-shadow: inset 0 0 0 1px var(--wb-button-light), 2px 2px 0 0 var(--wb-button-light), -2px -2px 0 0 var(--wb-button-dark);
  padding: 4px 10px;
}
.menu-item:hover { filter: brightness(1.05); }
.menu-item.active { background: #eaeaea; outline: 2px solid var(--wb-accent); }

.bios-content { padding: 8px; }
.bios-content h2 { color: #000; border-bottom: 1px solid #000; padding-bottom: 4px; }
.bios-line { color: #000; }

/* Lists and items */
.article-list { gap: 12px; }
.article-item { border: 2px solid #000; background: #e9e9e9; }
.article-item .thumb { background: #b0b0b0; }
.article-item .meta .title { color: #000; }
.article-item .meta .date { color: #333; }

/* Video list */
.video-item { color: #000; background: #e9e9e9; border: 2px solid #000; }
.video-item:hover { filter: brightness(1.03); }

/* YouTube embed frame */
.yt-embed { background: #000; border: 2px solid #000; box-shadow: 3px 3px 0 0 #fff, -3px -3px 0 0 #777; }

/* Footer */
.bios-footer { border-top: 2px solid #000; color: #000; }

/* Matrix overlay compatibility */
.matrix-overlay { background: rgba(0,0,0,0.75); }

/* Snake overlay window in WB style */
.snake-window { color: #000; background: var(--wb-window); border: 2px solid #000; box-shadow: inset 0 0 0 1px #fff; }
.snake-title { color: var(--wb-titlebar); }
.snake-btn { border: 2px solid #000; background: var(--wb-button); color: #000; box-shadow: inset 0 0 0 1px var(--wb-button-light); }

/* Form elements (basic WB look) */
input, select, textarea { background: #fff; color: #000; border: 2px solid #000; box-shadow: inset 0 0 0 1px #ccc; }
label { color: #000; }

/* WYSIWYG overrides */
.wys-toolbar .menu-item { background: var(--wb-button); color: #000; }
.wys-area { background: #fff; color: #000; border: 2px solid #000; }

/* Workbench menu bar and window gadgets */
.bios-title::before {
  content: "◻ ◼ ◻";
  margin-right: 8px;
  font-size: 12px;
  padding: 0 4px;
  border: 1px solid #fff;
  box-shadow: inset 0 0 0 1px var(--wb-titlebar-dark);
  border-radius: 2px;
}
.bios-menu {
  background: linear-gradient(180deg, rgba(255,255,255,0.15), rgba(0,0,0,0.05));
}
.menu-item:active {
  box-shadow: inset 2px 2px 0 0 var(--wb-button-dark), inset -2px -2px 0 0 var(--wb-button-light);
}

/* Bitmap-style tiled background */
body.crt {
  background-color: var(--wb-bg);
  background-image:
    repeating-linear-gradient(0deg, rgba(255,255,255,0.06) 0, rgba(255,255,255,0.06) 1px, transparent 1px, transparent 4px),
    repeating-linear-gradient(90deg, rgba(0,0,0,0.06) 0, rgba(0,0,0,0.06) 1px, transparent 1px, transparent 4px);
  background-size: 4px 4px, 4px 4px;
  background-repeat: repeat;
}

/* Retro cursors (SVG data-URIs) */
body.crt {
  cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='24' viewBox='0 0 16 24'><polygon fill='%23000' points='0,0 0,24 6,18 10,23 12,22 8,17 16,17'/><polygon fill='%23fff' points='1,2 1,21 6,17 9,21 10,20 7,16 14,16'/></svg>") 0 0, default;
}
.bios-menu a, a, .menu-item:hover {
  cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='24' viewBox='0 0 16 24'><path fill='%23000' d='M0 0 L0 24 L6 18 L10 23 L12 22 L8 17 L16 17 Z'/><path fill='%23ff8c00' d='M3 5 L3 18 L6 15 L8 18 L9 17 L7 14 L13 14 Z'/></svg>") 2 1, pointer;
}

/* Retro font fallbacks and subtle 3D text shading */
body, .bios-title, .bios-menu, .menu-item {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, 'Lucida Sans', 'Lucida Sans Unicode', 'Chicago', sans-serif;
}
.bios-title { text-shadow: 1px 1px 0 rgba(0,0,0,0.25), -1px -1px 0 rgba(255,255,255,0.25); }
.bios-line, .bios-warning, h2 { text-shadow: 0.5px 0.5px 0 rgba(0,0,0,0.2); }

/* Migająca obwódka dla LOGIN w Amiga */
@keyframes loginFlashBorderAmiga {
  0% { box-shadow: 0 0 0 2px rgba(255,26,26,0.25); }
  50% { box-shadow: 0 0 0 2px rgba(255,26,26,0.85); }
  100% { box-shadow: 0 0 0 2px rgba(255,26,26,0.25); }
}
nav.bios-menu a.menu-item[href="user_login.php"] {
  border: 2px solid #ff1a1a;
  animation: loginFlashBorderAmiga 1.2s ease-in-out infinite;
}
/* Ikonki dla layoutu Amiga (Amiga/Commodore) */
.bios-title::after {
  content: "";
  display: inline-block;
  width: 84px;
  height: 16px;
  margin-left: 8px;
  background-image: url('../icons/amiga-commodore.svg');
  background-repeat: no-repeat;
  background-size: contain;
  vertical-align: middle;
}