body {
    background-color: #000;
    color: #0f0;
    font-family: 'Press Start 2P', cursive;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    overflow: hidden;
}

/* Premium Start Screen */
#start-screen {
    text-align: center;
    position: relative;
    z-index: 1;
}

#start-screen::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse at 20% 80%, rgba(0, 80, 0, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(0, 100, 0, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(0, 40, 0, 0.3) 0%, transparent 70%);
    z-index: -1;
    animation: pulseBackground 8s ease-in-out infinite;
}

@keyframes pulseBackground {

    0%,
    100% {
        opacity: 0.8;
    }

    50% {
        opacity: 1;
    }
}

/* Floating particles effect */
#start-screen::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle at 10% 20%, rgba(0, 255, 0, 0.03) 1px, transparent 1px),
        radial-gradient(circle at 90% 80%, rgba(0, 255, 0, 0.02) 1px, transparent 1px),
        radial-gradient(circle at 50% 10%, rgba(0, 255, 0, 0.04) 1px, transparent 1px);
    background-size: 100px 100px, 150px 150px, 200px 200px;
    animation: floatParticles 20s linear infinite;
    z-index: -1;
    pointer-events: none;
}

@keyframes floatParticles {
    0% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(-100px);
    }
}

/* Premium Title with Glitch Effect */
.game-title {
    font-family: 'Creepster', cursive;
    font-size: 6em;
    margin-bottom: 50px;
    color: #0f0;
    text-shadow:
        0 0 5px rgba(0, 255, 0, 0.6),
        0 0 10px rgba(0, 255, 0, 0.4),
        0 0 20px rgba(0, 200, 0, 0.2),
        2px 2px 0 #000,
        -2px -2px 0 #000;
    letter-spacing: 8px;
    position: relative;
    animation: titleGlow 4s ease-in-out infinite, titleFloat 4s ease-in-out infinite;
}

@keyframes titleGlow {

    0%,
    100% {
        text-shadow:
            0 0 5px rgba(0, 255, 0, 0.6),
            0 0 10px rgba(0, 255, 0, 0.4),
            0 0 20px rgba(0, 200, 0, 0.2);
        filter: brightness(1);
    }

    50% {
        text-shadow:
            0 0 8px rgba(0, 255, 0, 0.7),
            0 0 15px rgba(0, 255, 0, 0.5),
            0 0 25px rgba(0, 200, 0, 0.3);
        filter: brightness(1.05);
    }
}

@keyframes titleFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

.game-title::before,
.game-title::after {
    content: 'DISINFO.EXE';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.8;
}

.game-title::before {
    color: #f00;
    animation: glitchLeft 3s infinite;
    clip-path: polygon(0 0, 100% 0, 100% 35%, 0 35%);
}

.game-title::after {
    color: #00f;
    animation: glitchRight 2s infinite;
    clip-path: polygon(0 65%, 100% 65%, 100% 100%, 0 100%);
}

@keyframes glitchLeft {

    0%,
    90%,
    100% {
        transform: translate(0);
        opacity: 0;
    }

    92% {
        transform: translate(-3px, 1px);
        opacity: 0.7;
    }

    94% {
        transform: translate(3px, -1px);
        opacity: 0.7;
    }
}

@keyframes glitchRight {

    0%,
    85%,
    100% {
        transform: translate(0);
        opacity: 0;
    }

    87% {
        transform: translate(2px, -2px);
        opacity: 0.7;
    }

    89% {
        transform: translate(-2px, 2px);
        opacity: 0.7;
    }
}

/* Premium Menu Buttons */
.menu {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}

.menu .retro-button {
    display: block;
    background: linear-gradient(180deg, rgba(0, 80, 0, 0.9) 0%, rgba(0, 50, 0, 0.95) 100%);
    color: #0f0;
    border: 2px solid #0a0;
    padding: 18px 40px;
    cursor: pointer;
    font-family: 'Press Start 2P', cursive;
    font-size: 1em;
    width: 300px;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    text-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
    box-shadow:
        0 0 15px rgba(0, 255, 0, 0.1),
        inset 0 1px 0 rgba(0, 255, 0, 0.1);
    backdrop-filter: blur(5px);
}

.menu .retro-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 0, 0.2), transparent);
    transition: left 0.5s;
}

.menu .retro-button:hover:not(:disabled)::before {
    left: 100%;
}

.menu .retro-button:hover:not(:disabled) {
    background: linear-gradient(180deg, rgba(0, 120, 0, 0.95) 0%, rgba(0, 80, 0, 0.95) 100%);
    border-color: #0f0;
    color: #fff;
    transform: scale(1.03) translateY(-2px);
    box-shadow:
        0 0 30px rgba(0, 255, 0, 0.3),
        0 5px 20px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    text-shadow: 0 0 15px rgba(0, 255, 0, 0.8);
}

.menu .retro-button:active:not(:disabled) {
    transform: scale(0.98);
    transition: transform 0.1s;
}

.menu .retro-button:disabled {
    background: linear-gradient(180deg, rgba(30, 30, 30, 0.8) 0%, rgba(20, 20, 20, 0.9) 100%);
    color: #555;
    border-color: #333;
    cursor: not-allowed;
    text-shadow: none;
    box-shadow: none;
}

/* Premium Server Status */
.server-status {
    margin-top: 50px;
    font-size: 0.75em;
    color: #666;
    letter-spacing: 2px;
    text-transform: uppercase;
}

#server-status-indicator {
    font-weight: bold;
    transition: all 0.3s ease;
}

#server-status-indicator.online {
    color: #0f0;
    text-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
    animation: statusPulse 2s ease-in-out infinite;
}

@keyframes statusPulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

#server-status-indicator.offline {
    color: #f44;
    text-shadow: 0 0 10px rgba(255, 68, 68, 0.5);
}

/* Premium Credits */
.credits {
    position: absolute;
    bottom: 25px;
    width: 100%;
    text-align: center;
    font-size: 0.6em;
    color: #444;
    letter-spacing: 3px;
    text-transform: uppercase;
    transition: color 0.3s ease;
}

.credits:hover {
    color: #666;
}

.desktop {
    width: 85%;
    height: 85%;
    border: 2px solid #0f0;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.5);
    position: relative;
    background-color: rgba(0, 50, 0, 0.2);
    /* Slightly darker green tint */
    transition: width 0.5s, height 0.5s;
}

.desktop.paused>*:not(#pause-menu) {
    filter: blur(5px);
}

#pause-menu {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.pause-menu-content {
    background-color: #111;
    border: 2px solid #0f0;
    padding: 30px;
    text-align: center;
}

.pause-menu-content h2 {
    margin-top: 0;
    font-size: 2em;
}

.pause-menu-content button {
    display: block;
    background-color: #080;
    color: #000;
    border: 1px solid #000;
    padding: 10px 20px;
    margin: 10px auto;
    cursor: pointer;
    font-family: 'Press Start 2P', cursive;
    font-size: 1em;
    width: 200px;
}

#settings-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    z-index: 20000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.settings-content {
    width: 50%;
    max-width: 600px;
    background-color: #111;
    border: 2px solid #0f0;
    padding: 20px;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.setting-item label {
    font-size: 1.2em;
}

.button-group select {
    background-color: #0f0;
    color: #000;
    border: 1px solid #0a0;
    padding: 5px 10px;
    margin-left: 5px;
    cursor: pointer;
    font-family: 'Press Start 2P', cursive;
}

#static-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    opacity: 0.8;
    z-index: 30000;
    pointer-events: none;
    animation: static 0.1s infinite;
}

#shutdown-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    color: #0f0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    font-size: 1.5em;
    z-index: 40000;
}

@keyframes static {
    0% {
        background-position: 0 0;
    }

    10% {
        background-position: -5% -5%;
    }

    20% {
        background-position: -10% 5%;
    }

    30% {
        background-position: 5% -10%;
    }

    40% {
        background-position: -5% 15%;
    }

    50% {
        background-position: -10% 5%;
    }

    60% {
        background-position: 15% 0;
    }

    70% {
        background-position: 0 10%;
    }

    80% {
        background-position: -15% 0;
    }

    90% {
        background-position: 10% 5%;
    }

    100% {
        background-position: 5% 0;
    }
}

.taskbar {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #0a0;
    padding: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 2px solid #0f0;
    box-sizing: border-box;
}

#clock {
    color: #000;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.8em;
    padding-right: 10px;
}

#night-indicator {
    color: #000;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.8em;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.taskbar button {
    background-color: #080;
    color: #000;
    border: 1px solid #000;
    padding: 5px 10px;
    margin-right: 5px;
    cursor: pointer;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.8em;
}

.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #0a0;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
    z-index: 1;
    bottom: 100%;
}

.dropdown-content a {
    color: black;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
}

.dropdown-content a:hover {
    background-color: #080;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.window {
    background-color: rgba(0, 0, 0, 0.8);
    border: 1px solid #0f0;
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.3);
    position: absolute;
    resize: none;
    /* Disable default resize */
    overflow: hidden;
    min-width: 200px;
    min-height: 150px;
    max-width: 75%;
    max-height: 75%;
    display: none;
    /* Hidden by default */
    flex-direction: column;
}

.window-header {
    background-color: #0a0;
    color: #000;
    padding: 5px;
    cursor: move;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9em;
    position: relative;
    z-index: 1;
}

.close-btn {
    cursor: pointer;
    font-weight: bold;
    padding: 0 5px;
}

.window-content {
    padding: 10px;
    font-size: 0.8em;
    white-space: pre-wrap;
    /* Preserve whitespace for terminal-like output */
    overflow-y: auto;
    flex-grow: 1;
    min-height: 0;
    box-sizing: border-box;
    /* Ensure padding is included in height/width */
}

.game-window .window-content {
    padding: 0;
}

.resize-handle {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 15px;
    height: 15px;
    cursor: se-resize;
    background: repeating-linear-gradient(-45deg,
            transparent,
            transparent 4px,
            #0f0 4px,
            #0f0 5px);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #000;
    border-left: 1px solid #0f0;
}

::-webkit-scrollbar-thumb {
    background: #0f0;
}

::-webkit-scrollbar-thumb:hover {
    background: #0a0;
}

.styled-input {
    background-color: #000;
    color: #0f0;
    border: 1px solid #0f0;
    padding: 5px;
    font-family: 'Press Start 2P', cursive;
    width: calc(100% - 12px);
    /* Adjust for padding and border */
    margin-top: 10px;
}

.styled-input::placeholder {
    color: #0a0;
    opacity: 0.7;
}

/* CRT Scanlines Effect */
body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(to bottom,
            transparent 0px,
            rgba(0, 0, 0, 0.2) 1px,
            transparent 2px);
    pointer-events: none;
    opacity: 0.5;
}

/* Optional: Glitch effect */
.glitch {
    animation: glitch 0.5s infinite;
}

@keyframes glitch {
    0% {
        transform: translate(0);
    }

    20% {
        transform: translate(-2px, 2px);
    }

    40% {
        transform: translate(-2px, -2px);
    }

    60% {
        transform: translate(2px, 2px);
    }

    80% {
        transform: translate(2px, -2px);
    }

    100% {
        transform: translate(0);
    }
}

.typing-indicator {
    display: inline-block;
}

.typing-indicator span {
    animation: pulse 1.5s infinite;
    opacity: 0;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes pulse {
    0% {
        opacity: 0;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

.chat-app-layout {
    display: flex;
    flex-direction: column;
    height: 100%;
    box-sizing: border-box;
    justify-content: space-between;
    /* Push content and input apart */
}

.chat-messages {
    flex-grow: 1;
    overflow-y: auto;
    padding-bottom: 10px;
    /* Add some space at the bottom */
    min-height: 0;
}

.chat-messages p {
    word-wrap: break-word;
    word-break: break-all;
}

#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    color: #0f0;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9em;
    z-index: 1000;
    overflow: hidden;
}

#boot-text {
    white-space: pre-wrap;
    word-wrap: break-word;
    padding: 10px;
}

.sticky-note .window-content {
    padding-right: 20px;
    /* Add space for the scrollbar */
}

.sticky-note {
    top: 20px;
    left: 20px;
    width: 250px;
    height: 200px;
    background-color: #1a1a1a;
    display: flex;
    /* Make it visible by default and a flex container */
}

#sticky-note-textarea {
    width: 100%;
    height: 100%;
    background-color: transparent;
    border: none;
    color: #0f0;
    font-family: 'Courier New', Courier, monospace;
    font-size: 1em;
    resize: none;
}

#sticky-note-textarea:focus {
    outline: none;
}

.terminal-input-line {
    display: flex;
    align-items: center;
}

.terminal-input-line span {
    margin-right: 5px;
}

.terminal-input {
    flex-grow: 1;
    border: none;
    background-color: transparent;
    color: #0f0;
    font-family: 'Courier New', Courier, monospace;
}

.terminal-input:focus {
    outline: none;
}

.email-app {
    display: flex;
    height: 100%;
}

.email-list {
    width: 30%;
    border-right: 1px solid #0f0;
    padding-right: 10px;
    overflow-y: auto;
}

.email-item {
    padding: 5px;
    cursor: pointer;
    border-bottom: 1px solid #0a0;
}

.email-item:hover {
    background-color: #0a0;
    color: #000;
}

.email-sender {
    font-weight: bold;
    margin: 0;
}

.email-subject {
    margin: 0;
    font-size: 0.9em;
}

.email-view {
    width: 70%;
    padding-left: 10px;
    overflow-y: auto;
}

#sleep-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    color: #fff;
    display: none;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    z-index: 2000;
}

#sleep-text {
    font-size: 5em;
    animation: pulse 1.5s infinite;
}

#night-text {
    font-size: 2em;
    margin-top: 20px;
}

#bedtime-warning {
    position: absolute;
    bottom: 50px;
    /* Above the taskbar */
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(255, 0, 0, 0.7);
    color: #fff;
    padding: 10px;
    border: 1px solid #fff;
    border-radius: 5px;
    display: none;
    /* Hidden by default */
    z-index: 100;
}

.notification {
    animation: pulse-bg 1.5s infinite;
}

@keyframes pulse-bg {
    0% {
        background-color: #0f0;
    }

    50% {
        background-color: #0a0;
    }

    100% {
        background-color: #0f0;
    }
}

/* Terminal Syntax Highlighting */
.terminal-success {
    color: #0f0;
    font-weight: bold;
}

.terminal-error {
    color: #f44;
    font-weight: bold;
}

.terminal-warning {
    color: #ff0;
    font-weight: bold;
}

.terminal-hint {
    color: #888;
    font-style: italic;
}

.terminal-help-header {
    color: #0ff;
    font-weight: bold;
}

.terminal-help-command {
    color: #0f0;
}

.hunter-interject {
    color: #f80;
    font-style: italic;
}

.matrix-effect {
    color: #0f0;
    font-family: 'Courier New', monospace;
    font-size: 0.8em;
    line-height: 1.2;
}

/* Save Indicator */
#save-indicator {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(0, 100, 0, 0.8);
    color: #0f0;
    padding: 8px 15px;
    border: 1px solid #0f0;
    border-radius: 3px;
    font-size: 0.7em;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 500;
}

#save-indicator.visible {
    opacity: 1;
}

/* Expanded Settings */
.setting-section {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #0a0;
}

.setting-section h3 {
    color: #0f0;
    margin-bottom: 15px;
    font-size: 0.9em;
}

.settings-content .retro-button {
    background-color: #080;
    color: #000;
    border: 1px solid #000;
    padding: 10px 20px;
    cursor: pointer;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.9em;
    margin-top: 15px;
}

.settings-content .retro-button:hover {
    background-color: #0f0;
}

/* Checkbox styling */
.setting-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: #0f0;
}

/* Slider styling */
.setting-item input[type="range"] {
    accent-color: #0f0;
    width: 150px;
}

/* Blinking notification for taskbar buttons */
.blinking-notification {
    animation: blink 0.5s infinite;
}

@keyframes blink {

    0%,
    100% {
        background-color: #080;
    }

    50% {
        background-color: #0f0;
    }
}