:root {
    --desktop-teal: #008080;
    --win-blue-bg: #000080;
    --win-gray: #c0c0c0;
    --win-teal-header: #008080;
    --border-light: #ffffff;
    --border-dark: #808080;
    --border-black: #000000;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'VT323', monospace;
    user-select: none;
}

body {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
    padding-bottom: 35px;
    background-color: var(--desktop-teal);
    transition: background-color 0.4s ease;
}

/* Desktop Icons Layer */
.desktop-icons {
    position: fixed;
    top: 20px;
    left: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    z-index: 5;
}

.desktop-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: white;
    font-size: 18px;
    cursor: pointer;
    text-shadow: 1px 1px 2px black;
}

.desktop-icon .icon {
    font-size: 38px;
}

.desktop-icon:hover {
    background: rgba(255, 255, 255, 0.2);
    border: 1px dotted white;
}

/* Trail Canvas Effect */
#trail-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 10000;
}

/* CRT Screen Effect */
.crt-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.03), rgba(0, 255, 0, 0.01), rgba(0, 0, 255, 0.03));
    background-size: 100% 3px, 6px 100%;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.8;
}

/* Background Variations */
.teal-bg-screen { background-color: var(--desktop-teal); }
.blue-bg-screen { background-color: var(--win-blue-bg); }
.checkerboard-bg-screen {
    background-color: #e5e5e5;
    background-image: linear-gradient(45deg, #ccc 25%, transparent 25%), linear-gradient(-45deg, #ccc 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #ccc 75%), linear-gradient(-45deg, transparent 75%, #ccc 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
}

/* Screen Navigation */
.screen {
    display: none;
    width: 100vw;
    height: calc(100vh - 35px);
    position: absolute;
    top: 0;
    left: 0;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.screen.active { display: flex; }

/* Windows 95 Border System */
.window {
    background: var(--win-gray);
    border: 3px solid;
    border-color: var(--border-light) var(--border-black) var(--border-black) var(--border-light);
    box-shadow: 4px 4px 0px rgba(0,0,0,0.5);
    width: 100%;
    max-width: 520px;
    position: relative;
    z-index: 10;
}

.window.win-large {
    max-width: 720px;
    width: 90%;
}

.title-bar {
    background: linear-gradient(90deg, #000080, #1084d0);
    color: white;
    padding: 4px 8px;
    font-size: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: move;
}

.win-controls {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 16px;
}

.title-bar.teal-header { background: var(--win-teal-header); }

.close-btn {
    background: var(--win-gray);
    border: 2px solid;
    border-color: var(--border-light) var(--border-black) var(--border-black) var(--border-light);
    color: black;
    font-weight: bold;
    width: 22px;
    height: 22px;
    cursor: pointer;
    line-height: 16px;
    font-size: 14px;
}

.close-btn:active {
    border-color: var(--border-black) var(--border-light) var(--border-light) var(--border-black);
}

.window-content { padding: 25px; }
.center { text-align: center; }

/* Texts */
.body-p.large-text {
    font-size: 26px;
    line-height: 1.5;
    margin-bottom: 20px;
    color: #000;
}

.retro-box {
    background: #ffffcc;
    border: 2px dashed #000;
    padding: 15px;
    font-size: 22px;
    margin-top: 15px;
}

.about-card {
    background: #ffffff;
    border: 2px solid var(--border-dark);
    padding: 20px;
    box-shadow: inset 2px 2px 0px #808080;
}

.retro-quote.large-text {
    font-size: 26px;
    line-height: 1.5;
    background: white;
    padding: 20px;
    border-left: 6px solid #000080;
    margin: 20px 0;
}

.status-indicator {
    font-size: 20px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: white;
    padding: 4px 12px;
    border: 1px solid black;
}

.green-dot {
    width: 12px;
    height: 12px;
    background: #00ff00;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 8px #00ff00;
}

/* Guestbook styles */
.guestbook-form {
    display: flex;
    gap: 10px;
    margin: 15px 0;
}

.retro-input {
    padding: 8px;
    font-size: 20px;
    border: 2px solid black;
    flex: 1;
}

.guestbook-list {
    background: white;
    border: 2px inset var(--border-dark);
    height: 150px;
    overflow-y: auto;
    padding: 10px;
}

.gb-entry {
    font-size: 20px;
    border-bottom: 1px solid #ccc;
    padding: 4px 0;
}

/* Windows Buttons */
.win-btn {
    background: var(--win-gray);
    border: 3px solid;
    border-color: var(--border-light) var(--border-black) var(--border-black) var(--border-light);
    padding: 8px 24px;
    font-size: 24px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.1s;
}

.win-btn:active {
    border-color: var(--border-black) var(--border-light) var(--border-light) var(--border-black);
    transform: translate(1px, 1px);
}

.pulse-glow {
    animation: pulse 1.8s infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0px #fff; }
    50% { box-shadow: 0 0 15px #0000ff; }
}

.black-pill-btn {
    background: black;
    color: white;
    border-radius: 20px;
    padding: 6px 30px;
    border: none;
    cursor: pointer;
}

/* Animations */
.bounce-text {
    font-family: 'Press Start 2P', cursive;
    font-size: 28px;
    line-height: 1.4;
    animation: bounce 2.2s infinite ease-in-out;
}

.highlight-blue { color: #0000ff; }

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

.time-tag {
    font-size: 24px;
    margin: 15px 0;
    font-weight: bold;
}

/* Quiz Screen Layout */
.quiz-container {
    display: flex;
    gap: 30px;
    align-items: flex-start;
    max-width: 900px;
}

.side-big-text {
    font-family: 'Press Start 2P', cursive;
    font-size: 32px;
    color: white;
    line-height: 1.3;
}

.window-stack {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.quiz-option {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 22px;
    margin-bottom: 14px;
    cursor: pointer;
}

.tooltip-win {
    background: white;
    padding: 10px;
    font-size: 18px;
}

.bottom-right-btn {
    position: absolute;
    bottom: 30px;
    right: 30px;
}

/* Agenda Screen */
.agenda-layout {
    width: 100%;
    max-width: 580px;
    position: relative;
}

.repeating-header {
    color: rgba(255, 255, 255, 0.4);
    font-size: 18px;
    white-space: nowrap;
    overflow: hidden;
    margin-bottom: 5px;
}

.pixel-heading {
    font-family: 'Press Start 2P', cursive;
    font-size: 36px;
    margin-bottom: 25px;
}

.agenda-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    text-align: center;
}

.grid-item {
    cursor: pointer;
    font-size: 26px;
    padding: 10px;
    transition: background 0.2s, transform 0.1s;
}

.grid-item:hover {
    background: rgba(0, 0, 128, 0.15);
    transform: scale(1.05);
}

.icon-frame {
    font-size: 45px;
    margin-bottom: 5px;
}

.start-popup {
    position: absolute;
    right: -30px;
    top: 50px;
    background: white;
    border: 2px solid black;
    padding: 5px 15px;
    font-size: 20px;
    box-shadow: 2px 2px 0px black;
}

.floating-rate-icon {
    position: fixed;
    bottom: 50px;
    left: 20px;
    background: var(--win-gray);
    border: 2px solid black;
    padding: 6px;
    display: flex;
    gap: 6px;
    cursor: pointer;
    z-index: 100;
}

/* Paint Window */
.paint-menu {
    background: white;
    padding: 3px 10px;
    border-bottom: 2px solid var(--border-dark);
    font-size: 18px;
}

.paint-body { display: flex; }

.paint-sidebar {
    width: 50px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px;
    background: var(--win-gray);
    padding: 3px;
    border-right: 2px solid var(--border-dark);
}

.tool {
    background: var(--win-gray);
    border: 1px solid white;
    text-align: center;
    font-size: 14px;
    cursor: pointer;
}

.paint-canvas {
    flex: 1;
    background-color: #ffffff;
    background-image: linear-gradient(45deg, #eee 25%, transparent 25%), linear-gradient(-45deg, #eee 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #eee 75%), linear-gradient(-45deg, transparent 75%, #eee 75%);
    background-size: 16px 16px;
    padding: 40px;
    text-align: center;
}

.instagram-pill {
    display: inline-block;
    background: var(--win-gray);
    border: 3px solid black;
    border-radius: 30px;
    padding: 10px 60px;
    font-family: 'Press Start 2P', cursive;
    font-size: 20px;
    color: black;
    text-decoration: none;
    box-shadow: 3px 3px 0px black;
    transition: transform 0.1s;
}

.instagram-pill:hover {
    transform: scale(1.08);
}

/* Nokia Battery Component */
.nokia-battery {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 4px solid black;
    padding: 4px;
    width: 220px;
    height: 50px;
    background: white;
    margin: 25px auto;
    position: relative;
}

.bat-cell {
    flex: 1;
    height: 100%;
    margin: 0 2px;
    background: #e0e0e0;
    border: 1px solid #aaa;
    cursor: pointer;
}

.bat-cell.active { background: #0000ff; }

.bat-head {
    position: absolute;
    right: -12px;
    width: 8px;
    height: 24px;
    background: black;
}

.pixel-thankyou {
    font-family: 'Press Start 2P', cursive;
    font-size: 30px;
    margin: 15px 0;
}

/* Windows 95 Taskbar */
.win95-taskbar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 35px;
    background: var(--win-gray);
    border-top: 2px solid var(--border-light);
    display: flex;
    align-items: center;
    padding: 2px 5px;
    z-index: 1000;
}

.start-menu-btn, .wallpaper-btn, .music-btn {
    background: var(--win-gray);
    border: 2px solid;
    border-color: var(--border-light) var(--border-black) var(--border-black) var(--border-light);
    padding: 2px 8px;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    margin-right: 4px;
}

.taskbar-divider {
    width: 2px;
    height: 25px;
    background: var(--border-dark);
    border-right: 1px solid var(--border-light);
    margin: 0 6px;
}

.taskbar-tab {
    background: var(--win-gray);
    border: 2px solid;
    border-color: var(--border-black) var(--border-light) var(--border-light) var(--border-black);
    padding: 3px 12px;
    font-size: 16px;
    font-weight: bold;
    margin-left: 5px;
}

.taskbar-clock {
    margin-left: auto;
    border: 2px solid;
    border-color: var(--border-dark) var(--border-light) var(--border-light) var(--border-dark);
    padding: 2px 10px;
    font-size: 16px;
}

/* Game Scoreboard & Overlay Styles */
.game-scoreboard {
    font-size: 20px;
    background: #ffffff;
    border: 2px inset var(--border-dark);
    padding: 4px 10px;
    display: inline-block;
    margin-bottom: 5px;
}

.canvas-wrapper {
    position: relative;
    display: inline-block;
}

.game-over-overlay {
    position: absolute;
    top: 10px;
    left: 0;
    width: 320px;
    height: 220px;
    background: rgba(0, 0, 0, 0.88);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #ff0055;
    z-index: 20;
    border: 3px solid black;
    animation: fadeIn 0.2s ease-in;
}

.game-over-title {
    font-family: 'Press Start 2P', cursive;
    font-size: 26px;
    color: #ff3333;
    text-shadow: 2px 2px #000;
    animation: blink 0.8s infinite;
}

#final-score-text {
    font-size: 22px;
    color: #ffffff;
    margin-top: 8px;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

/* Responsive adjustments for mobile screens */
@media (max-width: 600px) {
    .quiz-container { flex-direction: column; }
    .side-big-text { font-size: 22px; }
    .window { max-width: 95vw; }
    .body-p.large-text { font-size: 20px; }
    .desktop-icons { display: none; }
}