
@font-face {
  font-family: "Pixelated MS Sans Serif";
  src: url("fonts/converted/ms_sans_serif.woff") format("woff");
  src: url("fonts/converted/ms_sans_serif.woff2") format("woff2");
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: "Pixelated MS Sans Serif";
  src: url("fonts/converted/ms_sans_serif_bold.woff") format("woff");
  src: url("fonts/converted/ms_sans_serif_bold.woff2") format("woff2");
  font-weight: bold;
  font-style: normal;
}

#boot-screen {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    
    background-color: #008080; 
    z-index: 90;

    display: flex;
    align-items: center;
    justify-content: center;
}

#splash-screen {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    
    background-color: #000000; 
    
    z-index: 91; 
    
    display: flex;
    align-items: center;
    justify-content: center;

    cursor: url('ico/cursor_wait.ico'), wait; 
}

#splash-screen img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    image-rendering: pixelated;
}

/* .desktop > .window {animation: chromatic-jitter 3s steps(1) infinite;} */
#desktop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 35px; 

    padding: 10px;
    
    overflow: hidden; 

    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    align-content: flex-start;
    
    gap: 24px 16px;
    padding: 10px;
}

#os-container {
    /* Magia polega na wymuszeniu wielkości i zastosowaniu CSSowej skali zależnej od wielkości rodzica (monitor-screen) */
    position: absolute;
    top: 0;
    left: 0;
    width: 800px;
    height: 600px;
    transform-origin: top left;
    
    /* Przeliczamy szerokość ekranu do szerokości 800px - cokolwiek w nim jest, uważa że działa w środowisku 800x600 */
    transform: scale(calc(100cqi / 800)); 
}

/* Wymaga to zdefiniowania kontenera wyżej, aby użyć container-queries (cqi) */
#monitor-screen {
    container-type: inline-size;
}

.desktop-icon {
    width: 76px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    cursor: pointer;
    overflow-wrap: break-word; 
}

.desktop-icon img {
    width: 32px;
    height: 32px;
    margin-bottom: 4px;
    image-rendering: pixelated;
}

.desktop-icon span {
    color: white;
    font-size: 11px;
    padding: 2px 4px;
    border: 1px transparent dotted;
}

.desktop-icon.selected span {
    background-color: #000080;
    border-color: white;
}

.taskbar {
    position: fixed; 
    bottom: 0; 
    left: 0; 
    width: 100%;
    background-color: #c0c0c0; 
    border-top: 2px solid #dfdfdf;
    display: flex; 
    justify-content: space-between;
    align-items: center;
    padding: 3px;
    z-index: 20;
}

.start-menu {
    position: absolute; 
    bottom: 35px;
    left: 2px;
    width: 200px;
    z-index: 10000;
}

.window {
    display: flex;
    flex-direction: column;
}

.intro-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background-color: #000;
    pointer-events: auto;
}

.intro-screen {
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #000;
}

.customization-bg {
    background-color: #111;
}

.image-center-box {
    position: absolute;
    width: 90vw;
    max-width: 1624px;
    max-height: 90vh;
    aspect-ratio: 1624 / 1050; 
}

.fixed-size-image {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: contain; 
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
}

.fixed-size-image.is-visible {
    opacity: 1;
}

/* --- EFEKT GLITCH --- */
.glitch-active {
    animation: glitch-burst 0.15s infinite; 
    z-index: 100;
}

@keyframes glitch-burst {
    0% { transform: translate(0, 0) skew(0deg); filter: none; }
    20% { transform: translate(15px, 5px) skew(15deg); filter: hue-rotate(90deg) contrast(150%); }
    40% { transform: translate(15px, 10px) skew(-15deg); filter: invert(1); }
    60% { transform: translate(5px, 15px) skew(5deg); filter: blur(3px) drop-shadow(5px 0px red); }
    80% { transform: translate(10px, 5px) skew(-5deg); filter: drop-shadow(-5px 0px cyan); opacity: 0.8;}
    100% { transform: translate(0, 0) skew(0deg); filter: contrast(200%); }
}

.customization-bg {
    background-color: #000;
}

.setup-container {
    width: 650px;
    max-width: 95vw;
    font-family: 'Pixelated MS Sans Serif', Arial, sans-serif;
    color: #eaeaea;
    display: flex;
    flex-direction: column;
    gap: 30px;
    position: relative;
    z-index: 100;
}

.section-title {
    font-size: 16px;
    margin: 0 0 10px 0;
    padding-bottom: 6px;
    color: #eaeaea;
}

.avatar-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.avatar-slot {
    aspect-ratio: 1;
    width: 128px;
    background-color: #000;
    border: 2px dashed #444;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 12px;
    color: #666;
}

.avatar-slot:hover {
    border-color: #eaeaea;
    color: #eaeaea;
}

.avatar-slot.selected {
    border: 2px solid #eaeaea;
    background-color: #eaeaea;
    color: #000;
}

.chip-counter {
    font-size: 12px;
    color: #888;
}

.subsection {
    margin-bottom: 20px;
}

.subsection-header {
    font-size: 12px;
    color: #eaeaea;
    margin-bottom: 8px;
}

.chip-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.sys-chip {
    background-color: #000;
    color: #eaeaea;
    border: 1px solid #eaeaea;
    padding: 6px 12px;
    font-family: inherit;
    font-size: 12px;
    cursor: pointer;
    text-transform: uppercase;
}

.sys-chip:active {
    background-color: #222;
}

.sys-chip.active {
    background-color: #eaeaea; 
    color: #000;
}

.sys-chip.disabled {
    opacity: 0.25;
    pointer-events: none;
    border-color: #444;
}

.action-row {
    display: flex;
    justify-content: flex-end;
    margin-top: 10px;
}

.boot-button {
    background-color: #eaeaea;
    color: #000;
    border: none;
    padding: 10px 20px;
    font-family: inherit;
    font-weight: bold;
    cursor: pointer;
}

.boot-button:disabled {
    background-color: #111;
    color: #444;
    cursor: not-allowed;
}

.shutdown-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    background-color: #000;
    color: #eaeaea;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Pixelated MS Sans Serif', Arial, sans-serif;
}

.shutdown-content {
    text-align: center;
    width: 600px;
    max-width: 90vw;
}

.shift-title {
    font-size: 32px;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 0 0 40px 0;
    padding-bottom: 20px;
    border-bottom: 1px solid #333;
}

.summary-box {
    line-height: 1.6;
    font-size: 14px;
}

.ending-main {
    color: #eaeaea;
}

.ending-personal {
    color: #888;
}

.desktop-widget-taskmanager {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 350px;
    z-index: 5;
}

.desktop-widget-taskmanager .window {
    width: 100%;
    margin: 0;
    cursor: default;
    color: #222 !important; 
}

.desktop-widget-taskmanager .window-body {
    color: #222;
}

.desktop-widget-taskmanager legend,
.desktop-widget-taskmanager label {
    user-select: none;
    color: #222 !important;
}


.shutdown-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    background-color: #000;
    color: #eaeaea;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Pixelated MS Sans Serif', Arial, sans-serif;
}

.shutdown-content {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 1100px; /* Poszerzone, aby pomieścić dwie kolumny */
    max-width: 95vw;
    max-height: 95vh;
}

.shift-title {
    font-size: 32px;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 0 0 20px 0;
    padding-bottom: 20px;
    border-bottom: 1px solid #333;
    width: 100%;
    text-align: center;
}

/* Nowy kontener układający panele obok siebie */
.ending-layout {
    display: flex;
    gap: 30px;
    width: 100%;
    align-items: stretch; 
}

/* Uniwersalna klasa (DRY) dla obu scrollowanych okienek */
.retro-panel {
    flex: 1; /* Obydwa panele zajmą równo po 50% miejsca */
    max-height: 60vh;
    overflow-y: auto;
    padding: 20px;
    background: #000; 
    border: 1px solid #333; 
    line-height: 1.8;
    font-size: 14px;
    text-align: left;
    
    scrollbar-width: thin;
    scrollbar-color: #555 #000;
}

.retro-panel::-webkit-scrollbar {
    width: 12px;
}
.retro-panel::-webkit-scrollbar-track {
    background: #000;
    border-left: 1px solid #333;
}
.retro-panel::-webkit-scrollbar-thumb {
    background: #555;
    border: 1px solid #333;
}
.retro-panel::-webkit-scrollbar-thumb:hover {
    background: #777;
}

/* Style specyficzne dla manifestu */
.manifesto-text p {
    margin-top: 0;
    margin-bottom: 15px;
}
.manifesto-text a {
    color: var(--highlight-color, #00ffff);
    text-decoration: underline;
}
.manifesto-text a:hover {
    color: #fff;
}
.manifesto-text ul {
    margin: 0;
    padding-left: 20px;
}

.ending-layout {
    display: flex;
    gap: 30px;
    width: 100%;
    align-items: stretch; 
}

/* BAZOWA KLASA - tylko mechanika (DRY) */
.retro-panel {
    flex: 1; 
    max-height: 60vh;
    overflow-y: auto;
    padding: 25px;
    line-height: 1.8;
    text-align: left;
    
    scrollbar-width: thin;
    scrollbar-color: #555 #000;
}

.retro-panel::-webkit-scrollbar {
    width: 12px;
}
.retro-panel::-webkit-scrollbar-track {
    background: #000;
    border-left: 1px solid #333;
}
.retro-panel::-webkit-scrollbar-thumb {
    background: #555;
    border: 1px solid #333;
}

.panel-game {
    background: #000; 
    border: 2px solid #555;
    color: #eaeaea;
    font-size: 14px;

}


.panel-real-world {
    background: #0a0a0a;
    border: 1px dashed #888;
    color: #ccc;
}

.real-world-label {
    color: #ff4444;
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    border-bottom: 1px solid #ff4444;
    padding-bottom: 5px;
    margin-bottom: 20px;
    font-family: 'Pixelated MS Sans Serif', Arial, sans-serif; 
}

.manifesto-text {
    font-family: Arial, Helvetica, sans-serif; 
    font-size: 13px;
    line-height: 1.6;
}

.manifesto-text p {
    margin-top: 0;
    margin-bottom: 15px;
}
.manifesto-text a {
    color: #44aaff;
    text-decoration: underline;
}

.btn-restart, .btn-credits {
    margin-top: 35px;
    background: transparent;
    color: var(--highlight-color);
    border: 1px solid var(--highlight-color);
    padding: 12px 30px;
    font-family: 'Pixelated MS Sans Serif', Arial, sans-serif;
    font-size: 16px;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.btn-restart:hover,
.btn-credits:hover {
    background: var(--highlight-color);
    color: #000;
}

.window {
    max-width: 100vw; 

    max-height: calc(100vh - 40px) ; 
    
    display: flex;
    flex-direction: column;
}


.window-content {
    overflow: auto; 
    
    flex-grow: 1; 
}

#desktop {
    position: relative; 
    height: calc(100% - 35px);
    overflow: hidden;
}

.window {
    max-width: 100%;
    max-height: 100%; 
    
    display: flex;
    flex-direction: column;
}

.window-body {
    flex-grow: 1;
    overflow-y: auto;
    min-height: 0; 
}