:root {
    --aqua-blue: #7ca9f4;
    --aqua-dark: #3b6fb6;
    --pinstripe: rgba(0, 0, 0, 0.05);
}

body {
    margin: 0;
    padding: 0;
    background-color: #5186cf;
    background-image: linear-gradient(var(--pinstripe) 1px, transparent 1px);
    background-size: 100% 3px;
    font-family: "Lucida Grande", "Segoe UI", sans-serif;
    height: 100vh;
    overflow: hidden;
}

#desktop {
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#menu-bar {
    width: 100%;
    height: 22px;
    background: rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid #aaa;
    display: flex;
    align-items: center;
    padding: 0 15px;
    font-size: 13px;
    font-weight: bold;
    box-sizing: border-box;
}

#menu-bar span { margin-right: 15px; }
#menu-bar .apple-logo { font-size: 18px; margin-right: 20px; }
#menu-bar .right { margin-left: auto; margin-right: 0; }

#window {
    width: 500px;
    background: #ececec;
    border-radius: 5px 5px 0 0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    margin-top: 100px;
    border: 1px solid #999;
}

#title-bar {
    height: 24px;
    background: linear-gradient(#e0e0e0, #b0b0b0);
    border-bottom: 1px solid #888;
    display: flex;
    align-items: center;
    padding: 0 8px;
}

#traffic-lights {
    display: flex;
    gap: 6px;
    margin-right: 100px;
}

.light {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 1px solid rgba(0,0,0,0.2);
}
.red { background: #ff5f57; }
.yellow { background: #ffbd2e; }
.green { background: #28c840; }

#window-title {
    font-size: 12px;
    color: #333;
    font-weight: bold;
    flex-grow: 1;
    text-align: center;
    margin-right: 118px;
}

#window-body {
    padding: 20px;
    min-height: 200px;
    font-size: 13px;
}

#stats {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

#heat-bar {
    width: 100px;
    height: 10px;
    background: #ccc;
    border-radius: 5px;
    overflow: hidden;
    display: inline-block;
    vertical-align: middle;
}

#heat-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(#ff9999, #ff0000);
    transition: width 0.3s;
}

#log-area {
    background: #fff;
    border: 1px inset #aaa;
    height: 100px;
    padding: 10px;
    overflow-y: auto;
    font-family: monospace;
    margin-bottom: 20px;
}

#log-area p { margin: 0 0 5px 0; font-size: 11px; }

#action-area {
    height: 100px;
    border: 2px dashed rgba(0,0,0,0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 10px;
}

#system-folder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    font-size: 10px;
    color: #333;
    padding: 10px;
}

#system-folder img { width: 48px; }

.extension-conflict {
    position: absolute;
    width: 48px;
    height: 48px;
    cursor: grab;
    z-index: 50;
    text-align: center;
    font-size: 9px;
    color: #fff;
    text-shadow: 1px 1px #000;
}

.extension-conflict img { width: 32px; display: block; margin: 0 auto; }

#desktop.panic {
    animation: panic-flash 0.2s infinite;
}

@keyframes panic-flash {
    0% { background-color: #5186cf; }
    50% { background-color: #cf5151; }
}

#dock {
    position: absolute;
    bottom: 5px;
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 10px 10px 0 0;
    padding: 5px 15px;
    display: flex;
    gap: 10px;
    box-shadow: 0 -5px 15px rgba(0,0,0,0.1);
}

.dock-item {
    width: 48px;
    height: 48px;
    transition: transform 0.2s;
    cursor: pointer;
}

.dock-item img { width: 100%; height: 100%; }
.dock-item:hover { transform: scale(1.2) translateY(-10px); }

.crashing {
    animation: bounce 0.5s infinite alternate;
}

@keyframes bounce {
    from { transform: translateY(0); }
    to { transform: translateY(-15px); }
}

#beachball {
    position: absolute;
    pointer-events: none;
    z-index: 100;
    cursor: pointer;
}

#beachball img {
    animation: spin 1s infinite linear;
    width: 48px;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 200;
}

.modal {
    background: #fff;
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    max-width: 400px;
}

button {
    background: linear-gradient(#7ca9f4, #3b6fb6);
    color: white;
    border: 1px solid #2a5a9a;
    padding: 10px 25px;
    border-radius: 20px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

button:active { transform: translateY(1px); }
