/* Import the pixel font - Assuming PressStart2P-Regular.woff2 is in the SAME (root) folder */
@font-face {
    font-family: 'Press Start 2P';
    src: url('PressStart2P-Regular.woff2') format('woff2'),
         url('PressStart2P-Regular.ttf') format('truetype'); /* Fallback if you also have the TTF */
    font-weight: normal;
    font-style: normal;
}

body {
    font-family: 'Press Start 2P', cursive;
    margin: 0;
    padding: 20px;
    font-size: 10px;
    line-height: 1.6;
    image-rendering: pixelated;
    -ms-interpolation-mode: nearest-neighbor;
    overflow-x: hidden;
    transition: background-color 0.3s, color 0.3s; /* Smooth theme transition */
}

.night-theme {
    background-color: #000000;
    color: #FFFFFF;
}

.day-theme {
    background-color: #E0E0E0;
    color: #000000;
}

#theme-switcher {
    position: fixed;
    top: 10px;
    right: 10px;
    background: none;
    border: 1px solid;
    padding: 5px 8px;
    cursor: pointer;
    font-size: 12px;
    z-index: 1000; /* Ensure it's on top */
}
.night-theme #theme-switcher { border-color: #FFFFFF; color: #FFFFFF; }
.day-theme #theme-switcher { border-color: #000000; color: #000000; }
.night-theme #theme-switcher .icon-sun { display: none; }
.night-theme #theme-switcher .icon-moon { display: inline; }
.day-theme #theme-switcher .icon-sun { display: inline; }
.day-theme #theme-switcher .icon-moon { display: none; }


#desktop {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    align-items: flex-start;
    padding-top: 40px; /* Space for theme switcher */
}

.window {
    border: 2px solid;
    min-width: 280px;
    max-width: 500px;
    box-shadow: 4px 4px 0px 0px currentColor;
    margin-bottom: 20px;
    background-color: inherit; /* Inherit from body theme for content area */
}
.night-theme .window { border-color: #FFFFFF; }
.day-theme .window { border-color: #000000; }

.title-bar {
    padding: 5px 8px;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none; /* Prevent text selection on title bar */
}
.night-theme .title-bar { background-color: #FFFFFF; color: #000000; }
.day-theme .title-bar { background-color: #000000; color: #FFFFFF; }

.window-button.close-button {
    cursor: pointer;
    padding: 0 4px; /* Slightly more padding */
    font-size: 10px; /* Match body font size */
}
.night-theme .window-button.close-button:hover { background-color: #cc0000; color: #FFFFFF; }
.day-theme .window-button.close-button:hover { background-color: #ff3333; color: #000000; }


.window-content {
    padding: 15px;
}
.window-content p {
    margin-top: 0;
    margin-bottom: 1em;
}
.window-content pre {
    white-space: pre-wrap;
    word-wrap: break-word;
    margin-bottom: 1em;
    min-height: 70px; /* Give space for typed text */
}
.window-content ul {
    list-style: none;
    padding-left: 0;
}
.window-content ul li {
    margin-bottom: 0.5em;
    cursor: default;
}
.night-theme .window-content ul li:hover { background-color: #222222; }
.day-theme .window-content ul li:hover { background-color: #cccccc; }

.action-button {
    font-family: inherit;
    font-size: inherit;
    padding: 8px 12px;
    border: 2px solid;
    background-color: transparent; /* Explicitly transparent */
    cursor: pointer;
    display: inline-block;
    margin-top: 10px;
    text-decoration: none;
    text-align: center;
}
.night-theme .action-button { border-color: #FFFFFF; color: #FFFFFF; }
.day-theme .action-button { border-color: #000000; color: #000000; }

.night-theme .action-button:hover { background-color: #FFFFFF; color: #000000; }
.day-theme .action-button:hover { background-color: #000000; color: #FFFFFF; }

.pixel-art-placeholder {
    width: 100px;
    height: 50px;
    /* border: 1px dashed; -- Border removed */
    margin: 10px auto;
    font-size: 8px; /* Font size for the matrix characters */
    overflow: hidden; /* Clip content that might overflow */
    /* padding: 2px; -- Padding removed for edge-to-edge text */
    box-sizing: border-box;
    line-height: 1.1; /* Tighter line height for matrix text, relative to font-size */
}
/* Border color rules removed as border is removed */
/* .night-theme .pixel-art-placeholder { border-color: #555555; } */
/* .day-theme .pixel-art-placeholder { border-color: #999999; } */
/* The text color inside will be inherited from the theme (body color) */

.footer-note {
    text-align: center;
    font-size: 8px;
    margin-top: 40px;
    opacity: 0.7;
}
.night-theme .footer-note { color: #777777; }
.day-theme .footer-note { color: #555555; }


@media (max-width: 768px) {
    body {
        padding: 10px;
        font-size: 9px; /* Slightly smaller on mobile */
    }
    #desktop {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    .window {
        width: 90%;
        max-width: 350px; /* Adjust max width for smaller screens */
    }
    #theme-switcher {
        padding: 4px 6px;
        font-size: 10px;
    }
}