:root {
    color-scheme: light;
    --shell-text: #f8fafc;
    --shell-panel: rgba(15, 23, 42, 0.42);
    --shell-border: rgba(255, 255, 255, 0.16);
    --card-bg: rgba(255, 255, 255, 0.14);
    --window-bg: rgba(248, 250, 252, 0.9);
    --window-text: #0f172a;
    --accent: #60a5fa;
    --taskbar-bg: rgba(15, 23, 42, 0.8);
    --shadow: 0 16px 40px rgba(15, 23, 42, 0.35);
    font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--wallpaper);
    color: var(--shell-text);
}

body[data-skin="apple"] {
    --accent: #fb7185;
    --taskbar-bg: rgba(45, 45, 45, 0.65);
    --window-bg: rgba(255, 251, 235, 0.92);
}

body[data-skin="linux"] {
    --accent: #f97316;
    --taskbar-bg: rgba(17, 24, 39, 0.86);
    --window-bg: rgba(249, 250, 251, 0.94);
}

.desktop-shell {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    min-height: 100vh;
}

.desktop-sidebar {
    padding: 32px;
    backdrop-filter: blur(20px);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.55), rgba(15, 23, 42, 0.32));
    border-right: 1px solid var(--shell-border);
}

.eyebrow {
    margin: 0 0 12px;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 12px;
    opacity: 0.72;
}

h1,
h2,
h3,
p,
ul {
    margin-top: 0;
}

h1 {
    font-size: 40px;
    line-height: 1;
    margin-bottom: 16px;
}

.lede {
    max-width: 24rem;
    font-size: 16px;
    opacity: 0.88;
}

.panel {
    margin-top: 24px;
    padding: 18px;
    border: 1px solid var(--shell-border);
    background: var(--shell-panel);
    border-radius: 18px;
    box-shadow: var(--shadow);
}

.skin-switcher {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skin-chip,
.text-link {
    color: inherit;
    text-decoration: none;
}

.skin-chip {
    display: inline-flex;
    align-items: center;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid var(--shell-border);
    background: rgba(255, 255, 255, 0.06);
}

.skin-chip.is-active {
    background: var(--accent);
    color: #0f172a;
    border-color: transparent;
}

.fact-list {
    padding-left: 18px;
    opacity: 0.9;
}

.desktop-stage {
    position: relative;
    overflow: hidden;
    padding: 24px;
}

.desktop-icons {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
    gap: 16px;
    width: min(720px, calc(100% - 80px));
}

.desktop-icon {
    width: 96px;
    padding: 12px 10px;
    border: 1px solid transparent;
    border-radius: 16px;
    text-align: center;
    background: rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: transform 140ms ease, background-color 140ms ease, border-color 140ms ease;
}

.desktop-icon:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--shell-border);
}

.desktop-icon-badge {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    margin: 0 auto 10px;
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.6);
    font-weight: 700;
}

.desktop-icon-label {
    display: block;
    font-size: 14px;
}

.widget-zone {
    position: absolute;
    top: 24px;
    right: 24px;
    display: grid;
    gap: 14px;
    width: min(320px, calc(100% - 48px));
}

.widget-card {
    padding: 16px;
    border-radius: 18px;
    border: 1px solid var(--shell-border);
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    box-shadow: var(--shadow);
}

.window-layer {
    position: absolute;
    inset: 24px 24px 92px 24px;
    pointer-events: none;
}

.window {
    position: absolute;
    display: flex;
    flex-direction: column;
    border-radius: 20px;
    overflow: hidden;
    background: var(--window-bg);
    color: var(--window-text);
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.3);
    border: 1px solid rgba(148, 163, 184, 0.25);
    pointer-events: auto;
}

.window.is-minimized {
    display: none;
}

.window-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.58);
    border-bottom: 1px solid rgba(148, 163, 184, 0.28);
    cursor: move;
}

.window-actions {
    display: flex;
    gap: 8px;
}

.window-action {
    width: 12px;
    height: 12px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: #cbd5e1;
    cursor: pointer;
}

.window-action[data-action="close"] {
    background: #ef4444;
}

.window-action[data-action="minimize"] {
    background: #f59e0b;
}

.window-action[data-action="maximize"] {
    background: #22c55e;
}

.window-content {
    padding: 18px;
    font-size: 15px;
    line-height: 1.5;
}

.taskbar {
    position: absolute;
    left: 24px;
    right: 24px;
    bottom: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    border-radius: 22px;
    background: var(--taskbar-bg);
    backdrop-filter: blur(18px);
    border: 1px solid var(--shell-border);
}

.start-button,
.taskbar-app-button {
    border: 0;
    border-radius: 999px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.12);
    color: inherit;
    cursor: pointer;
}

.taskbar-apps {
    display: flex;
    gap: 10px;
    flex: 1;
    overflow: auto;
}

.tray {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.tray-pill {
    padding: 8px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    font-size: 13px;
}

@media (max-width: 1100px) {
    .desktop-shell {
        grid-template-columns: 1fr;
    }

    .desktop-sidebar {
        border-right: 0;
        border-bottom: 1px solid var(--shell-border);
    }

    .desktop-stage {
        min-height: 70vh;
        padding-bottom: 120px;
    }

    .widget-zone {
        position: static;
        width: 100%;
        margin-top: 24px;
    }

    .window-layer {
        position: static;
        inset: auto;
        margin-top: 24px;
        display: grid;
        gap: 18px;
    }

    .window {
        position: relative;
        width: 100% !important;
        height: auto !important;
        left: auto !important;
        top: auto !important;
    }
}
