:root {
    --desktop-teal: #008080;
    --window-border: #c0c0c0;
    --window-header: #000080;
    --window-bg: #ffffff;
    --icon-text: #ffffff;
    --vaporwave-purple: #9400d3;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: "Pixelated MS Sans Serif", Arial, sans-serif;
}

@font-face {
    font-family: "Pixelated MS Sans Serif";
    src: url("https://unpkg.com/98.css@0.1.16/dist/ms_sans_serif.woff")
        format("woff");
    font-weight: normal;
    font-style: normal;
}

body {
    background-color: var(--desktop-teal);
    height: 100vh;
    overflow: hidden;
    position: relative;
    cursor: default;
}

.wallpaper-image {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    height: auto;
    opacity: 0.7; /* Translucent */
    pointer-events: none; /* Allows clicking through the image */
    z-index: 0; /* Ensure it's behind all windows and icons */
}

.top-bar {
    height: 30px;
    background: linear-gradient(to right, #dcdcdc, #efefef);
    border-bottom: 1px solid #000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 10px;
    font-size: 12px;
    z-index: 1000;
    position: relative;
}

.start-button {
    background: linear-gradient(to right, #dcdcdc, #efefef);
    border: 1px outset #fff;
    padding: 2px 8px;
    font-weight: bold;
    cursor: pointer;
    height: 22px;
    margin-top: 2px;
    display: flex;
    align-items: center;
}

.time {
    border: 1px inset #fff;
    padding: 2px 8px;
    height: 22px;
    display: flex;
    align-items: center;
}

.desktop-icons {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: absolute;
    top: 60px;
    left: 20px;
    gap: 40px;
    z-index: 1;
}

.icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 120px;
    text-align: center;
    cursor: pointer;
}

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

.icon-text {
    color: var(--icon-text);
    text-shadow: 1px 1px 1px #000;
    font-size: 16px;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.window {
    position: absolute;
    background-color: var(--window-bg);
    border: 2px solid var(--window-border);
    box-shadow: 2px 2px 15px rgba(0, 0, 0, 0.2);
    min-width: 300px;
    min-height: 200px;
    resize: both;
    overflow: auto;
}

.window-header {
    background-color: var(--window-header);
    color: white;
    padding: 3px 8px;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: move;
}

.window-title {
    font-size: 12px;
}

.window-controls {
    display: flex;
}

.window-button {
    background-color: var(--window-border);
    border: 1px outset white;
    width: 16px;
    height: 16px;
    font-size: 12px;
    line-height: 14px;
    text-align: center;
    margin-left: 2px;
    cursor: pointer;
}

.window-content {
    padding: 10px;
    height: calc(100% - 25px);
    overflow: auto;
}

.window-purple {
    background-color: var(--vaporwave-purple);
    color: white;
    height: 100%;
    padding: 20px;
    font-family: Arial, sans-serif;
    line-height: 1.6;
}

.window-purple h2 {
    text-align: center;
    margin-bottom: 20px;
    font-size: 24px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.window-purple p {
    margin-bottom: 15px;
    font-size: 16px;
}

.more {
    position: absolute;
    bottom: 50px;
    right: 20px;
}

#window1 {
    top: 60px;
    left: 150px;
    width: 400px;
    height: 300px;
    z-index: 1;
}

#window2 {
    top: 160px;
    left: 350px;
    width: 450px;
    height: 300px;
    z-index: 2;
}

#window3 {
    top: 260px;
    left: 550px;
    width: 400px;
    height: 250px;
    z-index: 3;
}

#window4 {
    top: 50px;
    left: 150px;
    width: 800px;
    height: 650px;
    z-index: 4;
}

.tab-container {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.tabs {
    display: flex;
    background-color: var(--window-border);
    border-bottom: 1px solid #000;
}

.tab {
    padding: 5px 10px;
    border: 1px solid #000;
    border-bottom: none;
    margin-right: 2px;
    cursor: pointer;
    background-color: #d3d3d3;
    font-size: 12px;
}

.tab.active {
    background-color: #f0f0f0;
    position: relative;
    z-index: 1;
}

.tab-content {
    display: none;
    padding: 10px;
    background-color: #f0f0f0;
    flex-grow: 1;
    overflow: auto;
}

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

/* File Manager Styles */
.folder-view {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.folder-toolbar {
    height: 28px;
    background-color: #efefef;
    border-bottom: 1px solid #999;
    display: flex;
    align-items: center;
    padding: 0 10px;
}

.folder-toolbar button {
    margin-right: 10px;
    padding: 2px 10px;
    border: 1px solid #999;
    background-color: #ddd;
    cursor: pointer;
    font-size: 12px;
}

.folder-content {
    display: flex;
    flex-wrap: wrap;
    padding: 15px;
    align-content: flex-start;
    height: calc(100% - 28px);
    overflow: auto;
}

.folder-item {
    width: 100px;
    height: 100px;
    margin: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.folder-item:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.folder-item img {
    width: 48px;
    height: 48px;
    margin-bottom: 8px;
}

.folder-item-name {
    font-size: 12px;
    text-align: center;
    word-break: break-word;
    max-width: 100%;
}

.file-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    height: 100%;
}

.file-preview img {
    max-width: 90%;
    max-height: 80%;
    object-fit: contain;
}

.file-preview p {
    margin-top: 15px;
    font-size: 14px;
}

/* Game Styles */
#game-container {
    position: relative;
    width: 640px;
    height: 480px;
    background-color: #333;
    overflow: hidden;
    image-rendering: pixelated;
}

#game-room {
    width: 100%;
    height: 100%;
    background-color: #7a9e7e; /* Greenish floor color */
    position: relative;
}

#player {
    position: absolute;
    width: 32px;
    height: 48px;
    background-color: blue; /* Single color for character */
    z-index: 10;
    transition: transform 0.2s;
}

.wall {
    position: absolute;
    background-color: #654321; /* Brown */
}

.item {
    position: absolute;
    background-size: contain;
    background-repeat: no-repeat;
    transition:
        box-shadow 0.3s,
        filter 0.3s;
}

.interactable {
    box-shadow: 0 0 10px 3px yellow;
    filter: brightness(1.5);
}

.bookshelf {
    width: 64px;
    height: 64px;
    background-color: #8b4513;
}

.table {
    width: 48px;
    height: 32px;
    background-color: #a0522d;
}

.computer {
    width: 48px;
    height: 48px;
    background-color: #2f4f4f;
}

.bed {
    width: 64px;
    height: 96px;
    background-color: #8b0000;
}

.message-box {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px;
    font-size: 16px;
    display: none;
}

.controls {
    margin-top: 10px;
    text-align: center;
    color: black;
}

/* Blog Styles */
.blog-window {
    min-width: 600px;
    min-height: 400px;
}

.blog-content {
    padding: 20px;
    font-family: "Times New Roman", Times, serif;
    line-height: 1.6;
    overflow-y: auto;
    display: flex;
    justify-content: center; /* Center the text container */
}

/* This new container constrains the width of blog text */
.blog-text-container {
    max-width: 700px; /* Maximum width of text */
    width: 90%; /* Use percentage to allow some responsiveness */
    margin: 0 auto; /* Center horizontally */
}

.blog-date {
    font-style: italic;
    margin-bottom: 20px;
    color: #666;
    font-size: 14px;
    text-align: center; /* Center the date */
}

.blog-text {
    font-size: 16px;
    text-align: left; /* Keep text content left-aligned for readability */
    padding-bottom: 100px;
}

.blog-text h1,
.blog-text h2 {
    color: #000080;
    margin-top: 20px;
    margin-bottom: 10px;
    text-align: center; /* Center headings */
}

.blog-text h1 {
    font-size: 24px;
    border-bottom: 1px solid #ccc;
    padding-bottom: 5px;
}

.blog-text h2 {
    font-size: 20px;
}

.blog-text h3 {
    font-size: 18px;
    margin-top: 15px;
    margin-bottom: 10px;
    text-align: center; /* Center headings */
}

.blog-text p {
    margin-bottom: 16px;
}

.blog-text img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 20px auto;
    border: 1px solid #ddd;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.1);
}

.blog-text a {
    color: #0000ee;
    text-decoration: underline;
}

.blog-text ul,
.blog-text ol {
    margin-left: 20px;
    margin-bottom: 16px;
}

.blog-text li {
    margin-bottom: 5px;
}

.blog-text blockquote {
    border-left: 3px solid #ccc;
    padding-left: 15px;
    color: #555;
    font-style: italic;
    margin: 16px 0;
}

.blog-text code {
    font-family: monospace;
    background-color: #f0f0f0;
    padding: 2px 4px;
    border-radius: 3px;
}

.blog-text pre {
    background-color: #f0f0f0;
    padding: 10px;
    border-radius: 5px;
    overflow-x: auto;
    margin-bottom: 16px;
}
