/* =====================================================
   WebOS v1.0 — COMPLETE CSS
   ===================================================== */


/* =====================================================
   1. RESET
   ===================================================== */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    width: 100%;
    height: 100%;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    overflow: hidden;
    background: #070b16;
    color: white;
}


/* =====================================================
   2. WELCOME SCREEN
   ===================================================== */

#welcomeScreen {
    position: fixed;
    inset: 0;

    z-index: 99999;

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    text-align: center;

    background:
        radial-gradient(
            circle at center,
            #29457d 0%,
            #121d39 45%,
            #050811 100%
        );

    color: white;

    opacity: 1;
    visibility: visible;

    transition:
        opacity 0.5s ease,
        visibility 0.5s ease;
}

#welcomeScreen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.welcomeLogo {
    font-size: 90px;
    margin-bottom: 20px;

    animation: logoPulse 2s infinite;
}

#welcomeScreen h1 {
    font-size: 48px;
    margin-bottom: 12px;
}

.welcomeVersion {
    font-size: 20px;
    opacity: 0.8;
    margin-bottom: 10px;
}

.welcomeMessage {
    font-size: 18px;
    opacity: 0.7;
    margin-bottom: 30px;
}

#startWebOS {
    border: none;
    border-radius: 10px;

    padding: 14px 30px;

    font-size: 18px;
    font-weight: bold;

    background: #31599c;
    color: white;

    cursor: pointer;

    transition:
        transform 0.2s,
        background 0.2s;
}

#startWebOS:hover {
    background: #4775c1;
    transform: scale(1.05);
}

#startWebOS:active {
    transform: scale(0.97);
}

#welcomeLoading {
    margin-top: 25px;
    font-size: 14px;
    opacity: 0.55;
}

@keyframes logoPulse {

    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.08);
    }

    100% {
        transform: scale(1);
    }
}


/* =====================================================
   3. DESKTOP
   ===================================================== */

#desktop {
    position: fixed;

    top: 0;
    left: 0;
    right: 0;
    bottom: 58px;

    overflow: hidden;

    padding: 20px;

    background:
        radial-gradient(
            circle at 20% 20%,
            #29457d 0%,
            #121d39 35%,
            #070b16 100%
        );

    z-index: 1;
}


/* =====================================================
   4. DESKTOP ICONS
   ===================================================== */

.desktop-icon {
    width: 110px;
    min-height: 120px;

    margin-bottom: 15px;

    padding: 10px;

    display: flex;
    flex-direction: column;
    align-items: center;

    border-radius: 12px;

    cursor: pointer;

    transition:
        background 0.15s;
}

.desktop-icon:hover {
    background: rgba(255, 255, 255, 0.10);
}

.desktop-icon .icon {
    width: 80px;
    height: 80px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 16px;

    background:
        rgba(255, 255, 255, 0.08);

    font-size: 52px;

    margin-bottom: 6px;
}

.desktop-icon span {
    color: white;

    font-size: 15px;

    text-align: center;

    text-shadow:
        0 1px 3px black;
}


/* =====================================================
   5. WINDOWS
   ===================================================== */

.window {
    position: absolute;

    top: 100px;
    left: 260px;

    width: 650px;
    height: 450px;

    max-width: calc(100vw - 300px);
    max-height: calc(100vh - 180px);

    overflow: hidden;

    background:
        rgba(22, 28, 43, 0.98);

    border:
        1px solid rgba(255, 255, 255, 0.15);

    border-radius: 12px;

    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.55);
}


/* =====================================================
   6. WINDOW HEADER
   ===================================================== */

.windowHeader {
    height: 48px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 0 12px;

    background:
        rgba(255, 255, 255, 0.08);

    border-bottom:
        1px solid rgba(255, 255, 255, 0.10);

    font-weight: bold;
}

.windowControls {
    display: flex;
    gap: 5px;
}

.windowControls button {
    width: 34px;
    height: 30px;

    border: none;
    border-radius: 6px;

    background:
        rgba(255, 255, 255, 0.08);

    color: white;

    font-size: 18px;

    cursor: pointer;
}

.windowControls button:hover {
    background:
        rgba(255, 255, 255, 0.20);
}


/* =====================================================
   7. MAXIMIZED WINDOWS
   ===================================================== */

.window.maximized {
    top: 0 !important;
    left: 0 !important;

    width: 100% !important;
    height: calc(100% - 58px) !important;

    max-width: none !important;
    max-height: none !important;

    border-radius: 0;
}


/* =====================================================
   8. FILE MANAGER
   ===================================================== */

.windowContent {
    height: calc(100% - 48px);

    padding: 25px;

    overflow: auto;
}

.windowContent h2 {
    margin-bottom: 25px;
}

.fileArea {
    padding: 20px;

    border-radius: 10px;

    background:
        rgba(255, 255, 255, 0.05);

    line-height: 1.5;

    font-size: 17px;
}


/* =====================================================
   9. NOTES
   ===================================================== */

.notesContent {
    height: calc(100% - 48px);

    display: flex;
    flex-direction: column;

    padding: 15px;
}

.notesToolbar {
    display: flex;
    gap: 10px;

    margin-bottom: 12px;
}

.notesToolbar button {
    border: none;
    border-radius: 7px;

    padding: 9px 14px;

    background: #31599c;
    color: white;

    cursor: pointer;
}

.notesToolbar button:hover {
    background: #4775c1;
}

#notesEditor {
    flex: 1;

    width: 100%;

    resize: none;

    outline: none;

    border:
        1px solid rgba(255, 255, 255, 0.12);

    border-radius: 8px;

    padding: 15px;

    background: #080d19;

    color: white;

    font-family: Arial, sans-serif;

    font-size: 16px;
}

#saveStatus {
    margin-top: 8px;

    font-size: 13px;

    opacity: 0.65;
}


/* =====================================================
   10. CALCULATOR
   ===================================================== */

.calculatorContent {
    height: calc(100% - 48px);

    padding: 20px;

    display: flex;
    flex-direction: column;

    gap: 15px;
}

#calculatorDisplay {
    width: 100%;
    height: 65px;

    border: none;
    border-radius: 10px;

    padding: 10px 15px;

    outline: none;

    text-align: right;

    font-size: 30px;

    background: #080d19;
    color: white;
}

.calculatorButtons {
    flex: 1;

    display: grid;

    grid-template-columns:
        repeat(4, 1fr);

    gap: 10px;
}

.calculatorButtons button {
    border: none;
    border-radius: 10px;

    background:
        rgba(255, 255, 255, 0.10);

    color: white;

    font-size: 20px;

    cursor: pointer;

    transition:
        background 0.15s,
        transform 0.1s;
}

.calculatorButtons button:hover {
    background:
        rgba(255, 255, 255, 0.18);
}

.calculatorButtons button:active {
    transform: scale(0.95);
}

.calculatorButtons .zero {
    grid-column: span 2;
}

.calculatorButtons .equals {
    background: #31599c;
}

.calculatorButtons .equals:hover {
    background: #4775c1;
}


/* =====================================================
   11. SETTINGS
   ===================================================== */

.settingsContent {
    height: calc(100% - 48px);

    padding: 25px;

    overflow-y: auto;
}

.settingsContent h2 {
    margin-bottom: 20px;
}

.settingsSection {
    margin-bottom: 20px;

    padding: 16px;

    border-radius: 10px;

    background:
        rgba(255, 255, 255, 0.05);
}

.settingsSection h3 {
    margin-bottom: 10px;
}

.settingsSection p {
    margin-top: 7px;

    font-size: 14px;

    opacity: 0.75;

    word-break: break-word;
}


/* =====================================================
   12. TASK MANAGER
   ===================================================== */

.taskManagerContent {
    height: calc(100% - 48px);

    padding: 25px;

    overflow-y: auto;
}

.monitorCards {
    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 12px;

    margin: 20px 0 25px;
}

.monitorCard {
    padding: 18px;

    border-radius: 10px;

    background:
        rgba(255, 255, 255, 0.06);

    display: flex;
    flex-direction: column;

    gap: 10px;
}

.monitorCard span {
    font-size: 14px;
    opacity: 0.65;
}

.monitorCard strong {
    font-size: 18px;
}

#runningApps {
    display: flex;

    flex-direction: column;

    gap: 8px;

    margin: 12px 0 20px;
}

.runningApp {
    padding: 12px;

    border-radius: 8px;

    background:
        rgba(255, 255, 255, 0.06);
}

#refreshTaskManager {
    border: none;

    border-radius: 8px;

    padding: 10px 15px;

    background: #31599c;

    color: white;

    cursor: pointer;
}

#refreshTaskManager:hover {
    background: #4775c1;
}


/* =====================================================
   13. TASKBAR
   ===================================================== */

#taskbar {
    position: fixed;

    left: 0;
    right: 0;
    bottom: 0;

    height: 58px;

    z-index: 50000;

    display: flex;

    align-items: center;

    gap: 8px;

    padding: 7px 9px;

    background:
        rgba(9, 13, 24, 0.97);

    border-top:
        1px solid rgba(255, 255, 255, 0.12);
}

#startButton {
    width: 44px;
    height: 44px;

    border: none;

    border-radius: 9px;

    background:
        rgba(255, 255, 255, 0.08);

    color: white;

    font-size: 25px;

    cursor: pointer;
}

#startButton:hover {
    background:
        rgba(255, 255, 255, 0.18);
}


/* =====================================================
   14. TASKBAR APPLICATIONS
   ===================================================== */

#taskbarApps {
    display: flex;

    align-items: center;

    gap: 6px;

    height: 100%;
}

.taskbarApp {
    height: 42px;

    min-width: 100px;

    border: none;

    border-radius: 8px;

    padding: 0 12px;

    background:
        rgba(255, 255, 255, 0.07);

    color: white;

    cursor: pointer;
}

.taskbarApp:hover {
    background:
        rgba(255, 255, 255, 0.15);
}


/* =====================================================
   15. START MENU
   ===================================================== */

#startMenu {
    position: absolute;

    left: 8px;
    bottom: 66px;

    width: 330px;
    min-height: 420px;

    padding: 15px;

    border:
        1px solid rgba(255, 255, 255, 0.14);

    border-radius: 14px;

    background:
        rgba(18, 24, 39, 0.98);

    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.55);
}


/* =====================================================
   16. SEARCH
   ===================================================== */

#searchBox {
    height: 42px;

    display: flex;
    align-items: center;

    padding: 0 12px;

    margin-bottom: 15px;

    border-radius: 8px;

    background:
        rgba(255, 255, 255, 0.07);

    color:
        rgba(255, 255, 255, 0.55);
}


/* =====================================================
   17. START MENU APPS
   ===================================================== */

.startApps {
    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 8px;
}

.appButton {
    min-height: 85px;

    border: none;

    border-radius: 9px;

    background:
        rgba(255, 255, 255, 0.06);

    color: white;

    cursor: pointer;

    display: flex;

    flex-direction: column;

    align-items: center;
    justify-content: center;

    gap: 6px;

    font-size: 28px;
}

.appButton span {
    font-size: 12px;
}

.appButton:hover {
    background:
        rgba(255, 255, 255, 0.14);
}


/* =====================================================
   18. START MENU BOTTOM
   ===================================================== */

#startBottom {
    position: absolute;

    left: 15px;
    right: 15px;
    bottom: 15px;

    display: flex;

    justify-content: space-between;
    align-items: center;

    padding-top: 12px;

    border-top:
        1px solid rgba(255, 255, 255, 0.10);
}

#startBottom span {
    font-size: 14px;

    opacity: 0.75;
}

#powerButton {
    width: 38px;
    height: 38px;

    border: none;

    border-radius: 8px;

    background:
        rgba(255, 255, 255, 0.07);

    color: white;

    font-size: 18px;

    cursor: pointer;
}

#powerButton:hover {
    background:
        rgba(255, 80, 80, 0.25);
}


/* =====================================================
   19. SYSTEM TRAY
   ===================================================== */

#systemTray {
    margin-left: auto;

    display: flex;

    align-items: center;

    gap: 18px;

    padding-right: 8px;

    font-size: 14px;
}

#battery,
#clock {
    white-space: nowrap;

    opacity: 0.9;
}


/* =====================================================
   20. SCROLLBAR
   ===================================================== */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background:
        rgba(255, 255, 255, 0.03);
}

::-webkit-scrollbar-thumb {
    background:
        rgba(255, 255, 255, 0.20);

    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background:
        rgba(255, 255, 255, 0.30);
}


/* =====================================================
   21. RESPONSIVE
   ===================================================== */

@media (max-width: 800px) {

    .window {
        left: 10px;

        top: 70px;

        width: calc(100vw - 20px);

        max-width: none;
    }

    .monitorCards {
        grid-template-columns: 1fr;
    }

    #startMenu {
        width: 300px;
    }

}


@media (max-height: 600px) {

    .window {
        top: 65px;

        height: calc(100vh - 125px);
    }

}
