* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: Arial, sans-serif;
}

h1, h2, p {
    margin: 0;
}


/* LOGIN */

#login-screen {
    width: 100vw;
    height: 100vh;
    overflow: hidden;

      background:
        linear-gradient(
            rgba(0, 0, 0, 0.35),
            rgba(0, 0, 0, 0.35)
        ),
        url("strona/memes.png");

    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;;
    color: #ffffff;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.8);

    display: flex;
    flex-direction: column;

    justify-content: center;
    align-items: center;
}

#login-screen h1 {
    font-size: 60px;
}

.user {
    font-size: 70px;
}

#login-button {
    margin-top: 20px;

    padding: 12px 30px;

    border: none;
    border-radius: 8px;

    background: #7c7cff;
    color: white;

    font-size: 18px;

    cursor: pointer;
}


/* DESKTOP */

#desktop {
    display: none;

    width: 100vw;
    height: 100vh;
    overflow: hidden;

    background:
        linear-gradient(
            rgba(0, 0, 0, 0.35),
            rgba(0, 0, 0, 0.35)
        ),
        url("strona/map.webp");

    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;

    position: relative;

    color: white;
}

/* ICONS */

.desktop-icon {
    position: absolute;
    width: 80px;
    text-align: center;
    cursor: pointer;
}

.files-icon {
    left: 60%;
    top: 63%;
}

.sus-icon {
    left: 1%;
    top: 10%;
}

.notes-icon {
    left: 44.6%;
    top: 62%;
}

.calculator-icon {
    left: 72%;
    top: 25%;
}

.settings-icon {
    left: 5%;
    top: 88%;
}

.desktop-icon span {
    display: block;

    margin-top: 5px;
}

.app-window {
    position: absolute;
    top: 18%;
    left: 30%;
    min-width: 280px;
    max-width: 520px;
    color: #111;
    background: rgba(255, 255, 255, 0.94);
    border: 2px solid #555;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    z-index: 10;
    overflow: hidden;
    user-select: none;
}

#files-window {
    width: min(520px, calc(100vw - 32px));
    max-height: 70vh;
}

.window-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: #ddd;
    border-bottom: 1px solid #bbb;
    cursor: grab;
    font-weight: 700;
}

.window-header:active {
    cursor: grabbing;
}

.close-window {
    border: none;
    background: transparent;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.window-menu-button {
    border: none;
    background: transparent;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    color: #222;
}

.window-menu {
    position: fixed;
    top: 0;
    left: 0;
    background: rgba(0, 0, 0, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 8px;
    z-index: 200;
}

.window-menu-item {
    width: 110px;
    border: none;
    background: transparent;
    color: white;
    text-align: left;
    padding: 8px 10px;
    border-radius: 6px;
    cursor: pointer;
}

.window-menu-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.app-window p,
.app-window textarea,
.app-window .image-gallery {
    padding: 12px;
}

.calculator-app {
    width: min(320px, calc(100vw - 24px));
}

.calculator-body {
    padding: 12px;
    background: #f3f3f3;
}

.calculator-display {
    min-height: 62px;
    padding: 16px 12px;
    margin-bottom: 12px;
    border-radius: 8px;
    background: #1f2a2d;
    color: #fff;
    font-size: 2rem;
    text-align: right;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.calculator-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.calculator-btn {
    border: none;
    border-radius: 8px;
    background: #dfe6eb;
    color: #111;
    font-size: 1.1rem;
    font-weight: 700;
    min-height: 52px;
    cursor: pointer;
    transition: transform 0.1s ease, background 0.15s ease;
}

.calculator-btn:hover {
    background: #ced8df;
}

.calculator-btn:active {
    transform: scale(0.98);
}

.calculator-clear {
    background: #ffb3b3;
}

.calculator-clear:hover {
    background: #ffa3a3;
}

.calculator-equals {
    grid-row: span 2;
    background: #8ec5ff;
}

.calculator-equals:hover {
    background: #7ab8ff;
}

.calculator-zero {
    grid-column: span 2;
}

.app-window textarea {
    width: 100%;
    min-height: 120px;
    box-sizing: border-box;
    resize: vertical;
    border: 1px solid #ccc;
    border-radius: 6px;
}

.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 12px;
    max-height: calc(70vh - 58px);
    overflow-y: auto;
}

.image-gallery img {
    width: 100%;
    height: 120px;
    object-fit: contain;
    background: #e9e9e9;
    border-radius: 6px;
}

.start-menu {
    position: absolute;
    left: 10px;
    bottom: 65px;
    width: 180px;
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 10px;
    z-index: 30;
}

.start-menu-item {
    display: block;
    width: 100%;
    padding: 10px 12px;
    margin: 4px 0;
    text-align: left;
    background: transparent;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.logout-item {
    display: none;
}

#popup-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.start-menu-item:hover {
    background: rgba(255, 255, 255, 0.15);
}

.floating-popup {
    position: absolute;
    min-width: 100px;
    max-width: 240px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.3);
    color: #111;
    font-size: 14px;
    z-index: 20;
    cursor: pointer;
    user-select: none;
    animation: popupPulse 1.2s ease-in-out infinite alternate;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    pointer-events: auto;
}

@keyframes popupPulse {
    from {
        transform: scale(1);
    }
    to {
        transform: scale(1.02);
    }
}

.popup-image {
    order: 2;
    width: 90px;
    height: 50px;
    object-fit: contain;
    border-radius: 8px;
    flex-shrink: 0;
    display: block;
    background: rgba(0, 0, 0, 0.05);
    padding: 2px;
}

.popup-body {
    order: 1;
    position: relative;
    padding: 9px 12px;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid #333;
    border-radius: 16px;
    text-align: center;
    overflow-wrap: anywhere;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.popup-body::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -10px;
    width: 16px;
    height: 16px;
    background: rgba(255, 255, 255, 0.95);
    border-right: 2px solid #333;
    border-bottom: 2px solid #333;
    transform: translateX(-50%) rotate(45deg);
}

.floating-popup strong {
    display: block;
    font-size: 16px;
}

#accessdenied-screen {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.8);
    background-image: url("strona/error.webp");
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    color: white;
    padding: 40px;
    min-width: 280px;
    min-height: 160px;
    border-radius: 12px;
    text-align: center;
    font-size: 24px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#accessdenied-screen[hidden] {
    display: none;
}

.dead-screen, .kicked-screen {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.8);
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    color: white;
    padding: 40px;
    min-width: 280px;
    min-height: 160px;
    border-radius: 12px;
    text-align: center;
    font-size: 24px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.dead-screen {
    inset: auto;
    bottom: 23%;
    left: 50%;
    width: min(760px, calc(100vw - 40px));
    height: min(220px, calc(100vh - 48px));
    transform: translateX(-50%);
    background-image: url("strona/sad.webp");
    background-size: contain;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 1001;
}

.kicked-screen {
    top: 24px;
    bottom: auto;
    height: min(220px, calc(100vh - 48px));
    background-image: url("strona/Kick.webp");
    background-size: contain;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 1002;
}

.dead-screen[hidden], .kicked-screen[hidden] {
    display: none;
}
/* TASKBAR */

#taskbar {
    position: absolute;

    bottom: 0;
    left: 0;

    width: 100%;

    height: 55px;

    background: rgba(0, 0, 0, 0.7);

    display: flex;

    align-items: center;

    justify-content: space-between;

    padding: 0 20px;
}

#start-button {
    font-size: 25px;

    background: transparent;

    border: none;

    color: black;

    cursor: pointer;
}

#easter-egg {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 12px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    text-align: center;
    z-index: 2000;
}

#easter-egg[hidden] {
    display: none;
}

#easter-egg img {
    width: 200px;
    height: 200px;
    object-fit: contain;
}

#easteregg-button {
    font-size: 25px;

    background-image: url("strona/among-us.png");

    border: none;

    color: black;

    cursor: pointer;
}
