/* --- Base Styles & Reset --- */
* { margin: 0; padding: 0; box-sizing: border-box; font-family: "Fixedsys", "Courier New", Courier, monospace; }
:root { 
    --win-bg: #c0c0c0; 
    --win-white: #ffffff; 
    --win-grey: #808080; 
    --win-black: #000000; 
    --win-blue: #000080; 
    --desktop-teal: #008080; 
}

body { background-color: var(--desktop-teal); color: var(--win-black); overflow-x: hidden; }

/* --- Alignment Container --- */
.container {
    max-width: 1400px; margin: 0 auto; padding: 20px 10px;
    display: flex; flex-direction: column; align-items: flex-start;
}

/* --- Banner --- */
.banner {
    width: 100%; height: 20vh; background: url('banner.png') no-repeat center center/cover;
    position: relative; display: flex; justify-content: center; align-items: flex-end; border-bottom: 2px solid var(--win-black);
}
.banner-text-box {
    margin-bottom: 10px; padding: 10px 20px; background-color: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(5px); border: 1px solid var(--win-grey); box-shadow: 2px 2px 0px var(--win-black); max-width: 80%; text-align: center;
}

/* --- Navigation --- */
.main-header { background: var(--win-bg); border-top: 2px solid var(--win-white); border-bottom: 2px solid var(--win-black); position: sticky; top: 0; z-index: 1000; width: 100%; }
.nav-container { display: flex; justify-content: space-between; align-items: center; max-width: 1400px; margin: 0 auto; padding: 2px 10px; }
.nav-links { display: flex; list-style: none; }
.nav-links li a, .auth-link { display: flex; align-items: center; padding: 6px 12px; text-decoration: none; color: var(--win-black); font-size: 14px; border: 1px solid transparent; }
.nav-links li a img { width: 16px; height: 16px; margin-right: 6px; image-rendering: pixelated; }
.nav-links li a:hover, .auth-link:hover { background-color: var(--win-blue); color: var(--win-white); border: 1px dotted var(--win-white); }
.nav-auth { display: flex; align-items: center; }
.auth-text, .auth-link, .auth-sep { font-size: 14px; color: var(--win-black); text-decoration: none; }
.auth-sep { padding: 0 4px; }

/* --- Windows 3.1 Components --- */
.win31-window {
    background: var(--win-bg); border-top: 2px solid var(--win-white); border-left: 2px solid var(--win-white);
    border-right: 2px solid var(--win-grey); border-bottom: 2px solid var(--win-grey);
    box-shadow: 1px 1px 0px var(--win-black); margin-bottom: 20px; width: 100%; max-width: 850px;
}
.window-titlebar { background: var(--win-blue); color: white; padding: 3px 6px; display: flex; justify-content: space-between; align-items: center; font-weight: bold; }
.window-body { padding: 15px; }

/* --- Content Elements --- */
.book-cover { width: 180px; height: auto; border: 2px solid #000; object-fit: contain; }
.catalog-cover { width: 150px; height: 220px; object-fit: cover; border: 1px solid #000; margin-bottom: 10px; }
.home-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 20px; width: 100%; max-width: 1100px; }
.section-title { background: var(--win-blue); color: white; padding: 4px 12px; margin: 15px 0; border: 2px solid var(--win-white); display: inline-block; align-self: flex-start; }
.win31-btn { background: var(--win-bg); border: 1px solid var(--win-black); box-shadow: inset 1px 1px 0px var(--win-white), 1px 1px 0px var(--win-black); padding: 4px 12px; cursor: pointer; font-size: 13px; text-decoration: none; color: #000; display: inline-block; }
.win31-btn:active { box-shadow: inset 1px 1px 0px var(--win-black); transform: translate(1px, 1px); }

/* --- Notepad Style --- */
.notepad-content { background: #fff; border: 2px solid; border-color: var(--win-grey) var(--win-white) var(--win-white) var(--win-grey); padding: 20px; line-height: 1.6; }

@media (max-width: 900px) { .home-grid { grid-template-columns: 1fr; } .nav-links { display: none; } }

.calendar-grid {
    box-shadow: inset 2px 2px 0px #808080, inset -1px -1px 0px #fff;
}
.cal-day strong {
    color: var(--win-blue);
}

/* Retro Loading Bar Style */
.poll-progress-well {
    background: #fff;
    border: 2px solid;
    border-color: var(--win-grey) var(--win-white) var(--win-white) var(--win-grey);
    height: 20px;
    width: 100%;
    margin-top: 5px;
    position: relative;
}

.poll-progress-fill {
    background: var(--win-blue);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 5px;
    color: #fff;
    font-size: 10px;
}

/* Retro Loading Bar Style */
.poll-progress-well {
    background: #fff;
    border: 2px solid;
    border-color: var(--win-grey) var(--win-white) var(--win-white) var(--win-grey);
    height: 20px;
    width: 100%;
    margin-top: 5px;
    position: relative;
    overflow: hidden;
}

.poll-progress-fill {
    background: var(--win-blue);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 5px;
    color: #fff;
    font-size: 10px;
    transition: width 0.4s ease-in-out;
}

/* Container for the logo to ensure perfect centering */
.banner-logo-wrapper {
    position: absolute;
    top: 45%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
}

.banner-logo {
    max-height: 120px; /* Adjust based on your logo design */
    width: auto;
    image-rendering: pixelated; /* Keeps it looking retro */
}

/* Ensure the banner background doesn't overflow the window border */
.banner {
    width: 100%;
    background: url('banner.png') no-repeat center center/cover;
    display: flex;
    justify-content: center;
    align-items: flex-end; /* Keeps the text box at the bottom */
}

/* Optional: Titlebar controls for extra realism */
.window-controls span {
    border: 1px solid #fff;
    background: var(--win-bg);
    color: #000;
    padding: 0 5px;
    margin-left: 2px;
    font-size: 10px;
    cursor: default;
}