@import url('https://fonts.googleapis.com/css2?family=Silkscreen&display=swap');

/* === RESET & BASE === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Silkscreen', monospace;
    background: url('data:image/svg+xml,<svg width="40" height="40" xmlns="http://www.w3.org/2000/svg"><rect width="40" height="40" fill="%23c0c0c0"/><rect width="20" height="20" fill="%23b0b0b0"/><rect x="20" y="20" width="20" height="20" fill="%23b0b0b0"/></svg>');
    min-height: 100vh;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

/* === MENU BAR === */
.menu-bar {
    background: linear-gradient(180deg, #ffffff 0%, #d4d0c8 50%, #808080 100%);
    border-bottom: 2px solid #000;
    border-top: 2px solid #fff;
    display: flex;
    align-items: stretch;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.menu-item {
    padding: 8px 16px;
    cursor: pointer;
    border-right: 1px solid #808080;
    border-left: 1px solid #fff;
    font-size: 11px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background 0.1s;
    white-space: nowrap;
}

.menu-item:hover {
    background: #000080;
    color: #fff;
}

.menu-item:active {
    background: #fff;
    color: #000;
}

/* === DESKTOP/MAIN AREA === */
.desktop {
    position: relative;
    min-height: calc(100vh - 40px);
    padding: 20px;
}

/* === WINDOWS === */
.window {
    position: relative;
    background: #c0c0c0;
    border-top: 2px solid #fff;
    border-left: 2px solid #fff;
    border-right: 2px solid #000;
    border-bottom: 2px solid #000;
    box-shadow: 4px 4px 8px rgba(0,0,0,0.4);
    margin: 20px auto;
    max-width: 800px;
}

.window-header {
    background: linear-gradient(90deg, #000080, #1084d0);
    color: #fff;
    padding: 3px 4px;
    display: flex;
    align-items: center;
    cursor: move;
    user-select: none;
    border-bottom: 1px solid #fff;
}

.window-title {
    flex: 1;
    text-align: center;
    font-size: 11px;
    font-weight: bold;
    letter-spacing: 0.5px;
}

.window-controls {
    display: flex;
    gap: 2px;
    margin-right: 4px;
}

.window-btn {
    width: 16px;
    height: 14px;
    border: 1px solid #000;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    background: #c0c0c0;
    border-top: 1px solid #fff;
    border-left: 1px solid #fff;
    border-right: 1px solid #000;
    border-bottom: 1px solid #000;
}

.window-btn:active {
    border-top: 1px solid #000;
    border-left: 1px solid #000;
    border-right: 1px solid #fff;
    border-bottom: 1px solid #fff;
}

.window-content {
    padding: 15px;
    background: #fff;
    font-size: 12px;
    line-height: 1.6;
}

.window-content p {
    margin-bottom: 10px;
}

/* === DESKTOP ICONS === */
.icon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, 85px);
    gap: 25px;
    margin-top: 30px;
    padding: 10px;
}

.desktop-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    padding: 8px;
    user-select: none;
}

.desktop-icon:active .icon {
    filter: invert(1);
}

.icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
}

.icon-label {
    background: #000080;
    color: #fff;
    font-size: 10px;
    padding: 2px 6px;
    text-align: center;
    border: 1px solid #000;
}

/* === POST ITEMS === */
.post-item {
    padding: 12px;
    margin: 10px 0;
    background: #f0f0f0;
    border-top: 2px solid #fff;
    border-left: 2px solid #fff;
    border-right: 2px solid #808080;
    border-bottom: 2px solid #808080;
    cursor: pointer;
    display: block;
    transition: background 0.1s;
}

.post-item:hover {
    background: #e0e0e0;
}

.post-date {
    font-size: 10px;
    color: #666;
    margin-bottom: 5px;
}

.post-title {
    font-weight: bold;
    margin-bottom: 8px;
    font-size: 13px;
}

.post-preview {
    font-size: 11px;
    line-height: 1.5;
    color: #333;
}

/* === QUOTES === */
.quote-box {
    background: #ffffcc;
    border: 2px solid #808080;
    padding: 12px;
    margin: 10px 0;
    font-style: italic;
    cursor: pointer;
    transition: border-color 0.1s;
}

.quote-box:hover {
    border-color: #000080;
}

.quote-author {
    font-weight: bold;
    margin-top: 8px;
    font-style: normal;
}

/* === ARCHIVE ITEMS === */
.archive-item {
    padding: 10px 12px;
    border-bottom: 1px dotted #999;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.1s;
}

.archive-item:hover {
    background: #000080;
    color: #fff;
}

.archive-count {
    margin-left: auto;
    font-size: 10px;
    color: #666;
}

.archive-item:hover .archive-count {
    color: #fff;
}

/* === BUTTONS === */
button, .button {
    background: #c0c0c0;
    border-top: 2px solid #fff;
    border-left: 2px solid #fff;
    border-right: 2px solid #000;
    border-bottom: 2px solid #000;
    padding: 6px 14px;
    font-family: inherit;
    cursor: pointer;
    margin: 5px 2px;
    font-size: 11px;
    display: inline-block;
}

button:hover, .button:hover {
    background: #d0d0d0;
}

button:active, .button:active {
    border-top: 2px solid #000;
    border-left: 2px solid #000;
    border-right: 2px solid #fff;
    border-bottom: 2px solid #fff;
}

/* === HEADINGS === */
h2 {
    font-size: 14px;
    margin: 15px 0 12px 0;
    padding-bottom: 4px;
    border-bottom: 2px solid #000080;
}

h3 {
    font-size: 12px;
    margin: 12px 0 8px 0;
}

/* === FORMS === */
input, textarea, select {
    border-top: 2px solid #808080;
    border-left: 2px solid #808080;
    border-right: 2px solid #fff;
    border-bottom: 2px solid #fff;
    padding: 6px;
    font-family: inherit;
    width: 100%;
    margin: 5px 0;
    background: #fff;
    font-size: 11px;
}

input:focus, textarea:focus, select:focus {
    outline: 2px solid #000080;
}

label {
    display: block;
    margin-top: 10px;
    font-size: 11px;
    font-weight: bold;
}

/* === GUESTBOOK === */
.guestbook-entry {
    background: #f0f0f0;
    padding: 10px;
    margin: 10px 0;
    border-left: 3px solid #000080;
    font-size: 11px;
}

.entry-name {
    font-weight: bold;
    color: #000080;
    margin-bottom: 4px;
}

.entry-date {
    font-size: 10px;
    color: #666;
    margin-bottom: 6px;
}

.entry-message {
    line-height: 1.5;
}

/* === MEDIA PLAYERS === */
.media-player {
    background: #000;
    padding: 10px;
    margin: 15px 0;
    border: 2px solid #808080;
}

.media-title {
    color: #fff;
    font-size: 11px;
    margin-top: 8px;
    padding: 5px;
}

video, audio {
    width: 100%;
    max-width: 100%;
}

/* === MESSAGES === */
.success-message {
    background: #90ee90;
    border: 2px solid #008000;
    padding: 10px;
    margin: 10px 0;
    font-size: 11px;
}

.error-message {
    background: #ffcccc;
    border: 2px solid #cc0000;
    padding: 10px;
    margin: 10px 0;
    font-size: 11px;
}

/* === LINKS === */
.back-link {
    display: inline-block;
    margin-top: 15px;
    color: #0000ff;
    text-decoration: underline;
}

.back-link:hover {
    color: #ff0000;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    body {
        background: #c0c0c0;
    }
    
    .desktop {
        padding: 10px;
    }
    
    .window {
        margin: 10px;
        max-width: 100%;
    }
    
    .window-header {
        cursor: default;
    }
    
    .menu-bar {
        flex-wrap: wrap;
    }
    
    .menu-item {
        font-size: 10px;
        padding: 6px 10px;
    }
    
    .icon-grid {
        display: none;
    }
}