/* Windows XP Style Sheet */

body {
    background-color: #004E98; /* XP Default Blue Desktop */
    /* Optional: Bliss wallpaper feel via gradient */
    /* background: linear-gradient(to bottom, #6ea3e9 0%, #387dcd 100%); */
    font-family: "Tahoma", "Verdana", sans-serif;
    color: #000;
    margin: 0;
    padding: 20px;
    padding-bottom: 50px; /* Space for Taskbar */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-sizing: border-box;
}

a {
    color: #0066CC;
    text-decoration: underline;
    cursor: pointer;
}

a:hover {
    color: #FF6600;
}

/* The Main Window Wrapper Logic */
/* Since header/content/footer are siblings, we style them to look like a stack */

/* Common Container Width */
.header-container, .content, .footer-container {
    width: 100%;
    max-width: 900px;
    box-sizing: border-box;
    background-color: #ECE9D8; /* XP Dialog/Window Background */
    border-left: 4px solid #0055EA;
    border-right: 4px solid #0055EA;
}

/* Header - Top of the Window */
.header-container {
    border-top: 4px solid #0055EA;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    padding: 0;
    box-shadow: 5px 5px 15px rgba(0,0,0,0.5);
    position: relative;
}

/* Window Status Bar (part of the window) */
.window-status-bar {
    border-bottom: 4px solid #0055EA;
    border-bottom-left-radius: 0; 
    border-bottom-right-radius: 0;
    padding: 2px 5px;
    box-shadow: 5px 5px 15px rgba(0,0,0,0.5);
    font-size: 11px;
    border-top: 1px solid #ACA899;
    background-color: #ECE9D8;
    display: flex;
    gap: 10px;
}

/* Main Content Area - The "Web Page" inside the window */
.content {
    background-color: #FFF;
    padding: 20px;
    min-height: 500px;
    border-left: 4px solid #0055EA;
    border-right: 4px solid #0055EA;
    box-shadow: 5px 0px 15px rgba(0,0,0,0.5); /* Shadow persistence */
    /* Inner inset look */
    border: 1px solid #ACA899; /* Override the blue border for the inner part? No */
    /* Wait, the .content IS the middle sibling. */
    /* Let's fix the border logic. */
    /* We need a wrapper really, but we can fake it. */
    margin: 0;
}

/* Refined Border Logic to visually merge */
/* Apply the blue border to a wrapper if possible, but we can't. */
/* So we apply it to each part. */

[data-include] {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
}

/* Header Component Styles */
.title-bar {
    background: linear-gradient(to bottom, #0058EE 0%, #3593FF 4%, #2884F9 50%, #1273E5 51%, #1169DB 100%);
    padding: 6px 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
    color: white;
    font-weight: bold;
    text-shadow: 1px 1px 0px rgba(0,0,0,0.5);
    font-size: 13px;
}

.title-bar-icon {
    width: 16px;
    height: 16px;
    margin-right: 5px;
    vertical-align: middle;
    /* background-color: #FFF;  Removed placeholder */
    border-radius: 2px;
    display: inline-block;
}

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

.control-btn {
    width: 21px;
    height: 21px;
    border: 1px solid #FFF;
    border-radius: 3px;
    background: linear-gradient(to bottom, #D74545 0%, #C22E2E 100%); /* Close Red */
    color: white;
    font-family: sans-serif;
    font-size: 10px;
    text-align: center;
    line-height: 21px;
    cursor: default;
    box-shadow: inset 1px 1px 0px rgba(255,255,255,0.3);
}

.control-btn.min, .control-btn.max {
    background: linear-gradient(to bottom, #2884F9 0%, #1169DB 100%);
    opacity: 0.7;
}

.menu-bar {
    background-color: #ECE9D8;
    padding: 2px 10px;
    border-bottom: 1px solid #ACA899;
    font-size: 11px;
    position: relative; /* For dropdown positioning */
    z-index: 200;
}

.menu-item {
    display: inline-block;
    padding: 2px 8px;
    color: #000;
    cursor: default;
    position: relative;
}

.menu-item:hover, .menu-item.active {
    background-color: #316AC5;
    color: white;
}

/* Dropdown Menu Styles */
.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #FFF;
    border: 1px solid #ACA899;
    box-shadow: 2px 2px 2px rgba(0,0,0,0.2);
    min-width: 150px;
    z-index: 300;
    padding: 2px;
}

.menu-item:hover .dropdown-menu {
    /* Standard hover behavior? Or click? XP required click usually, but hover works for web.
       User asked for "actual menu". Click is more "app-like".
       I will use JS to toggle 'active' class which shows it.
    */
}

.dropdown-menu.show {
    display: block;
}

.dropdown-item {
    padding: 3px 20px;
    color: #000;
    cursor: default;
    white-space: nowrap;
}

.dropdown-item:hover {
    background-color: #316AC5;
    color: white;
}

.dropdown-separator {
    height: 1px;
    background-color: #ACA899;
    margin: 2px 5px;
}

.toolbar {
    background-color: #ECE9D8;
    padding: 5px 10px;
    border-bottom: 1px solid #ACA899;
    display: flex;
    gap: 10px;
    align-items: center;
}

.toolbar-btn {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 5px;
    padding: 2px 5px;
    border: 1px solid transparent;
    cursor: pointer;
    font-size: 11px;
    color: #000;
    text-decoration: none;
}

.toolbar-btn:hover {
    border: 1px solid #ACA899;
    background-color: #F1EFE2;
    box-shadow: inset 0 0 2px #FFF;
}

.toolbar-icon {
    width: 24px;
    height: 24px;
    background-color: #DDD; /* Placeholder */
    border-radius: 50%;
}

.address-bar-row {
    background-color: #ECE9D8;
    padding: 2px 10px 5px 10px;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    border-bottom: 1px solid #D4D0C8;
}

.address-label {
    color: #666;
}

.address-input {
    flex-grow: 1;
    border: 1px solid #7F9DB9;
    padding: 2px 5px;
    font-family: "Tahoma", sans-serif;
    font-size: 11px;
}

.go-btn {
    display: flex;
    align-items: center;
    padding: 1px 5px;
    background-color: #3F9C35; /* XP Green */
    color: white;
    border: 1px solid #3F9C35;
    border-radius: 2px;
    cursor: pointer;
}

/* Content Styling */
.content {
    /* Reset the previous container style */
    width: 100%; 
    max-width: 900px;
    background-color: #FFF;
    border-left: 4px solid #0055EA;
    border-right: 4px solid #0055EA;
    /* Wait, I need to ensure the header/footer match this width exactly */
    margin: 0 auto;
    padding: 20px;
}

.post {
    border: 1px solid #D4D0C8;
    padding: 15px;
    margin-bottom: 15px;
    background: #F9F9F9;
}

.post h2 {
    font-size: 1.2em;
    color: #003399;
    margin-top: 0;
    border-bottom: 1px solid #D4D0C8;
    padding-bottom: 5px;
}

.date {
    font-size: 10px;
    color: #666;
}

.status-item {
    border: 1px solid #ACA899; /* Inset look */
    border-right: 1px solid white;
    border-bottom: 1px solid white;
    background-color: #ECE9D8;
    padding: 2px 5px;
    flex-grow: 1;
}

/* XP Button Style */
.xp-button {
    background: #f1f1f1;
    border: 1px solid #003c74;
    border-radius: 3px;
    color: #000;
    padding: 5px 15px;
    text-decoration: none;
    display: inline-block;
    font-family: "Tahoma", sans-serif;
    font-size: 11px;
    background: linear-gradient(to bottom, #fff 0%, #ece9d8 100%);
}

.xp-button:hover {
    box-shadow: 0 0 3px #FDC066;
    border-color: #FDC066;
}

/* Sidebar / Explorer Bar (Optional for articles layout) */
.sidebar {
    background-color: #7ba2e7; /* Explorer Bar Blue */
    background: linear-gradient(to right, #7ba2e7 0%, #6375d6 100%);
    color: white;
    padding: 10px;
    width: 200px;
    border-radius: 5px;
    margin-right: 20px;
}

/* File Grid System for Index */
.file-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 10px;
}

.file-item {
    width: 90px;
    text-align: center;
    padding: 5px;
    border: 1px solid transparent;
    border-radius: 3px;
}

.file-item:hover {
    background-color: #C1D2EE; /* XP Selection Blue Hover */
    border: 1px solid #316AC5;
    cursor: pointer;
}

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

.file-icon {
    width: 32px;
    height: 40px;
    background-color: #fff;
    border: 1px solid #999;
    margin: 0 auto 5px auto;
    position: relative;
    box-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

/* Simulated text lines on icon */
.file-icon::before {
    content: "";
    position: absolute;
    top: 10px;
    left: 5px;
    right: 5px;
    height: 2px;
    background: #ccc;
    box-shadow: 0 4px 0 #ccc, 0 8px 0 #ccc, 0 12px 0 #ccc;
}

.folder-icon {
    width: 48px;
    height: 40px;
    background: #FFE68E; /* Folder Yellow */
    border: 1px solid #D69C2F;
    border-radius: 2px;
    margin: 0 auto 5px auto;
    position: relative;
    box-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

/* Folder Tab */
.folder-icon::before {
    content: "";
    position: absolute;
    top: -4px;
    left: 0;
    width: 20px;
    height: 6px;
    background: #FFE68E;
    border-top: 1px solid #D69C2F;
    border-left: 1px solid #D69C2F;
    border-right: 1px solid #D69C2F;
    border-radius: 2px 2px 0 0;
}

/* Open Folder Effect */
.folder-icon::after {
    content: "";
    position: absolute;
    top: 5px;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, #FFF5CC, #FFE68E);
    border-top: 1px solid #fff;
}

.file-name {
    font-size: 11px;
    color: #000;
    word-wrap: break-word;
    line-height: 1.2;
}

/* Custom Context Menu */
.xp-context-menu {
    display: none;
    position: absolute;
    z-index: 1000;
    width: 150px;
    background-color: #FFF;
    border: 1px solid #ACA899;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.2);
    padding: 2px;
}

.xp-context-menu-item {
    padding: 3px 20px;
    font-size: 11px;
    cursor: default;
    color: #000;
}

.xp-context-menu-item:hover {
    background-color: #316AC5;
    color: white;
}

.xp-separator {
    height: 1px;
    background-color: #ACA899;
    margin: 2px 5px;
}

/* Modal Dialog Styles */
.xp-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.1);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.xp-window-modal {
    background-color: #ECE9D8;
    border: 1px solid #0055EA;
    box-shadow: 5px 5px 15px rgba(0,0,0,0.5);
    min-width: 300px;
    border-radius: 3px;
    font-family: "Tahoma", sans-serif;
    font-size: 11px;
}

.xp-modal-title-bar {
    background: linear-gradient(to bottom, #0058EE 0%, #1169DB 100%);
    color: white;
    padding: 5px;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.xp-modal-close {
    background: #D74545;
    color: white;
    border: 1px solid #FFF;
    width: 16px;
    height: 16px;
    line-height: 16px;
    text-align: center;
    font-size: 10px;
    cursor: pointer;
    border-radius: 2px;
}

.xp-modal-content {
    padding: 15px;
}

.xp-modal-buttons {
    display: flex;
    justify-content: flex-end;
    padding: 10px;
    gap: 5px;
}

/* XP Taskbar Styles */
.xp-taskbar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 30px;
    background: linear-gradient(to bottom, #245EDC 0%, #3E81FD 10%, #2255D5 30%, #2255D5 100%);
    border-top: 1px solid #3672F5;
    display: flex;
    align-items: center;
    z-index: 9999;
    font-family: "Tahoma", sans-serif;
    box-shadow: 0 -1px 3px rgba(0,0,0,0.2);
}

.xp-start-btn {
    width: 90px;
    height: 100%;
    background: linear-gradient(to bottom, #3C8D31 0%, #43B535 100%);
    border-radius: 0 15px 15px 0;
    color: white;
    font-weight: bold;
    font-style: italic;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 1px 3px rgba(255,255,255,0.5);
    cursor: pointer;
    margin-right: 10px;
    text-shadow: 1px 1px 1px rgba(0,0,0,0.5);
}

.xp-start-icon {
    background: white; /* Windows Logo Placeholder */
    width: 18px;
    height: 18px;
    border-radius: 50%;
    margin-right: 5px;
    font-style: normal;
    text-align: center;
    line-height: 18px;
    color: #000;
    font-size: 12px;
    box-shadow: 0 0 2px rgba(0,0,0,0.3);
}

.xp-task-list {
    display: flex;
    gap: 2px;
    flex-grow: 1;
}

.xp-task {
    background: linear-gradient(to bottom, #3E81FD 0%, #2255D5 100%);
    color: white;
    padding: 5px 15px;
    border-radius: 2px;
    width: 150px;
    font-size: 11px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-shadow: inset 0 0 2px rgba(255,255,255,0.3);
    cursor: default;
    border: 1px solid #173D96;
    background-color: #1F4FBF; /* Active/Pressed look */
    box-shadow: inset 2px 2px 2px rgba(0,0,0,0.3); /* Pressed in */
    display: flex;
    align-items: center;
    gap: 5px;
}

.xp-task-icon {
    width: 16px;
    height: 16px;
}

.xp-tray {
    background: #0B76E0;
    border-left: 1px solid #122F77;
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0 10px;
    color: white;
    font-size: 11px;
    gap: 10px;
    box-shadow: inset 2px 2px 2px rgba(0,0,0,0.2);
    min-width: 100px;
    justify-content: flex-end;
}

.xp-tray-icon {
    width: 16px;
    height: 16px;
    /* background: #FFF; Placeholder */
    border-radius: 2px;
    cursor: help;
}

/* Responsive adjustments */
@media (max-width: 800px) {
    .header-container, .content, .footer-container {
        border: none;
        max-width: 100%;
    }
    .title-bar, .menu-bar, .toolbar, .address-bar-row {
        display: none; /* Hide chrome on mobile? Or simplify */
    }
    body {
        padding: 0;
        background-color: #FFF;
    }
}
