* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none;
}

a{
    text-decoration: none;
}

:root {
    --vh: 100vh;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-image: url('xp-wallpaper.jpg');
    background-size: cover;
    height: var(--vh);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
}

.desktop {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    height: 100%;
}


.icons {
    position: absolute;
    top: 50px;
    left: 50px;
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2 columns */
    grid-gap: 20px; /* Adjusts spacing between icons */
}

.icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
}

.icon img {
    width: 56px;
    height: 56px;
}

.icon span {
    color: white;
    text-shadow: 1px 1px 2px black;
    margin-top: 5px;
}

.taskbar {
    background-color: rgb(9, 90, 248);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    height: 40px;
    border-top: 2px solid #c0c0c0;
    box-shadow: 0px -2px 8px rgba(0, 0, 0, 0.5) inset; /* Add this line */
}

.start-button {
    display: flex;
    align-items: center;
    background-color: rgb(58, 153, 64);
    padding: 5px;
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
    cursor: pointer;
    margin: 0;
    padding: 0.55rem;
    margin-left: -10px;
    box-shadow: 0px -2px 8px rgba(0, 0, 0, 0.5) inset; /* Add this line */

}

.start-button img {
    width: 20px;
    height: 20px;
}

.start-button span {
    color: white;
    margin-left: 5px;
}

.taskbar-clock {
    color: white;
    font-size: 14px;
}

/* Start Menu Modal styling */
.start-menu {
    position: absolute;
    bottom: 41px;
    left: 0px;
    width: 250px;
    background-color: #f0f0f0;
    border: 1px solid #c0c0c0;
    box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
    display: none; /* Hidden by default */
    z-index: 100;
}

.start-menu-header {
    background-color: #1e3b6d;
    color: white;
    padding: 10px;
    font-size: 16px;
}

.start-menu-content {
    padding: 10px;
}

.start-menu-content ul {
    list-style: none;
}

.start-menu-content li {
    padding: 8px 0;
    cursor: pointer;
}

.start-menu-content li:hover {
    background-color: #d0e0ff;
}

/* Notepad Modal styling */
.notepad-modal {
    position: fixed;
    top: 10%;
    left: 25%;
    width: 50%;
    height: 400px;
    background-color: #f0f0f0;
    border: 2px solid #c0c0c0;
    display: none;
    z-index: 1002;
    box-shadow: 2px 2px 12px rgba(0, 0, 0, 0.5);
}

/* Window Title Bar */
.modal-content {
    position: relative;
    width: 100%;
    height: 100%;
    background-color: white;
    border: 1px solid #c0c0c0;
    display: flex;
    flex-direction: column;
    font-family: Tahoma, sans-serif;
}

.modal-header {
    background-color: #1e3b6d;
    color: white;
    padding: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 14px;
    padding-left: 10px;
}

.close-notepad {
    background-color: #ff0000;
    color: white;
    border: none;
    width: 25px;
    height: 25px;
    font-size: 16px;
    cursor: pointer;
    margin-right: 5px;
    text-align: center;
}

.close-notepad:hover {
    background-color: #cc0000;
}

/* Notepad textarea styling */
.modal-body {
    padding: 10px;
    flex: 1;
}

.modal-content textarea {
    width: 100%;
    height: 85%;
    border: 1px solid #c0c0c0;
    background-color: #ffffff;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    padding: 10px;
    box-sizing: border-box;
    resize: none;
}

#notepad-textarea{
    width: 100%;
    height: 100%;
    border: 1px solid #c0c0c0;
    background-color: #ffffff;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    padding: 10px;
    box-sizing: border-box;
    resize: none;
}

.pinball-body{
    min-height: 31rem;
    min-width: 40rem;
}

.pinball-container{
    min-height: 33rem;
    min-width: 42rem;
}

#rover{
    position: absolute;
    bottom: 2rem;
    right: -0rem;
    transform: scale(1);
}

/*merc hidden off screen*/
#merc{
    position: absolute;
    bottom: 0rem;
    left: 5rem;
    display: none;
    z-index: 99999;
}

/* Internet Explorer Modal styling */
.internet-explorer-modal {
    position: fixed;
    top: 15%;
    left: 20%;
    width: 60%;
    height: 70%;
    background-color: #fff;
    border: 2px solid #c0c0c0;
    display: none;
    z-index: 103;
    box-shadow: 2px 2px 12px rgba(0, 0, 0, 0.5);
}

.internet-explorer-modal .modal-header {
    background-color: #1e3b6d;
    color: white;
    padding: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.internet-explorer-modal .modal-header h2 {
    margin: 0;
    font-size: 14px;
    padding-left: 10px;
}

.internet-explorer-modal .close-ie {
    background-color: #ff0000;
    color: white;
    border: none;
    width: 25px;
    height: 25px;
    font-size: 16px;
    cursor: pointer;
    margin-right: 5px;
    text-align: center;
}

/* URL Bar Styling */
.url-bar {
    display: flex;
    justify-content: start;
    padding: 5px;
    background-color: #f1f1f1;
    border-bottom: 1px solid #c0c0c0;
}

#url-input {
    flex: 1;
    padding: 5px;
    font-size: 14px;
    border: 1px solid #c0c0c0;
}

#go-button {
    padding: 5px 10px;
    background-color: #1e3b6d;
    color: white;
    border: none;
    cursor: pointer;
}

/* Authentic Windows XP-style Bookmark Bar */
.bookmark-bar {
    display: flex;
    justify-content: start;
    padding: 5px;
    background-color: #ececec;
    border-bottom: 1px solid #c0c0c0;
    border-top: 1px solid #ffffff;
}

/* Individual Bookmark Buttons Styled for XP */
.bookmark {
    margin-right: 10px;
    padding: 5px 15px;
    background: linear-gradient(to bottom, #ffffff, #d9d9d9);
    border: 1px solid #9f9f9f;
    font-family: Tahoma, sans-serif;
    font-size: 12px;
    color: black;
    cursor: pointer;
    box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    text-align: center;
    border-radius: 2px;
}

.bookmark:hover {
    background: linear-gradient(to bottom, #d9d9d9, #ffffff);
    border: 1px solid #7a7a7a;
}

.bookmark:active {
    background: linear-gradient(to bottom, #cfcfcf, #a6a6a6);
    box-shadow: inset 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* Chat Modal styling */
.chat-modal {
    position: fixed;
    top: 15%;
    left: 30%;
    width: 60%;
    height: 80%;
    background-color: #fff;
    border: 2px solid #c0c0c0;
    display: none;
    z-index: 104;
    box-shadow: 2px 2px 12px rgba(0, 0, 0, 0.5);
}

.chat-modal .modal-header {
    background-color: #1e3b6d;
    color: white;
    padding: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-modal .modal-header h2 {
    margin: 0;
    font-size: 14px;
    padding-left: 10px;
}

.chat-modal .close-chat {
    background-color: #ff0000;
    color: white;
    border: none;
    width: 25px;
    height: 25px;
    font-size: 16px;
    cursor: pointer;
    margin-right: 5px;
    text-align: center;
}

.chat-modal .close-chat:hover {
    background-color: #cc0000;
}

.chat-modal .modal-body {
    padding: 10px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 90%;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    border: 1px solid #c0c0c0;
    padding: 10px;
    margin-bottom: 10px;
    background-color: #f0f0f0;
    font-family: 'Courier New', monospace;
    font-size: 14px;
}

#chat-controls{
    display: flex; 
    justify-content: space-between;
}

#chat-input {
    padding: 10px;
    font-size: 14px;
    width: 100%;
    margin-right: 10px;
    flex: 8; 
    margin-right: 5px;
}

.send-button {
    padding: 10px;
    font-size: 14px;
    background-color: #1e3b6d;
    color: white;
    border: none;
    cursor: pointer;
    flex: 1; 
    margin-right: 5px;
}

.send-button:hover {
    background-color: #15325b;
}

/* ASCII Emoji Modal styling */
.emoji-modal {
    position: fixed;
    top: 20%;
    left: 35%;
    width: wrap-content;
    max-width: 20rem;
    background-color: #fff;
    border: 2px solid #c0c0c0;
    display: none;
    z-index: 105;
    box-shadow: 2px 2px 12px rgba(0, 0, 0, 0.5);
    overflow-y: auto; /* Enable vertical scrolling */

}

.emoji-modal .modal-header {
    background-color: #1e3b6d;
    color: white;
    padding: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Modal body with flexbox for even spacing */
.emoji-modal .modal-body {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between; /* Spread emojis evenly */
    justify-content: center; /* Center horizontally */
    align-items: center; /* Center vertically */
    padding: 10px;
}


.emoji-item {
    font-size: 20px;
    cursor: pointer;
    padding: 10px;
    margin: 5px;
    border: 1px solid #c0c0c0;
    border-radius: 4px;
    background-color: #fff;
    white-space: nowrap; /* Prevent line breaks */
    text-align: center; /* Center the emoji text */
    display: inline-block; /* Prevent line breaks */
}

.emoji-item:hover {
    background-color: #f0f0f0;
}

@media (max-width: 768px) {
    .notepad-modal, 
    .chat-modal, 
    .internet-explorer-modal, 
    .emoji-modal, 
    .iframe-modal {
        top: 0;
        left: 0;
        width: 100vw;
        height: var(--vh);
        border: none; /* Optional: Remove borders for a cleaner fullscreen look */
        box-shadow: none; /* Remove shadow to make it fullscreen */
    }

    .modal-content {
        height: var(--vh);
        width: 100%;
        flex-direction: column;
    }

    .modal-body {
        height: calc(100% - 50px); /* Adjusting based on header height */
    }

    .modal-header {
        padding: 10px;
        font-size: 16px;
    }

    .emoji-modal .modal-body {
        height: fit-content; /* Adjusting based on header height */
    }

    .emoji-modal {
        position: absolute;
        transform: translate(-80%, 12%);
        width: 80vw;
        height: 80%;
    }
}

.chat-text {
    color: #000;
    font-size: 14px;
    font-family: 'arial';
}