* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow: hidden;
    height: 100vh;
    background: linear-gradient(135deg, #b7ccdd 0%, #526d98 100%);
    position: relative;
}

/* 桌面背景 */
.desktop {
    width: 100%;
    height: calc(100vh - 48px);
    position: relative;
    padding: 20px;
    margin-top: 48px;
}

/* 桌面圖示容器 */
.desktop-icons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: absolute;
    top: 20px;
    left: 20px;
}

/* 桌面圖示 */
.desktop-icon {
    width: 80px;
    text-align: center;
    cursor: pointer;
    margin-bottom: 10px;
    transition: background 0.2s;
    padding: 8px;
    border-radius: 4px;
    text-decoration: none;
    color: inherit;
}

.desktop-icon:hover {
    background: rgba(255, 255, 255, 0.1);
}

.desktop-icon-image {
    width: 48px;
    height: 48px;
    background: #e7e5e3;
    margin: 0 auto 8px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.desktop-icon-label {
    color: white;
    font-size: 12px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* 工作列 */
.taskbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 48px;
    background: rgba(82, 109, 152, 0.95);
    backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    padding: 0 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

/* 開始按鈕 */
.start-button {
    width: 48px;
    height: 36px;
    background: transparent;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    font-size: 20px;
}

.start-button:hover {
    background: rgba(255, 255, 255, 0.1);
}

.start-button.active {
    background: rgba(255, 255, 255, 0.15);
}

/* Windows Logo */
.windows-logo {
    width: 20px;
    height: 20px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 2px;
}

.logo-square {
    background: #e7e5e3;
    border-radius: 1px;
}

/* 開始選單 */
.start-menu {
    position: fixed;
    top: 58px;
    left: 8px;
    width: 600px;
    height: 650px;
    background: rgba(231, 229, 227, 0.95);
    backdrop-filter: blur(40px);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 999;
}

.start-menu.show {
    display: flex;
    animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 搜尋框 */
.search-box {
    margin: 20px 20px 10px 20px;
    padding: 10px 15px;
    background: white;
    border: 2px solid #b7ccdd;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
}

.search-box:focus {
    border-color: #526d98;
}

/* 釘選區域 */
.pinned-section {
    padding: 20px;
    flex: 1;
    overflow-y: auto;
}

.section-title {
    font-size: 13px;
    color: #526d98;
    margin-bottom: 15px;
    font-weight: 600;
}

.apps-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 15px;
}

.app-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
    text-decoration: none;
    color: inherit;
}

.app-item:hover {
    background: rgba(183, 204, 221, 0.3);
}

.app-icon {
    width: 48px;
    height: 48px;
    background: #526d98;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 8px;
    color: white;
}

.app-name {
    font-size: 11px;
    text-align: center;
    color: #333;
}

/* 底部用戶區 */
.user-section {
    padding: 15px 20px;
    border-top: 1px solid rgba(82, 109, 152, 0.2);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    background: #526d98;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
}

.user-name {
    font-size: 13px;
    color: #333;
}

.power-button {
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    font-size: 18px;
}

.power-button:hover {
    background: rgba(82, 109, 152, 0.2);
}

/* 工作列其他圖示 */
.taskbar-icons {
    display: flex;
    gap: 4px;
    margin-left: 8px;
}

.taskbar-icon {
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    font-size: 16px;
    text-decoration: none;
    color: inherit;
}

.taskbar-icon:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* 系統托盤 */
.system-tray {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 0 12px;
}

.tray-icon {
    font-size: 14px;
    color: #526d98;
    cursor: pointer;
}

.clock {
    font-size: 12px;
    color: #333;
    text-align: right;
    line-height: 1.3;
}

.clock-time {
    font-weight: 600;
}

/* 滾動條樣式 */
.pinned-section::-webkit-scrollbar {
    width: 8px;
}

.pinned-section::-webkit-scrollbar-track {
    background: transparent;
}

.pinned-section::-webkit-scrollbar-thumb {
    background: rgba(82, 109, 152, 0.3);
    border-radius: 4px;
}

.pinned-section::-webkit-scrollbar-thumb:hover {
    background: rgba(82, 109, 152, 0.5);
}

/* 視窗樣式 */
.window {
    position: absolute;
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.window-header {
    background: linear-gradient(to bottom, #526d98, #455a7d);
    color: white;
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: move;
    user-select: none;
}

.window-title {
    font-size: 13px;
    font-weight: 500;
}

.window-controls {
    display: flex;
    gap: 8px;
}

.window-btn {
    width: 28px;
    height: 28px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.window-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.close-btn:hover {
    background: #e81123;
}

.window-content {
    flex: 1;
    padding: 30px 40px;
    overflow: hidden;
    background: #f5f5f5;
}

/* 工具表單樣式 */
.tool-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 450px;
    margin: 0 auto;
}

.form-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-row label {
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

.input-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-input {
    flex: 1;
    padding: 10px 12px;
    border: 2px solid #b7ccdd;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.form-input:focus {
    border-color: #526d98;
}

.separator {
    font-size: 16px;
    color: #666;
    font-weight: bold;
}

/* 錯誤訊息樣式 */
.error-message {
    min-height: 20px;
    font-size: 12px;
    color: #e81123;
    margin-top: 5px;
    padding-left: 2px;
}

/* 日期時間顯示樣式 */
.datetime-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    height: 100%;
    gap: 10px;
    background: linear-gradient(135deg, #e7e5e3 0%, #f5f5f5 100%);
    border-radius: 8px;
    padding: 15px;
}

.time-display {
    font-size: 32px;
    font-weight: 600;
    color: #526d98;
    font-family: 'Consolas', 'Monaco', 'Menlo', monospace;
    letter-spacing: 2px;
}

.date-display {
    font-size: 14px;
    color: #333;
    font-weight: 500;
    margin-bottom: 5px;
}

.weekday-display {
    font-size: 14px;
    color: #666;
    margin-top: -4px;
}

/* 日曆表格樣式 */
.calendar-container {
    width: 100%;
    margin-top: 5px;
}

.calendar-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.calendar-table th {
    background: #526d98;
    color: white;
    padding: 6px 4px;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
}

.calendar-table td {
    padding: 6px 4px;
    text-align: center;
    font-size: 12px;
    border: 1px solid #e0e0e0;
    color: #333;
}

.calendar-table td.empty {
    background: #f9f9f9;
    border-color: #f0f0f0;
}

.calendar-table td.day {
    background: white;
    cursor: default;
    transition: background 0.2s;
}

.calendar-table td.day:hover {
    background: #f0f0f0;
}

.calendar-table td.today {
    background: #526d98 !important;
    color: white !important;
    font-weight: bold;
    box-shadow: inset 0 0 0 2px #455a7d;
}

/* 時鐘視窗特殊樣式 */
.clock-window .window-content {
    padding: 15px;
    background: transparent;
}

/* 伺服器監控樣式 */
.server-monitor {
    display: flex;
    flex-direction: column;
    gap: 12px;
    height: 100%;
}

.monitor-overview {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 10px;
    background: linear-gradient(135deg, #526d98 0%, #455a7d 100%);
    border-radius: 8px;
}

.overview-stat {
    text-align: center;
    padding: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
}

.overview-stat.online {
    background: rgba(76, 175, 80, 0.2);
}

.overview-stat.hashrate {
    background: rgba(33, 150, 243, 0.2);
}

.stat-label {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 4px;
}

.stat-value {
    font-size: 16px;
    font-weight: bold;
    color: white;
}

.server-list {
    flex: 1;
    overflow-y: auto;
    padding: 5px;
}

.server-item {
    background: white;
    border-radius: 6px;
    padding: 10px;
    margin-bottom: 8px;
    border-left: 3px solid #e0e0e0;
    transition: all 0.2s;
}

.server-item.online {
    border-left-color: #4caf50;
}

.server-item.offline {
    border-left-color: #f44336;
    opacity: 0.6;
}

.server-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.server-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #f44336;
}

.server-item.online .server-status {
    background: #4caf50;
}

.server-name {
    font-weight: 600;
    font-size: 13px;
    color: #333;
    flex: 1;
}

.server-hashrate {
    font-size: 12px;
    font-weight: 600;
    color: #526d98;
    font-family: 'Consolas', monospace;
}

.server-specs {
    font-size: 11px;
    color: #666;
    margin-bottom: 6px;
}

.spec {
    font-family: 'Consolas', monospace;
}

.spec-divider {
    margin: 0 6px;
    color: #ccc;
}

.server-progress {
    margin-top: 6px;
}

.progress-bar {
    width: 100%;
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #526d98 0%, #4caf50 100%);
    transition: width 0.3s ease;
}

.server-item.offline .progress-fill {
    background: #ccc;
}

/* 監控視窗特殊樣式 */
.monitor-window .window-content {
    padding: 12px;
    background: #f5f5f5;
}

/* 捲軸樣式 */
.server-list::-webkit-scrollbar {
    width: 6px;
}

.server-list::-webkit-scrollbar-track {
    background: transparent;
}

.server-list::-webkit-scrollbar-thumb {
    background: rgba(82, 109, 152, 0.3);
    border-radius: 3px;
}

.server-list::-webkit-scrollbar-thumb:hover {
    background: rgba(82, 109, 152, 0.5);
}

/* 國道監視器樣式 */
.cctv-monitor {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.cctv-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    padding: 10px;
    background: #e7e5e3;
    border-radius: 6px;
    margin-bottom: 10px;
    text-align: center;
}

.cctv-image-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
    min-height: 250px;
}

.loading-text {
    position: absolute;
    font-size: 14px;
    color: #666;
}

.cctv-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.cctv-refresh {
    margin-top: 10px;
    text-align: center;
}

.refresh-btn {
    padding: 8px 16px;
    background: #526d98;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.2s;
}

.refresh-btn:hover {
    background: #455a7d;
}