/* Windows 95 CSS Theme */
:root {
    --win-gray: #c0c0c0;
    --win-dark-gray: #808080;
    --win-light-white: #ffffff;
    --win-black: #000000;
    --win-blue: #000080;
    --desktop-teal: #008080;
}

@font-face {
    font-family: 'PixelSans';
    src: local('MS Sans Serif'), local('Tahoma'), sans-serif;
}

body {
    background-color: var(--desktop-teal);
    font-family: 'PixelSans', 'Segoe UI', Tahoma, sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow: hidden;
    position: relative;
    /* Cool retro grid pattern */
    background-image: radial-gradient(#000 1px, transparent 1px);
    background-size: 4px 4px;
}

/* Window Frame */
.window {
    background-color: var(--win-gray);
    width: 800px;
    max-width: 95%;
    height: 600px;
    max-height: 90vh;
    border-top: 2px solid var(--win-light-white);
    border-left: 2px solid var(--win-light-white);
    border-right: 2px solid var(--win-black);
    border-bottom: 2px solid var(--win-black);
    box-shadow: 4px 4px 10px rgba(0,0,0,0.5); /* Enhanced shadow */
    display: flex;
    flex-direction: column;
    
    /* Centering & Positioning for Dragging */
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Title Bar */
.title-bar {
    background-color: var(--win-blue);
    padding: 3px 2px 3px 3px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 2px;
    cursor: default;
    user-select: none;
}

.title-bar:hover {
    cursor: grab;
}

.title-bar:active {
    cursor: grabbing;
}

.title-bar-text {
    color: white;
    font-weight: bold;
    font-size: 14px;
    margin-left: 4px;
    letter-spacing: 0.5px;
}

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

.control-btn {
    width: 16px;
    height: 14px;
    background-color: var(--win-gray);
    border-top: 1px solid var(--win-light-white);
    border-left: 1px solid var(--win-light-white);
    border-right: 1px solid var(--win-black);
    border-bottom: 1px solid var(--win-black);
    font-size: 10px;
    line-height: 12px;
    text-align: center;
    font-weight: bold;
    cursor: pointer;
}

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

.close-btn {
    margin-left: 2px;
}

/* Menu Bar */
.menu-bar {
    display: flex;
    padding: 2px 6px;
    border-bottom: 1px solid var(--win-dark-gray);
    margin-bottom: 1px;
    user-select: none;
}

.menu-item {
    margin-right: 12px;
    cursor: pointer;
}

.menu-item::first-letter {
    text-decoration: underline;
}

.menu-item:hover {
    background-color: var(--win-blue);
    color: white;
}

/* Main Content Area */
.window-body {
    flex: 1;
    padding: 10px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Tabs */
.tabs {
    display: flex;
    margin-bottom: -2px;
    padding-left: 5px;
    user-select: none;
}

.tab {
    padding: 4px 12px;
    margin-right: 2px;
    background-color: var(--win-gray);
    border-top: 2px solid var(--win-light-white);
    border-left: 2px solid var(--win-light-white);
    border-right: 2px solid var(--win-black);
    border-bottom: 2px solid var(--win-gray);
    border-top-left-radius: 3px;
    border-top-right-radius: 3px;
    cursor: pointer;
    position: relative;
    top: 0;
}

.tab.active {
    font-weight: bold;
    z-index: 2;
    top: -2px;
    padding-top: 6px;
    border-bottom: 2px solid var(--win-gray);
}

.tab:not(.active) {
    border-bottom: 2px solid var(--win-light-white);
}

.tab a {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* Content Box */
.content-box {
    flex: 1;
    background-color: var(--win-gray);
    border-top: 2px solid var(--win-light-white);
    border-left: 2px solid var(--win-light-white);
    border-right: 2px solid var(--win-black);
    border-bottom: 2px solid var(--win-black);
    padding: 20px;
    overflow-y: auto;
    position: relative;
    z-index: 1;
}

/* Typography & Elements */
h1 {
    font-size: 24px;
    margin-top: 0;
    margin-bottom: 15px;
}

h2 {
    font-size: 18px;
    border-bottom: 1px solid var(--win-dark-gray);
    padding-bottom: 5px;
    margin-top: 20px;
}

p {
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 15px;
}

code {
    font-family: 'Courier New', Courier, monospace;
    background-color: var(--win-light-white);
    border: 1px solid var(--win-dark-gray);
    padding: 2px 4px;
    font-size: 13px;
}

pre {
    background-color: var(--win-black);
    color: var(--win-light-white);
    padding: 10px;
    border: 2px inset;
    overflow-x: auto;
    font-family: 'Courier New', Courier, monospace;
}

a {
    color: blue;
}

ul {
    padding-left: 20px;
}

li {
    margin-bottom: 5px;
}

/* Button Style */
.btn {
    background-color: var(--win-gray);
    border-top: 2px solid var(--win-light-white);
    border-left: 2px solid var(--win-light-white);
    border-right: 2px solid var(--win-black);
    border-bottom: 2px solid var(--win-black);
    padding: 6px 20px;
    text-decoration: none;
    color: black;
    font-size: 13px;
    cursor: pointer;
    display: inline-block;
}

.btn:active {
    border-top: 2px solid var(--win-black);
    border-left: 2px solid var(--win-black);
    border-right: 2px solid var(--win-light-white);
    border-bottom: 2px solid var(--win-light-white);
    transform: translate(1px, 1px);
}

/* Sections */
.section {
    display: none;
}
.section.active {
    display: block;
    animation: fadeIn 0.2s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Footer Status Bar */
.status-bar {
    border-top: 1px solid var(--win-dark-gray);
    padding: 4px;
    font-size: 12px;
    display: flex;
    gap: 10px;
    background-color: var(--win-gray);
    margin: 2px;
    border-top: 1px solid var(--win-dark-gray);
    border-left: 1px solid var(--win-dark-gray);
    border-right: 1px solid var(--win-light-white);
    border-bottom: 1px solid var(--win-light-white);
}

.status-panel {
    border: 1px inset;
    padding: 2px 5px;
    flex: 1;
}

.status-panel.small {
    flex: 0 0 100px;
}

/* Start Menu & Button */
.start-btn {
    font-weight: bold;
    padding: 2px 10px;
    border-top: 2px solid var(--win-light-white);
    border-left: 2px solid var(--win-light-white);
    border-right: 2px solid var(--win-black);
    border-bottom: 2px solid var(--win-black);
    cursor: pointer;
    margin-right: 5px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.start-btn:active, .start-btn.active {
    border-top: 2px solid var(--win-black);
    border-left: 2px solid var(--win-black);
    border-right: 2px solid var(--win-light-white);
    border-bottom: 2px solid var(--win-light-white);
    background-color: #e0e0e0;
}

.start-menu {
    position: absolute;
    bottom: 32px; /* Height of status bar + borders */
    left: 4px;
    width: 160px;
    background-color: var(--win-gray);
    border-top: 2px solid var(--win-light-white);
    border-left: 2px solid var(--win-light-white);
    border-right: 2px solid var(--win-black);
    border-bottom: 2px solid var(--win-black);
    display: none;
    flex-direction: column;
    z-index: 100;
    padding: 2px;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.5);
}

.start-menu.visible {
    display: flex;
}

.start-item {
    padding: 6px 10px;
    cursor: pointer;
    display: block;
    text-decoration: none;
    color: black;
    font-size: 13px;
}

.start-item:hover {
    background-color: var(--win-blue);
    color: white;
}

/* Mobile Friendly Query */
@media (max-width: 768px) {
    .window {
        width: 100% !important;
        height: 100% !important;
        max-width: 100% !important;
        max-height: 100% !important;
        top: 0 !important;
        left: 0 !important;
        transform: none !important;
        border: none;
        box-shadow: none;
    }
    
    .title-bar {
        cursor: default; /* Disable drag cursor on mobile */
    }
    
    body {
        background-image: none; /* Save performance */
    }
}
