* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    height: 100vh; 
    background-image: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.5)), url('https://images.unsplash.com/photo-1618005182384-a83a8bd57fbe?q=80&w=1920'); 
    background-size: cover;
    background-position: center;
    overflow: hidden; 
    user-select: none;
}
.top-bar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 20px;
    color: #ffffff;
    background-color: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    font-size: 0.85rem;
    font-weight: 500;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    z-index: 99999;
}

.os-branding { font-weight: 700; cursor: pointer; color: #ffcc00; }

#desktopApps {
    position: absolute;
    top: 50px;
    left: 20px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    z-index: 5;
}

.desktop-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 85px;
    cursor: pointer;
    text-align: center;
    padding: 8px;
    border-radius: 10px;
}
.desktop-icon p {
    color: #ffffff;
    font-size: 0.75rem;
    margin-top: 8px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}
.desktop-icon:hover { background-color: rgba(255, 255, 255, 0.1); }
.desktop-icon.selected { background-color: rgba(255, 255, 255, 0.2); }

.window {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(22, 22, 28, 0.75);
    backdrop-filter: blur(35px);
    -webkit-backdrop-filter: blur(35px);
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 10;
}

.window.fullscreen {
    width: 100vw !important;
    height: calc(100vh - 31px) !important;
    top: 31px !important;
    left: 0 !important;
    transform: none !important;
    border-radius: 0 !important;
}

.windowheader {
    background-color: rgba(0, 0, 0, 0.2);
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    cursor: move;
}

.headertext { color: rgba(255, 255, 255, 0.85); font-size: 0.8rem; font-weight: 600; pointer-events: none; }
.window-content { padding: 16px; color: #ffffff; display: flex; flex-direction: column; align-items: center; justify-content: center; flex: 1; overflow-y: auto; }

.realm-controls { display: flex; gap: 8px; width: 52px; }
.closebutton, .minimizebutton, .maximizebutton, .maximizebutton-disabled { width: 12px; height: 12px; border-radius: 50%; cursor: pointer; }
.closebutton { background-color: #ff5f56; }
.minimizebutton { background-color: #ffbd2e; }
.maximizebutton { background-color: #27c93f; }
.maximizebutton-disabled { background-color: rgba(255,255,255,0.1); cursor: default; }

#notepad { width: 100%; height: 100%; background: transparent; border: none; resize: none; padding: 20px; color: rgba(255,255,255,0.9); font-size: 0.95rem; outline: none; }

.calc-btn { padding: 16px; font-size: 1.1rem; font-weight: 600; border: none; border-radius: 10px; cursor: pointer; }
.num-btn { background-color: rgba(255, 255, 255, 0.08); color: #fff; }
.op-btn { background-color: rgba(255, 149, 0, 0.15); color: #ff9500; }
.gold-accent { background-color: rgba(255, 204, 0, 0.15); color: #ffcc00; }

.mail-layout { background-color: rgba(16, 16, 20, 0.85); }
.mail-sidebar { width: 160px; background: rgba(0, 0, 0, 0.2); padding: 14px 10px; display: flex; flex-direction: column; gap: 14px; }
.compose-btn { width: 100%; padding: 10px; background: #ff9500; color: white; border: none; border-radius: 8px; font-weight: 600; cursor: pointer; }
.compose-btn:disabled { background: rgba(255,255,255,0.05); color: rgba(255,255,255,0.3); cursor: not-allowed; }

.mail-folders { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.mail-folders li { font-size: 0.8rem; padding: 8px 10px; border-radius: 6px; cursor: pointer; opacity: 0.75; color: #fff; }
.mail-folders li.active, .mail-folders li:hover { background: rgba(255, 255, 255, 0.1); opacity: 1; }

.mail-body { flex: 1; display: flex; flex-direction: column; overflow-y: auto; }
.mail-viewer { flex: 1; display: flex; flex-direction: column; padding: 20px; overflow-y: auto; }
.mail-item-row { padding: 12px 16px; border-bottom: 1px solid rgba(255, 255, 255, 0.05); cursor: pointer; }
.mail-item-row:hover { background: rgba(255, 255, 255, 0.04); }
.mail-meta { display: flex; justify-content: space-between; font-size: 0.8rem; margin-bottom: 4px; }
.mail-subject { font-size: 0.85rem; opacity: 0.85; }

.vault-grid-layout { display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 12px; width: 100%; }
.file-item { padding: 10px; border-radius: 8px; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.05); cursor: pointer; text-align: center; }
.file-item:hover { background: rgba(255,255,255,0.08); }

.wallpaper-options { display: flex; gap: 12px; width: 100%; }
.wallpaper-btn { flex: 1; padding: 12px; background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.12); color: #ffffff; border-radius: 8px; font-weight: 600; cursor: pointer; font-size: 0.8rem; }
.wallpaper-btn:hover { background: rgba(255, 255, 255, 0.18); }

.mythic-avatar { font-size: 3.5rem; margin-bottom: 12px; filter: drop-shadow(0 0 15px rgba(255,204,0,0.4)); }

.bottom-bar { position: absolute; bottom: 12px; width: 100%; display: flex; justify-content: center; z-index: 999999; pointer-events: none; }
.dock-container { background-color: rgba(0, 0, 0, 0.25); backdrop-filter: blur(30px); -webkit-backdrop-filter: blur(30px); padding: 10px 14px; border-radius: 22px; display: flex; align-items: center; gap: 12px; border: 1px solid rgba(255, 255, 255, 0.1); pointer-events: auto; }
.dock-icon { position: relative; cursor: pointer; transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.dock-icon:hover { transform: scale(1.2) translateY(-6px); }

.app-icon-wrapper { width: 44px; height: 44px; border-radius: 11px; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; }
.welcome-gradient { background: linear-gradient(135deg, #ffcc00, #ff9500); }
.scroll-gradient { background: linear-gradient(135deg, #ff5e62, #ff9966); }
.oracle-gradient { background: linear-gradient(135deg, #af52de, #5856d6); }
.vault-gradient { background: linear-gradient(135deg, #34c759, #11998e); }
.mail-gradient { background: linear-gradient(135deg, #007aff, #0051a8); }
.music-gradient { background: linear-gradient(135deg, #ff2d55, #ff512f); }

.dock-separator { width: 1px; height: 32px; background-color: rgba(255, 255, 255, 0.15); }
.dock-tooltip { position: absolute; bottom: 60px; left: 50%; transform: translateX(-50%) scale(0.8); background-color: rgba(15, 15, 20, 0.9); color: #fff; padding: 5px 12px; border-radius: 6px; font-size: 0.75rem; font-weight: 500; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity 0.15s, transform 0.15s; }
.dock-icon:hover .dock-tooltip { opacity: 1; transform: translateX(-50%) scale(1); }
