
#desktop-root {
    opacity: 0;
    transition: opacity 0.6s ease;
}


body {
    background: url('/assets/icons/wall_aryan.jpg') no-repeat center center fixed;
    background-size: cover;
    margin: 0;
    padding: 0 !important;
    font-family: "Segoe UI", sans-serif;
    overflow: hidden;
}

.desktop {
    display: flex;
    position: relative;
    flex-wrap: wrap;
    flex-direction: column; /* 关键：使图标从上往下排列 */
    align-content: flex-start; /* 关键：控制列的起始位置 */
    height: calc(100vh - 46px); /* 使用视口高度，绝对定位图标不会令桌面坍缩 */
    box-sizing: border-box;
    padding: 20px !important;
    overflow-y: auto !important;
    max-height: calc(100vh - 61px);
    gap: 20px;
}

.icon {
    position: relative;
    max-width: 100px;
    max-height: 100px;
    text-align: center;
    user-select: none;
    flex-shrink: 0; /* 禁止被压缩 */
    transition: none !important; /* 关闭动画，防止不必要的位移 */
    touch-action: none;
}

.icon.dragging {
    opacity: 0.82;
    filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.28));
}

    .icon img {
        width: 64px;
        height: 64px;
        object-fit: contain;
        border-radius: 12px;
        padding: 6px;
        background-color: transparent;
        transition: background 0.3s;
        pointer-events: none;
        -webkit-user-drag: none;
        user-drag: none;
    }

    .icon:hover img {
        background-color: rgba(255, 255, 255, 0.2);
    }

    .icon label {
        display: block;
        font-size: 12px;
        color: white;
        pointer-events: none;
    }

    /* 防止点击出现outline等影响布局 */
    .icon:focus,
    .icon img:focus {
        outline: none;
    }

.taskbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 42px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    padding: 0 12px;
    box-shadow: 0 -1px 4px rgba(0, 0, 0, 0.3);
}

.start-button {
    width: 38px;
    height: 38px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    cursor: default;
}

    .start-button img {
        width: 28px;
        height: 28px;
        object-fit: contain;
    }

.start-menu h4 {
    margin-top: 0;
    font-size: 16px;
    color: #222;
    border-bottom: 1px solid #ccc;
    padding-bottom: 8px;
}

.start-menu ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.start-menu li {
    padding: 6px 0;
    color: #333;
    cursor: pointer;
}

    .start-menu li:hover {
        background: rgba(0, 0, 0, 0.05);
    }

.taskbar-app {
    user-select: none;
    -webkit-user-select: none;
}

.taskbar-app {
    transition: background 0.2s ease;
}

    .taskbar-app:hover {
        background-color: rgba(255, 255, 255, 0.25);
    }

.taskbar-app {
    background-color: rgba(255, 255, 255, 0.1);
    transition: background-color 0.2s ease, border 0.2s ease;
}

    .taskbar-app.active {
        background-color: rgba(255, 255, 255, 0.35);
        border: 1px solid rgba(255, 255, 255, 0.6);
    }

.folder-view {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.icon-tile {
    width: 80px;
    text-align: center;
    cursor: pointer;
    user-select: none;
}

    .icon-tile img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        border-radius: 12px;
        padding: 6px;
        transition: background 0.3s;
        background-color: transparent;
    }

    .icon-tile:hover img {
        background-color: rgba(255, 255, 255, 0.2);
    }

    .icon-tile span {
        display: block;
        margin-top: 6px;
        font-size: 12px;
        color: #333;
    }


#taskbar-time {
    display: none;
}


#calendar-popup {
    position: fixed;
    bottom: 60px;
    right: 10px;
    background: #1e1e1e;
    color: white;
    padding: 14px;
    border-radius: 10px;
    display: none;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    width: 280px;
    font-family: 'Segoe UI', sans-serif;
    z-index: 9999;
}

    #calendar-popup header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 8px;
    }

    #calendar-popup button {
        background: none;
        border: none;
        color: white;
        font-size: 16px;
        cursor: pointer;
    }

    #calendar-popup h4 {
        margin: 0;
        font-size: 16px;
    }

    #calendar-popup .days {
        display: flex;
        grid-template-columns: repeat(7, 1fr); /* ✅ 一周7天 */
        flex-wrap: wrap;
        gap: 4px;
    }

.weekdays-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-weight: bold;
    padding-bottom: 5px;
    border-bottom: 1px solid #ddd;
}

.weekday {
    font-size: 14px;
    color: #333;
}

.day {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 5px;
}

    .day[style*="blue"] {
        background-color: #69c0ff !important;
    }

    .day[style*="green"] {
        background-color: #95de64 !important;
    }

.weekday-label {
    font-size: 12px;
    color: #999;
}

#calendar-popup .day {
    width: 26px;
    height: 26px;
    line-height: 26px;
    text-align: center;
    border-radius: 4px;
    background: #333;
    font-size: 13px;
}

#calendar-popup .today {
    background: #0078D7;
}


.company-info {
    position: absolute;
    top: 8px;
    left: 20px;
    font-family: "Microsoft YaHei", "Segoe UI", sans-serif;
    font-size: 14px;
    color: white;
    text-shadow: 0 0 2px #000;
    z-index: 9999;
}

.taskbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 42px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    padding: 0 12px;
    box-shadow: 0 -1px 4px rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255,255,255,0.3);
}

.company-info {
    color: white;
    font-size: 12px;
    margin-right: auto;
    padding-left: 10px;
    line-height: 1.2;
    font-family: "Microsoft YaHei", "Segoe UI", sans-serif;
}

#taskbar-datetime {
    position: absolute;
    right: 10px;
    text-align: right;
    color: white;
    font-size: 12px;
    line-height: 1.2;
    cursor: default;
}

.weather-widget, .weather-widget * {
    user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
}

#start-menu {
    display: none;
    position: fixed;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    width: min(440px, calc(100vw - 24px));
    max-height: calc(100vh - 88px);
    overflow: auto;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(18px);
    border-radius: 18px;
    padding: 20px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
    animation: fadeIn 0.2s ease-out;
}

    #start-menu ul {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
        list-style: none;
        padding: 0;
        margin: 0;
    }

    #start-menu li {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 10px;
        border-radius: 10px;
        cursor: pointer;
        transition: background 0.2s;
    }

        #start-menu li:hover {
            background: rgba(255, 255, 255, 0.3);
        }

        #start-menu li img {
            width: 32px;
            height: 32px;
            margin-bottom: 6px;
        }

        #start-menu li span {
            font-size: 13px;
            color: #222;
            text-align: center;
        }

#start-menu-functions {
    padding-top: 12px;
}

#start-menu-functions[hidden],
#start-menu-static-fallback[hidden] {
    display: none !important;
}

.function-menu-section-header {
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.function-menu-section-header h3 {
    margin: 0;
    color: #1f2937;
    font-size: 14px;
    font-weight: 650;
}

.function-menu-link {
    border: 1px solid rgba(85, 105, 130, 0.18);
    border-radius: 7px;
    padding: 5px 9px;
    background: rgba(255, 255, 255, 0.55);
    color: #334155;
    cursor: pointer;
    font-size: 12px;
}

.function-menu-link:hover {
    background: rgba(255, 255, 255, 0.9);
}

.function-menu-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    padding: 2px 0 8px;
}

.function-grid-item,
.function-list-item {
    border: 0;
    color: #1f2937;
    cursor: pointer;
    font: inherit;
}

.function-grid-item {
    min-width: 0;
    min-height: 72px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 4px;
    border-radius: 9px;
    background: transparent;
}

.function-grid-item:hover,
.function-list-item:hover {
    background: rgba(255, 255, 255, 0.52);
}

.function-grid-item img {
    width: 34px;
    height: 34px;
    object-fit: contain;
}

.function-item-content {
    min-width: 0;
}

.function-grid-item .function-item-name {
    display: block;
    max-width: 88px;
    overflow: hidden;
    color: #1f2937;
    font-size: 12px;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.function-menu-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    padding: 2px 0 8px;
}

.function-list-item {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.2);
    text-align: left;
}

.function-list-item img {
    width: 30px;
    height: 30px;
    flex: 0 0 auto;
    object-fit: contain;
}

.function-list-item .function-item-content {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.function-list-item .function-item-name {
    overflow: hidden;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.function-type-badge {
    width: max-content;
    border-radius: 999px;
    padding: 1px 6px;
    font-size: 10px;
}

.function-type-badge.is-system {
    background: rgba(37, 99, 235, 0.1);
    color: #1d4ed8;
}

.function-type-badge.is-removable {
    background: rgba(5, 150, 105, 0.1);
    color: #047857;
}

@media (max-width: 480px) {
    .function-menu-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .function-menu-list {
        grid-template-columns: 1fr;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateX(-50%) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) scale(1);
    }
}


.taskbar {
    z-index: 2000;
}

#start-menu {
    z-index: 3000;
}

#custom-context-menu {
    z-index: 5000;
}

.boot-overlay {
    z-index: 9999;
}


.resizer {
    position: absolute;
    z-index: 2147480000;
    background: transparent;
    touch-action: none;
}

    .resizer.n {
        top: 0;
        left: 14px;
        height: 8px;
        width: calc(100% - 28px);
        cursor: n-resize;
    }

    .resizer.s {
        bottom: 0;
        left: 14px;
        height: 8px;
        width: calc(100% - 28px);
        cursor: s-resize;
    }

    .resizer.e {
        top: 14px;
        right: 0;
        width: 8px;
        height: calc(100% - 28px);
        cursor: e-resize;
    }

    .resizer.w {
        top: 14px;
        left: 0;
        width: 8px;
        height: calc(100% - 28px);
        cursor: w-resize;
    }

    .resizer.ne {
        top: 0;
        right: 0;
        width: 16px;
        height: 16px;
        cursor: ne-resize;
    }

    .resizer.nw {
        top: 0;
        left: 0;
        width: 16px;
        height: 16px;
        cursor: nw-resize;
    }

    .resizer.se {
        bottom: 0;
        right: 0;
        width: 18px;
        height: 18px;
        cursor: se-resize;
    }

    .resizer.sw {
        bottom: 0;
        left: 0;
        width: 16px;
        height: 16px;
        cursor: sw-resize;
    }

.window.maximized > .resizer {
    display: none;
}
#start-menu-login {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  margin: 10px;
  border-radius: 16px;
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  color: #000;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px;
}
#start-menu-login img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  margin-right: 8px;
}
#login-status {
  width: 8px;
  height: 8px;
  background: #cc8800;
  border-radius: 50%;
  display: inline-block;
  margin-left: 6px;
}
.window.login-type {
  background: transparent;
  border: none;
  box-shadow: none;
  overflow: visible;
  padding: 0;
}

.window.login-type iframe {
  border-radius: 12px;
  overflow: hidden;
  width: 100%;
  height: 100%;
}

#user-popup {
  position: fixed;
  z-index: 9999;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
  border-radius: 20px;
  width: 180px;
  padding: 14px;
  transition: opacity 0.2s ease, transform 0.2s ease;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
}

#user-popup.show {
  top: -94px;
  left: 30px;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

#user-popup::before {
  content: '';
  position: absolute;
  top: -10px;
  left: 24px;
  border: 10px solid transparent;
  border-bottom-color: rgba(255, 255, 255, 0.6);
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.1));
}

/* 内部文字样式 */
#user-popup .text-sm {
  color: #333;
  font-weight: 500;
  margin-bottom: 10px;
  font-size: 10pt;
}

#user-popup button {
  display: block;
  width: 100%;
  background: none;
  border: none;
  font-size: 14px;
  padding: 8px 0;
  border-radius: 12px;
  color: #e53935;
  transition: background 0.2s ease, color 0.2s ease;
  cursor: pointer;
}

#user-popup button:hover {
  background-color: #e53935;
  color: white;
}
.window-resize-corner {
  background: transparent;
}

#about-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;

  opacity: 0;
  pointer-events: none;
  transition: 0.2s;
}
#about-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

/* ===== 弹窗 ===== */
.modal {
  width: 720px;
  height: 480px;
  background: #fff;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  overflow: hidden;

  transform: scale(0.95);
  transition: 0.2s;
}
#about-overlay.show .modal {
  transform: scale(1);
}

/* ===== 标题 ===== */
.modal-header {
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid #eee;
}

/* ===== 主体 ===== */
.modal-body {
  flex: 1;
  display: flex;
}

/* 左侧 */
.sidebar {
  width: 180px;
  background: #fafafa;
  border-right: 1px solid #eee;
}

.tabAbout {
  padding: 10px 14px;
  cursor: pointer;
}
.tabAbout:hover {
  background: #eee;
}
.tabAbout.active {
  background: #e6f0ff;
  border-left: 3px solid #3b82f6;
}

/* 右侧 */
.content {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
}

/* 页面 */
.page {
  display: none;
}
.page.active {
  display: block;
}

/* 居中页 */
.center {
  text-align: center;
  margin-top: 60px;
}

.page button {
    margin-top: 20px;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    background: #3b82f6;
    color: #fff;
    cursor: pointer;
}

/* 卡片 */
.pagecard {
  background: #fafafa;
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 10px;
}
/* ===== 音量面板 ===== */
#volume-panel {
  position: fixed;
  right: 20px;
  bottom: 70px;
  z-index: 99999;
}

#volume-panel.hidden {
  display: none;
}

.panel {
  width: 220px;
  height: 260px;
  border-radius: 24px;
  background: rgba(30,30,30,0.6);
  backdrop-filter: blur(20px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.6);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.ring {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,150,255,0.15), transparent 70%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ring.active {
  background: radial-gradient(circle, rgba(0,150,255,0.25), transparent 70%);
}

.knob {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #666, #222);
  box-shadow:
    inset -5px -5px 12px rgba(0,0,0,0.8),
    inset 5px 5px 12px rgba(255,255,255,0.08),
    0 10px 25px rgba(0,0,0,0.6);
  position: relative;
  transform: rotate(-135deg);
  transition: transform 0.08s ease-out;
}

.knob::after {
  content: "";
  position: absolute;
  top: 12px;
  left: 50%;
  width: 4px;
  height: 30px;
  background: #ddd;
  border-radius: 2px;
  transform: translateX(-50%);
}

.label {
  margin-top: 15px;
  color: #fff;
  font-size: 20px;
}

.device {
  margin-top: 6px;
  color: rgba(255,255,255,0.6);
  font-size: 13px;
}
.taskbar-right {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  position: absolute;
  right: 83px;
  top: 0;
  height: 100%;
}
