* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: -apple-system, 'Segoe UI', 'Trebuchet MS', Arial, sans-serif;
    overflow: hidden;
    background-color: #e9e9ec;
    background-image: url('https://github.com/Anycircle11139s/LarpOS/blob/main/LarpLarpLarpSahur.png?raw=true');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
}

body[data-theme="classic"] {
    --accent: #1d1d1f;
    --window-bg: rgba(255, 255, 255, 0.85);
    --window-text: #1d1d1f;
    --taskbar-bg: rgba(255, 255, 255, 0.7);
    --taskbar-text: #1d1d1f;
    --border: rgba(0, 0, 0, 0.12);
}

body[data-theme="night"] {
    --accent: #f5f5f7;
    --window-bg: rgba(28, 28, 30, 0.85);
    --window-text: #f5f5f7;
    --taskbar-bg: rgba(20, 20, 22, 0.75);
    --taskbar-text: #f5f5f7;
    --border: rgba(255, 255, 255, 0.12);
}

#desktop-icons {
    position: absolute;
    top: 44px;
    left: 24px;
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.icon {
    width: 76px;
    text-align: center;
    cursor: pointer;
    color: #1d1d1f;
    user-select: none;
}

.icon-img {
    width: 46px;
    height: 46px;
    margin: 0 auto 6px auto;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    font-weight: 600;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.icon span {
    font-size: 12px;
    text-shadow: 0 1px 3px rgba(255,255,255,0.8);
}

.window {
    display: none;
    flex-direction: column;
    position: absolute;
    width: fit-content;
    min-width: 240px;
    min-height: 120px;
    max-width: 90vw;
    max-height: 85vh;
    border-radius: 10px;
    background: var(--window-bg, rgba(255,255,255,0.85));
    color: var(--window-text, #1d1d1f);
    box-shadow: 0 20px 45px rgba(0,0,0,0.35);
    overflow: hidden;
    border: 1px solid var(--border, rgba(0,0,0,0.12));
    backdrop-filter: blur(20px);
}

.resize-handle {
    position: absolute;
    width: 18px;
    height: 18px;
    right: 0;
    bottom: 0;
    cursor: nwse-resize;
    flex-shrink: 0;
}

.resize-handle::after {
    content: "";
    position: absolute;
    right: 4px;
    bottom: 4px;
    width: 8px;
    height: 8px;
    border-right: 2px solid rgba(0,0,0,0.3);
    border-bottom: 2px solid rgba(0,0,0,0.3);
}

.title-bar {
    background: transparent;
    border-bottom: 1px solid var(--border, rgba(0,0,0,0.1));
    padding: 10px 12px;
    display: flex;
    align-items: center;
    cursor: move;
    user-select: none;
    position: relative;
    flex-shrink: 0;
}

.traffic-lights {
    display: flex;
    gap: 8px;
    align-items: center;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    cursor: pointer;
}

.dot.red {
    background: #ff5f57;
}

.dot.yellow {
    background: #febc2e;
}

.dot.green {
    background: #28c840;
}

.title-text {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-size: 13px;
    font-weight: 600;
}

.window-body {
    padding: 18px;
    font-size: 14px;
    line-height: 1.5;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
}

.link-box {
    display: block;
    width: fit-content;
    margin: 14px auto 0px auto;
    border: 1px solid var(--border, rgba(0,0,0,0.15));
    border-radius: 8px;
    padding: 8px 16px;
    text-decoration: none;
    color: var(--window-text, #1d1d1f);
    font-weight: 600;
    background: rgba(0,0,0,0.04);
}

.terminal-body {
    width: 100%;
    height: auto;
    flex: 1;
    min-height: 0;
    background: #1c1c1e;
    color: #d1d1d6;
    font-family: 'Menlo', monospace;
    overflow-y: auto;
    padding: 14px;
    font-size: 13px;
}

#input-line {
    display: flex;
    align-items: center;
    margin-top: 6px;
}

.prompt {
    margin-right: 6px;
    color: #28c840;
}

#command-input {
    background: transparent;
    border: none;
    color: #f5f5f7;
    font-family: 'Menlo', monospace;
    outline: none;
    width: 100%;
    font-size: 13px;
}

.theme-options {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.theme-options button {
    padding: 7px 12px;
    border-radius: 8px;
    border: 1px solid var(--border, rgba(0,0,0,0.15));
    cursor: pointer;
    background: rgba(0,0,0,0.05);
    color: var(--window-text, #1d1d1f);
    font-size: 13px;
}

#context-menu {
    display: none;
    position: absolute;
    background: rgba(255,255,255,0.9);
    color: #1d1d1f;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    overflow: hidden;
    z-index: 999;
    border: 1px solid rgba(0,0,0,0.1);
    backdrop-filter: blur(20px);
}

.context-item {
    padding: 10px 18px;
    cursor: pointer;
    font-size: 13px;
}

.context-item:hover {
    background: rgba(0,0,0,0.06);
}

#taskbar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--taskbar-bg, rgba(255,255,255,0.7));
    color: var(--taskbar-text, #1d1d1f);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 22px;
    backdrop-filter: blur(20px);
    font-size: 13px;
    border-top: 1px solid var(--border, rgba(0,0,0,0.1));
}

#start-btn {
    font-weight: 700;
    letter-spacing: 0.3px;
    cursor: default;
}

#open-windows {
    display: flex;
    gap: 10px;
    font-size: 12px;
    opacity: 0.8;
}
