/* ==========================================================================
   falol4rp :: Official Game Portal Stylesheet
   Webcore 1.0 & Windows 98 Bevel & Dreamcore Horror Aesthetics
   ========================================================================== */

/* --- Retro Fonts --- */
@font-face {
  font-family: 'Fixedsys Excelsior';
  src: url('assets/fonts/FixedsysExcelsior301.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Pixellari';
  src: url('assets/fonts/Pixellari.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Press Start 2P Local';
  src: url('assets/fonts/PressStart2P-Regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'VT323 Local';
  src: url('assets/fonts/VT323-Regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* --- CSS Reset & Variables --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --win-gray: #c0c0c0;
  --win-light: #ffffff;
  --win-dark: #808080;
  --win-darker: #404040;
  --win-black: #000000;
  --win-blue-title: #000080;
  --win-blue-gradient: #1084d0;
  --win-selection: #0a246a;
  --retro-link: #0000ee;
  --retro-vlink: #551a8b;
  --retro-alink: #ff0000;
  --dos-green: #33ff33;
  --bsod-blue: #0000aa;
  --horror-red: #ff3333;
}

body {
  font-family: "Fixedsys Excelsior", "Pixellari", "Fixedsys", monospace;
  font-size: 15px;
  line-height: 1.45;
  color: var(--win-black);
  background-color: #000033;
  background-image: url("assets/img/bg_stars.png");
  background-repeat: repeat;
  background-attachment: fixed;
  overflow-x: hidden;
  user-select: text;
  -webkit-font-smoothing: none;
  -moz-osx-font-smoothing: grayscale;
  font-smooth: never;
  text-rendering: geometricPrecision;
}

button, input, select, textarea {
  font-family: "Fixedsys Excelsior", "Pixellari", "Fixedsys", monospace;
  -webkit-font-smoothing: none;
  -moz-osx-font-smoothing: grayscale;
  font-smooth: never;
}

/* --- Pixel Art Rendering --- */
.pixel-art, .pixel-icon, .pixel-icon-sm, .pixel-icon-lg, .pixel-icon-xl, .web-badge {
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
}

.pixel-icon-sm {
  width: 16px;
  height: 16px;
  vertical-align: middle;
}

.pixel-icon {
  width: 16px;
  height: 16px;
  vertical-align: middle;
}

.pixel-icon-lg {
  width: 32px;
  height: 32px;
}

.pixel-icon-xl {
  width: 48px;
  height: 48px;
}

/* --- Retro 3D Bevels (Outset / Inset / Flat) --- */
.bevel-outset {
  background: var(--win-gray);
  border-top: 2px solid var(--win-light);
  border-left: 2px solid var(--win-light);
  border-right: 2px solid var(--win-darker);
  border-bottom: 2px solid var(--win-darker);
  box-shadow: inset 1px 1px 0px var(--win-gray), inset -1px -1px 0px var(--win-dark);
}

.bevel-inset {
  background: var(--win-light);
  border-top: 2px solid var(--win-darker);
  border-left: 2px solid var(--win-darker);
  border-right: 2px solid var(--win-light);
  border-bottom: 2px solid var(--win-light);
  box-shadow: inset 1px 1px 0px var(--win-dark), inset -1px -1px 0px var(--win-gray);
}

.bevel-dark {
  background: #000000;
  border-top: 2px solid var(--win-darker);
  border-left: 2px solid var(--win-darker);
  border-right: 2px solid var(--win-dark);
  border-bottom: 2px solid var(--win-dark);
  color: #ffffff;
}

/* --- Windows 98 Window Frame --- */
.retro-window {
  background: var(--win-gray);
  border-top: 2px solid var(--win-light);
  border-left: 2px solid var(--win-light);
  border-right: 2px solid var(--win-darker);
  border-bottom: 2px solid var(--win-darker);
  box-shadow: 2px 2px 0px rgba(0, 0, 0, 0.4);
  margin-bottom: 12px;
}

.window-titlebar {
  background: linear-gradient(90deg, var(--win-blue-title) 0%, var(--win-blue-gradient) 100%);
  color: #ffffff;
  padding: 3px 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: bold;
  font-size: 14px;
  letter-spacing: 0.5px;
  user-select: none;
}

.window-titlebar.sm-titlebar {
  padding: 2px 5px;
  font-size: 13px;
}

.titlebar-left {
  display: flex;
  align-items: center;
  gap: 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.titlebar-controls {
  display: flex;
  gap: 2px;
}

.win-btn {
  width: 18px;
  height: 16px;
  font-size: 11px;
  font-family: inherit;
  font-weight: bold;
  background: var(--win-gray);
  border-top: 1px solid var(--win-light);
  border-left: 1px solid var(--win-light);
  border-right: 1px solid var(--win-darker);
  border-bottom: 1px solid var(--win-darker);
  color: var(--win-black);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.win-btn:active {
  border-top: 1px solid var(--win-darker);
  border-left: 1px solid var(--win-darker);
  border-right: 1px solid var(--win-light);
  border-bottom: 1px solid var(--win-light);
}

.win-btn-close:hover {
  background: #c75050;
  color: #ffffff;
}

.window-body {
  padding: 8px;
}

/* --- Layout Structure --- */
.web-wrapper {
  max-width: 1060px;
  margin: 15px auto 40px auto;
  padding: 0 10px;
  position: relative;
  z-index: 2;
}

/* --- Browser Menu & Address Strip --- */
.browser-menu-strip {
  background: var(--win-gray);
  border-bottom: 1px solid var(--win-dark);
  padding: 2px 6px;
  display: flex;
  gap: 12px;
  font-size: 14px;
}

.menu-item {
  cursor: pointer;
  padding: 2px 6px;
}

.menu-item:hover {
  background: var(--win-selection);
  color: #ffffff;
}

.access-key {
  text-decoration: underline;
}

.address-strip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 6px;
  background: var(--win-gray);
  border-top: 1px solid var(--win-dark);
  font-size: 14px;
}

.address-label {
  font-weight: bold;
  color: var(--win-darker);
}

.address-field {
  flex: 1;
  display: flex;
  align-items: center;
  background: #ffffff;
  border-top: 1px solid var(--win-darker);
  border-left: 1px solid var(--win-darker);
  border-right: 1px solid var(--win-light);
  border-bottom: 1px solid var(--win-light);
  padding: 2px 6px;
  gap: 4px;
}

.address-input {
  flex: 1;
  border: none;
  outline: none;
  font-family: inherit;
  font-size: 14px;
  color: #000000;
  background: transparent;
}

.quick-toggles {
  display: flex;
  gap: 4px;
}

/* --- Marquee Ticker --- */
.marquee-strip {
  overflow: hidden;
  white-space: nowrap;
  padding: 4px 0;
  background: #001133;
  color: #ffcc00;
  font-family: inherit;
  font-size: 15px;
  font-weight: bold;
}

.marquee-content {
  display: inline-block;
  padding-left: 100%;
  animation: marquee 28s linear infinite;
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

/* --- Frameset (Sidebar + Main) --- */
.frameset-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 10px;
  margin-top: 8px;
}

/* --- Sidebar --- */
.sidebar-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.user-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  background: #eaeaea;
}

.user-avatar {
  width: 44px;
  height: 44px;
  border: 1px solid var(--win-dark);
  background: #ffffff;
}

.user-name {
  font-weight: bold;
  font-size: 14px;
}

.status-online {
  color: #008800;
  font-weight: bold;
}

.user-priv {
  font-family: inherit;
  font-size: 12px;
  color: #666666;
}

.retro-nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 6px;
  text-decoration: none;
  color: var(--win-black);
  background: var(--win-gray);
  border-top: 1px solid var(--win-light);
  border-left: 1px solid var(--win-light);
  border-right: 1px solid var(--win-darker);
  border-bottom: 1px solid var(--win-darker);
  font-weight: bold;
  font-size: 14px;
}

.nav-link:hover {
  background: #dfdfdf;
  color: var(--retro-link);
}

.nav-link.active {
  background: var(--win-selection);
  color: #ffffff;
  border-top: 1px solid var(--win-darker);
  border-left: 1px solid var(--win-darker);
  border-right: 1px solid var(--win-light);
  border-bottom: 1px solid var(--win-light);
}

.nav-link.download-highlight {
  color: #8b0000;
  background: #ffecb3;
}

.nav-link.download-highlight:hover {
  background: #ffe082;
}

.retro-hr {
  border: none;
  border-top: 1px solid var(--win-dark);
  border-bottom: 1px solid var(--win-light);
  margin: 4px 0;
}

.info-card {
  padding: 6px;
  background: #f7f7f7;
  font-size: 13px;
}

.info-card-header {
  font-weight: bold;
  margin-bottom: 4px;
  color: var(--win-blue-title);
  font-size: 14px;
}

.specs-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 13px;
}

.sound-test-box {
  padding: 6px;
}

.box-title {
  font-weight: bold;
  margin-bottom: 4px;
  font-size: 13px;
}

.sound-btn-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}

.visitor-counter-box {
  padding: 6px;
  text-align: center;
  background: #000000;
}

.counter-title {
  display: block;
  font-size: 12px;
  color: #aaaaaa;
  margin-bottom: 2px;
}

.digital-odometer {
  font-family: "Fixedsys Excelsior", monospace;
  font-size: 18px;
  font-weight: bold;
  color: #00ff66;
  letter-spacing: 3px;
  background: #111111;
  display: inline-block;
  padding: 2px 8px;
  border: 1px solid #333333;
}

/* --- Buttons --- */
.retro-btn {
  font-family: inherit;
  font-size: 14px;
  padding: 3px 8px;
  background: var(--win-gray);
  border-top: 2px solid var(--win-light);
  border-left: 2px solid var(--win-light);
  border-right: 2px solid var(--win-darker);
  border-bottom: 2px solid var(--win-darker);
  color: var(--win-black);
  cursor: pointer;
  user-select: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.retro-btn:active {
  border-top: 2px solid var(--win-darker);
  border-left: 2px solid var(--win-darker);
  border-right: 2px solid var(--win-light);
  border-bottom: 2px solid var(--win-light);
  padding: 4px 7px 2px 9px;
}

.retro-btn.btn-sm {
  font-size: 12px;
  padding: 2px 6px;
}

.retro-btn.btn-xs {
  font-size: 11px;
  padding: 2px 4px;
}

.retro-btn.btn-lg {
  font-size: 14px;
  font-weight: bold;
  padding: 6px 14px;
}

.retro-btn.btn-primary {
  background: #d4d0c8;
  font-weight: bold;
}

.retro-btn.btn-danger {
  background: #ffcccc;
  color: #990000;
  font-weight: bold;
}

.retro-btn.btn-warn {
  background: #fff0b3;
  color: #805000;
}

.retro-btn.btn-success {
  background: #c8e6c9;
  color: #1b5e20;
}

/* --- Main Frame Sections --- */
.main-frame {
  display: flex;
  flex-direction: column;
}

.content-section {
  display: none;
}

.content-section.active {
  display: block;
}

.hero-banner {
  padding: 16px;
  text-align: center;
  margin-bottom: 12px;
  background: radial-gradient(circle at center, #001a40 0%, #000000 100%);
  border: 2px solid var(--win-dark);
}

.glitch-text {
  font-family: "Impact", "Arial Black", sans-serif;
  font-size: 38px;
  letter-spacing: 3px;
  color: #ffffff;
  text-shadow: 2px 2px 0px #ff0055, -2px -2px 0px #00e5ff;
  position: relative;
  display: inline-block;
}

.hero-tagline {
  font-style: italic;
  color: #ffcc66;
  margin-top: 6px;
  font-size: 14px;
}

.author-tag {
  margin-top: 8px;
  font-size: 13px;
  color: #bbbbbb;
}

.highlight-author {
  color: #00ffcc;
  font-weight: bold;
}

.content-text-block {
  padding: 4px 6px;
  font-size: 15px;
  line-height: 1.5;
}

.section-heading {
  font-size: 17px;
  font-weight: bold;
  color: var(--win-blue-title);
  border-bottom: 2px solid var(--win-dark);
  padding-bottom: 2px;
  margin: 14px 0 8px 0;
}

.section-lead {
  font-size: 14px;
  margin-bottom: 8px;
}

.quote-box {
  display: flex;
  gap: 10px;
  padding: 10px;
  margin: 12px 0;
  background: #ffffea;
}

.quote-icon {
  font-size: 24px;
}

.quote-content {
  font-size: 14px;
  line-height: 1.5;
}

.quote-sign {
  margin-top: 6px;
  font-weight: bold;
  text-align: right;
  color: #555555;
  font-size: 13px;
}

.horror-bullet-list,
.features-bullet-list {
  list-style: square inside;
  margin-left: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
}

/* --- Features Grid --- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.feature-card {
  padding: 10px;
  background: #ece9d8;
}

.feature-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--win-dark);
  padding-bottom: 4px;
}

.feature-title {
  font-size: 15px;
  font-weight: bold;
  color: var(--win-blue-title);
}

.feature-desc {
  font-size: 14px;
  line-height: 1.4;
  color: #222222;
}

/* --- Screenshot Gallery --- */
.gallery-viewport {
  width: 100%;
  background: #000000;
  padding: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 8px;
}

.gallery-active-image {
  max-width: 100%;
  max-height: 480px;
  object-fit: contain;
  border: 1px solid #333333;
}

.gallery-caption {
  margin-top: 6px;
  font-family: monospace;
  font-size: 11px;
  color: #ffeedd;
  background: #111111;
  padding: 4px 10px;
  width: 100%;
  text-align: center;
}

.thumbnail-strip {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 8px;
  background: #dedede;
}

.thumb-item {
  flex: 0 0 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--win-gray);
  border-top: 1px solid var(--win-light);
  border-left: 1px solid var(--win-light);
  border-right: 1px solid var(--win-darker);
  border-bottom: 1px solid var(--win-darker);
  padding: 4px;
  cursor: pointer;
  user-select: none;
}

.thumb-item:hover {
  background: #eaeaea;
}

.thumb-item.active {
  background: var(--win-selection);
  color: #ffffff;
}

.thumb-item img {
  width: 90px;
  height: 56px;
  object-fit: cover;
  border: 1px solid #000000;
}

.thumb-item span {
  font-size: 9px;
  font-weight: bold;
  margin-top: 4px;
  text-align: center;
}

/* --- MS-DOS Terminal --- */
.dos-terminal {
  background: #000000;
  color: var(--dos-green);
  font-family: "Fixedsys Excelsior", "VT323 Local", "Fixedsys", "Lucida Console", "Courier New", monospace;
  font-size: 14px;
  line-height: 1.4;
  padding: 10px;
  min-height: 240px;
  max-height: 340px;
  overflow-y: auto;
}

.dos-output div {
  white-space: pre-wrap;
  line-height: 1.4;
}

.dos-input-line {
  display: flex;
  align-items: center;
  margin-top: 4px;
}

.dos-prompt {
  color: var(--dos-green);
  margin-right: 6px;
  user-select: none;
}

.dos-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--dos-green);
  font-family: "Fixedsys Excelsior", "VT323 Local", "Fixedsys", "Lucida Console", "Courier New", monospace;
  font-size: 14px;
}

.dos-hint-bar {
  margin-top: 6px;
  font-size: 11px;
}

.hint-tag {
  font-weight: bold;
  color: var(--win-blue-title);
}

/* --- flIRC Chat Simulation --- */
.flirc-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 6px;
  background: #ece9d8;
}

.flirc-topic {
  padding: 4px 8px;
  font-size: 13px;
}

.flirc-main-view {
  display: grid;
  grid-template-columns: 1fr 160px;
  gap: 6px;
  height: 250px;
}

.flirc-log {
  background: #ffffff;
  padding: 6px;
  overflow-y: auto;
  font-family: inherit;
  font-size: 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.flirc-line.sys {
  color: #008800;
}

.flirc-line .nick-admin {
  color: #cc0000;
  font-weight: bold;
}

.flirc-line .nick-voice {
  color: #0000cc;
  font-weight: bold;
}

.flirc-line .nick-floppa {
  color: #b35900;
  font-weight: bold;
}

.flirc-line .nick-user {
  color: #000000;
  font-weight: bold;
}

.flirc-line .nick-sys {
  color: #ff0000;
  font-weight: bold;
  background: #ffe6e6;
}

.horror-faint {
  color: #aa0000;
  font-style: italic;
}

.flirc-userlist {
  background: #ffffff;
  padding: 6px;
  overflow-y: auto;
  font-size: 13px;
}

.userlist-title {
  font-weight: bold;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--win-dark);
}

.userlist-item {
  padding: 1px 0;
}

.userlist-item.op {
  color: #cc0000;
  font-weight: bold;
}

.userlist-item.voice {
  color: #0000cc;
}

.userlist-item.me {
  font-weight: bold;
  background: #ffffcc;
}

.flirc-input-strip {
  display: flex;
  gap: 4px;
}

.flirc-input {
  flex: 1;
  padding: 4px;
  border: 1px solid var(--win-dark);
  font-family: inherit;
  font-size: 14px;
}

/* --- Notepad Editor --- */
.notepad-editor {
  background: #ffffff;
  padding: 10px;
  font-family: inherit;
  font-size: 14px;
  white-space: pre-wrap;
  line-height: 1.5;
  min-height: 260px;
}

/* --- Guestbook --- */
.guestbook-form {
  padding: 10px;
  margin: 10px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.form-row label {
  font-weight: bold;
  font-size: 14px;
}

.retro-input {
  padding: 4px;
  font-family: inherit;
  font-size: 14px;
  border: 1px solid var(--win-dark);
}

.form-actions {
  display: flex;
  gap: 6px;
}

.guestbook-entries {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
  max-height: 300px;
  overflow-y: auto;
}

.gb-entry {
  padding: 8px;
  background: #fafafa;
}

.gb-entry-header {
  border-bottom: 1px solid #dddddd;
  padding-bottom: 3px;
  margin-bottom: 4px;
  font-size: 13px;
}

.gb-date {
  color: #888888;
  float: right;
}

.gb-entry-body {
  font-size: 14px;
  line-height: 1.4;
}

.horror-text {
  color: #aa0000;
  font-family: inherit;
  font-weight: bold;
}

/* --- Download Section --- */
.download-box {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #f0f0e0;
}

.download-info {
  display: flex;
  gap: 14px;
  align-items: center;
}

.dl-title {
  font-size: 17px;
  font-weight: bold;
  color: var(--win-blue-title);
  margin-bottom: 4px;
}

.dl-meta {
  font-size: 14px;
  margin: 2px 0;
}

/* Download Status Notice banner */
.dl-status-notice {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff8d6;
  border: 2px solid var(--win-darker);
  padding: 10px 14px;
  box-shadow: inset 1px 1px 0px var(--win-dark);
}

.dl-status-notice-title {
  font-weight: bold;
  font-size: 14px;
  color: #aa0000;
  margin-bottom: 4px;
}

.dl-status-notice-body p {
  font-size: 14px;
  line-height: 1.4;
  margin: 0;
  color: #333333;
}

.download-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.dev-note-box {
  padding: 10px;
  margin-top: 12px;
  background: #ffffff;
  font-size: 14px;
}

.dev-note-box h4 {
  color: var(--win-blue-title);
  font-size: 15px;
  margin-bottom: 4px;
}

.dev-note-box p {
  font-style: italic;
  font-size: 14px;
  line-height: 1.5;
}

/* --- Windows 98 Error Modal Dialog --- */
.win-dialog-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.45);
  z-index: 99990;
  align-items: center;
  justify-content: center;
}

.win-dialog-overlay.active {
  display: flex;
}

.win-dialog-box {
  width: 500px;
  max-width: 92vw;
  box-shadow: 3px 3px 0px rgba(0, 0, 0, 0.6);
  margin-bottom: 0;
}

.dialog-body {
  padding: 12px 14px;
  background: var(--win-gray);
}

.dialog-grid {
  display: flex;
  gap: 14px;
  margin-bottom: 14px;
}

.dialog-icon-col {
  flex-shrink: 0;
  padding-top: 2px;
}

.win-error-circle-icon {
  width: 32px;
  height: 32px;
  background: #cc0000;
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: bold;
  font-family: Arial, sans-serif;
  border: 2px solid #000000;
  box-shadow: inset 1px 1px 0px rgba(255,255,255,0.6), 1px 1px 0px #ffffff;
}

.dialog-text-col {
  flex: 1;
}

.dialog-error-title {
  font-weight: bold;
  font-size: 15px;
  margin-bottom: 6px;
  color: #000000;
}

.dialog-desc {
  font-size: 14px;
  line-height: 1.4;
  margin-bottom: 10px;
  color: #222222;
}

.dialog-error-code {
  background: #f0f0f0;
  padding: 6px 8px;
  font-size: 13px;
  line-height: 1.4;
  color: #333333;
  margin-bottom: 8px;
}

.dialog-extra-details {
  background: #ffffff;
  padding: 6px 8px;
  font-size: 13px;
  line-height: 1.4;
  color: #000080;
  margin-top: 6px;
}

.dialog-btn-row {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  border-top: 1px solid var(--win-dark);
  padding-top: 10px;
}

.btn-dialog-action {
  min-width: 80px;
  padding: 4px 14px;
}

/* --- Footer & Badges --- */
.site-footer {
  margin-top: 15px;
  padding: 10px;
  text-align: center;
}

.footer-badges {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.web-badge {
  width: 88px;
  height: 31px;
  border: 1px solid var(--win-dark);
}

.footer-credits {
  font-size: 13px;
  color: #444444;
}

/* --- Interactive Companion Widget --- */
.flopercin-widget {
  position: fixed;
  bottom: 12px;
  right: 18px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.flopercin-speech-balloon {
  width: 250px;
  padding: 6px;
  margin-bottom: 6px;
  background: #ffffdc;
  font-size: 11px;
  line-height: 1.3;
}

.balloon-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--win-dark);
  padding-bottom: 2px;
  margin-bottom: 4px;
}

.balloon-title {
  font-weight: bold;
  color: #b35900;
}

.balloon-close {
  background: none;
  border: none;
  cursor: pointer;
  font-weight: bold;
  font-size: 10px;
}

.balloon-text {
  margin-bottom: 6px;
  color: #111111;
}

.balloon-quick-actions {
  display: flex;
  gap: 3px;
  flex-wrap: wrap;
}

.flopercin-sprite-box {
  cursor: grab;
  user-select: none;
  transition: transform 0.1s ease;
}

.flopercin-sprite-box:active {
  cursor: grabbing;
}

.floppa-sprite {
  width: 64px;
  height: 64px;
  filter: drop-shadow(2px 2px 0px rgba(0,0,0,0.5));
}

/* --- BSOD Modal (Windows 98 Authentic Style) --- */
.bsod-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: var(--bsod-blue);
  color: #ffffff;
  z-index: 99999;
  font-family: "Fixedsys Excelsior", "VT323 Local", "Fixedsys", "Lucida Console", "Courier New", monospace;
  font-size: 18px;
  line-height: 1.5;
  padding: 8vh 8vw;
  overflow: auto;
  user-select: none;
  cursor: pointer;
  -webkit-font-smoothing: none;
  text-rendering: geometricPrecision;
}

.bsod-modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.bsod-inner {
  max-width: 780px;
  width: 100%;
  margin: 0 auto;
}

.bsod-title-wrap {
  text-align: center;
  margin-bottom: 28px;
}

.bsod-title-badge {
  background: #a8a8a8;
  color: var(--bsod-blue);
  display: inline-block;
  padding: 2px 16px;
  font-weight: bold;
  font-size: 19px;
  letter-spacing: 1px;
}

.bsod-body p {
  margin-bottom: 18px;
  line-height: 1.5;
}

.bsod-instruction-list {
  margin: 22px 0 28px 24px;
  line-height: 1.6;
}

.bsod-press-any-key {
  text-align: center;
  margin: 40px 0 20px 0;
  font-size: 18px;
  font-weight: bold;
}

.bsod-return-hint {
  text-align: center;
  color: #a0c4ff;
  font-size: 14px;
  margin-top: 20px;
}

.blink-cursor {
  animation: blink 0.8s infinite;
}

@keyframes blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

/* --- CRT & Horror FX --- */
.crt-overlay {
  display: none;
  pointer-events: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 9999;
  background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%),
              linear-gradient(90deg, rgba(255, 0, 0, 0.03), rgba(0, 255, 0, 0.01), rgba(0, 0, 255, 0.03));
  background-size: 100% 3px, 3px 100%;
  box-shadow: inset 0 0 80px rgba(0, 0, 0, 0.6);
}

body.crt-enabled .crt-overlay {
  display: block;
}

/* Shake Animation for Nudge & Glitch */
@keyframes shake-nudge {
  0% { transform: translate(0, 0); }
  20% { transform: translate(-8px, 6px); }
  40% { transform: translate(8px, -6px); }
  60% { transform: translate(-6px, -4px); }
  80% { transform: translate(6px, 4px); }
  100% { transform: translate(0, 0); }
}

.shaking {
  animation: shake-nudge 0.4s ease;
}

/* Glitch Flicker */
.horror-glitch-active {
  filter: invert(0.9) hue-rotate(180deg) contrast(1.5);
  animation: shake-nudge 0.3s infinite;
}

/* Responsive adjustments */
@media (max-width: 800px) {
  .frameset-layout {
    grid-template-columns: 1fr;
  }
  .features-grid {
    grid-template-columns: 1fr;
  }
  .flirc-main-view {
    grid-template-columns: 1fr;
  }
}
