/* 远程桌面连接窗口 */
#rdp-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #333;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Microsoft YaHei', 'Segoe UI', sans-serif;
}

#rdp-window {
    width: 480px;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    overflow: hidden;
}

#rdp-header {
    background: linear-gradient(to bottom, #f0f0f0, #e0e0e0);
    padding: 6px 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #ccc;
}

#rdp-icon {
    font-size: 16px;
    margin-right: 5px;
}

#rdp-title {
    font-size: 12px;
    color: #333;
    flex: 1;
}

#rdp-controls {
    display: flex;
    gap: 2px;
}

.rdp-btn {
    width: 26px;
    height: 20px;
    border: 1px solid #999;
    background: linear-gradient(to bottom, #f5f5f5, #e8e8e8);
    border-radius: 2px;
    cursor: pointer;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rdp-btn:hover {
    background: linear-gradient(to bottom, #fff, #f0f0f0);
}

#rdp-close:hover {
    background: #e81123;
    color: #fff;
}

#rdp-body {
    background: #f5f5f5;
    padding: 0;
}

#rdp-header-banner {
    background: linear-gradient(to bottom, #fff 0%, #f0f0f0 100%);
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid #ddd;
}

#rdp-banner-icon {
    font-size: 48px;
}

#rdp-banner-title {
    font-size: 24px;
    font-weight: bold;
    color: #0078d4;
}

#rdp-banner-subtitle {
    font-size: 24px;
    color: #666;
}

#rdp-form {
    padding: 20px;
    background: #fff;
}

.rdp-form-row {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    font-size: 12px;
}

.rdp-form-row label {
    width: 80px;
    color: #333;
}

.rdp-form-row input {
    flex: 1;
    padding: 4px 6px;
    border: 1px solid #999;
    border-radius: 2px;
    font-size: 12px;
}

.rdp-form-row span {
    color: #666;
}

.rdp-form-hint {
    font-size: 11px;
    color: #666;
    margin-top: 10px;
}

#rdp-actions {
    padding: 10px 20px;
    background: #f5f5f5;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #ddd;
}

#rdp-show-options {
    background: none;
    border: none;
    color: #0066cc;
    font-size: 11px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
}

#rdp-show-options:hover {
    text-decoration: underline;
}

.rdp-option-icon {
    font-size: 10px;
}

#rdp-buttons {
    display: flex;
    gap: 5px;
}

.rdp-primary-btn, .rdp-secondary-btn {
    padding: 6px 18px;
    border-radius: 3px;
    font-size: 12px;
    cursor: pointer;
}

.rdp-primary-btn {
    background: linear-gradient(to bottom, #0078d4, #005a9e);
    border: 1px solid #005a9e;
    color: white;
}

.rdp-primary-btn:hover {
    background: linear-gradient(to bottom, #1084d9, #106aae);
}

.rdp-secondary-btn {
    background: linear-gradient(to bottom, #f5f5f5, #e0e0e0);
    border: 1px solid #999;
    color: #333;
}

.rdp-secondary-btn:hover {
    background: linear-gradient(to bottom, #fff, #f0f0f0);
}

#rdp-connecting {
    text-align: center;
    padding: 40px;
}

.rdp-connecting-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0078d4;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.rdp-connecting-text {
    font-size: 14px;
    color: #333;
}

/* 提示气泡 */
#rdp-tooltip {
    position: absolute;
    z-index: 100000;
    max-width: 200px;
    pointer-events: none;
}

.rdp-tooltip-content {
    background: #fff;
    color: #333;
    padding: 10px 15px;
    border-radius: 6px;
    font-size: 13px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    line-height: 1.5;
    text-align: center;
}

.rdp-tooltip-arrow {
    position: absolute;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid #fff;
    left: 50%;
    transform: translateX(-50%);
    bottom: -8px;
}

/* 开场 Overlay 样式 */
#opening-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #000;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: opacity 0.8s ease-out;
}

#opening-overlay.fade-out {
    opacity: 0;
    pointer-events: none;
}

.opening-content {
    text-align: center;
    color: #fff;
    max-width: 600px;
    padding: 40px;
    animation: fadeIn 2s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.opening-content h1 {
    font-size: 32px;
    margin-bottom: 40px;
    color: #4a90d9;
    text-shadow: 0 0 20px rgba(74, 144, 217, 0.5);
}

.opening-text {
    font-size: 18px;
    line-height: 2;
    margin-bottom: 40px;
}

.opening-text p {
    margin: 15px 0;
    opacity: 0;
    animation: textReveal 1s ease-out forwards;
}

.opening-text p:nth-child(1) {
    animation-delay: 0.5s;
}

.opening-text p:nth-child(2) {
    animation-delay: 1.5s;
}

.opening-text p:nth-child(3) {
    animation-delay: 2.5s;
}

.opening-text p:nth-child(4) {
    animation-delay: 3.5s;
}

@keyframes textReveal {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.opening-text-emphasis {
    color: #ff9800;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(255, 152, 0, 0.5);
}

.opening-hint {
    font-size: 16px;
    color: #888;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.5;
    }
    50% {
        opacity: 1;
    }
}

/* 桌面样式 */
#desktop {
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    position: relative;
    font-family: 'Microsoft YaHei', 'Segoe UI', sans-serif;
    overflow: hidden;
}

/* 桌面图标 */
#desktop-icons {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    height: calc(100vh - 80px);
    overflow-y: auto;
}

.desktop-icon {
    width: 80px;
    text-align: center;
    cursor: pointer;
    padding: 10px;
    border-radius: 8px;
    transition: background 0.2s;
}

.desktop-icon:hover {
    background: rgba(255, 255, 255, 0.1);
}

.icon-image {
    font-size: 40px;
    margin-bottom: 5px;
}

.icon-text {
    color: #fff;
    font-size: 12px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}

.hidden-indicator {
    font-size: 16px;
    position: absolute;
    top: 5px;
    right: 5px;
}

/* 回收站窗口 */
.recycle-bin-window {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    overflow: hidden;
    width: 600px;
    height: 400px;
    display: flex;
    flex-direction: column;
}

.recycle-bin-header {
    background: linear-gradient(to bottom, #4a90d9, #357abd);
    color: white;
    padding: 8px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.recycle-bin-title {
    font-size: 14px;
    font-weight: 500;
}

.recycle-bin-controls {
    display: flex;
    gap: 4px;
}

.recycle-bin-btn {
    background: none;
    border: none;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}

.recycle-bin-btn:hover {
    background: rgba(255,255,255,0.2);
}

.recycle-bin-body {
    flex: 1;
    padding: 20px;
    background: #f5f5f5;
    overflow-y: auto;
}

.recycle-bin-empty {
    text-align: center;
    color: #999;
    margin-top: 80px;
}

.recycle-bin-empty-icon {
    font-size: 64px;
    margin-bottom: 15px;
}

.recycle-bin-items {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.recycle-bin-item {
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.recycle-bin-item:hover {
    background: #f0f0f0;
    border-color: #4a90d9;
}

.recycle-bin-item-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.recycle-bin-item-name {
    font-size: 12px;
    color: #333;
    word-break: break-all;
}

.recycle-bin-item-date {
    font-size: 10px;
    color: #999;
    margin-top: 4px;
}

/* 任务栏 */
#taskbar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    padding: 0 10px;
}

#start-button {
    background: #0078d4;
    color: white;
    padding: 5px 15px;
    border-radius: 4px;
    cursor: pointer;
    margin-right: 10px;
}

#taskbar-items {
    flex: 1;
    display: flex;
    gap: 5px;
}

#system-tray {
    color: white;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tray-btn {
    background: none;
    border: none;
    color: white;
    font-size: 14px;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 4px;
    transition: background 0.2s;
}

.tray-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* 窗口样式 */
.window {
    position: absolute;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    overflow: hidden;
    min-width: 300px;
    min-height: 200px;
}

.window-header {
    background: #f0f0f0;
    padding: 8px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: move;
}

.window-title {
    font-size: 14px;
    font-weight: bold;
}

.window-controls {
    display: flex;
    gap: 5px;
}

.window-btn {
    width: 24px;
    height: 24px;
    border: none;
    background: #e0e0e0;
    border-radius: 4px;
    cursor: pointer;
}

.window-btn.close:hover {
    background: #e81123;
    color: white;
}

.window-content {
    height: calc(100% - 40px);
    overflow: auto;
}

/* 浏览器样式 */
.address-bar {
    display: flex;
    gap: 5px;
    padding: 8px;
    background: #f5f5f5;
    border-bottom: 1px solid #ddd;
}

.address-bar input {
    flex: 1;
    padding: 5px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

#browser-content {
    width: 100%;
    height: 100%;
    border: none;
}

/* 浏览器工具栏 */
.browser-toolbar {
    background: #f0f0f0;
    border-bottom: 1px solid #ddd;
    padding: 6px 10px;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

/* 网址输入栏 */
.url-bar {
    flex: 1;
    padding: 5px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 12px;
    background: white;
}

/* 历史记录按钮 */
.history-btn {
    background: #e0e0e0;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 5px 10px;
    font-size: 12px;
    cursor: pointer;
    margin-left: 8px;
}

.history-btn:hover {
    background: #d0d0d0;
}

/* 收藏栏 */
.bookmark-bar {
    background: #f8f8f8;
    border-bottom: 1px solid #e0e0e0;
    padding: 4px 10px;
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

/* 收藏项 */
.bookmark-item {
    font-size: 12px;
    color: #333;
    padding: 3px 10px;
    border-radius: 3px;
    cursor: pointer;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bookmark-item:hover {
    background: #e0e0e0;
}

/* 历史记录模态框 */
.history-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 历史记录面板 */
.history-panel {
    background: white;
    border-radius: 8px;
    width: 500px;
    max-height: 70vh;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
}

/* 历史记录头部 */
.history-header {
    background: linear-gradient(to bottom, #4a90d9, #357abd);
    color: white;
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* 历史记录列表 */
.history-list {
    padding: 10px;
    overflow: auto;
}

/* 历史记录项 */
.history-item {
    padding: 10px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.history-item:hover {
    background: #f5f5f5;
}

/* 历史记录标题 */
.history-item-title {
    font-size: 14px;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 历史记录时间 */
.history-item-time {
    font-size: 11px;
    color: #999;
}

/* 关闭按钮 */
.history-close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 16px;
    cursor: pointer;
}

/* 工具箱样式 */
#toolbox {
    position: absolute;
    top: 50%;
    left: 20px;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.8);
    padding: 10px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tool-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    cursor: pointer;
    font-size: 20px;
    transition: background 0.2s;
}

.tool-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.tool-btn.active {
    background: #0078d4;
}

/* 进度面板样式 */
#progress-panel {
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 15px;
    border-radius: 8px;
    width: 250px;
    max-height: 80vh;
    overflow-y: auto;
}

#clues-list {
    margin-bottom: 15px;
}

.clue-item {
    padding: 5px;
    margin: 3px 0;
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
    font-size: 12px;
}

#memory-fragments {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.fragment-slot {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.fragment-slot.collected {
    background: #4caf50;
}

.fragment-slot.locked {
    background: rgba(255,255,255,0.05);
}

/* 提示系统样式 */
#hint-system {
    position: absolute;
    bottom: 60px;
    right: 20px;
}

.hint-trigger {
    background: #ff9800;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
}

.hint-box {
    position: absolute;
    bottom: 50px;
    right: 0;
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    width: 250px;
}

.hint-box button {
    background: #0078d4;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 10px;
}

/* 窗口样式 */
.game-window {
    position: absolute;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 400px;
    min-height: 300px;
}

.game-window .window-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(to bottom, #4a90d9, #357abd);
    color: white;
    padding: 8px 12px;
    cursor: move;
    user-select: none;
    flex-shrink: 0;
}

.game-window .window-title {
    font-size: 13px;
    font-weight: 500;
}

.game-window .window-controls {
    display: flex;
    gap: 4px;
}

.game-window .window-btn {
    background: none;
    border: none;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}

.game-window .window-btn:hover {
    background: rgba(255,255,255,0.2);
}

.game-window .window-btn.close-btn:hover {
    background: rgba(255,0,0,0.4);
}

.game-window .window-body {
    flex: 1;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
}

.game-window .window-iframe {
    width: 100%;
    height: 100%;
    min-height: 100%;
    flex: 1;
    border: none;
    display: block;
}

/* 开始菜单样式 */
#start-menu {
    position: absolute;
    bottom: 48px;
    left: 8px;
    width: 320px;
    background: rgba(30, 30, 50, 0.97);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    color: #fff;
    z-index: 9999;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
    overflow: hidden;
}

#start-menu.hidden {
    display: none;
}

#start-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

#start-menu-header h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 500;
}

#start-menu-close {
    background: none;
    border: none;
    color: #aaa;
    cursor: pointer;
    font-size: 16px;
    padding: 2px 6px;
    border-radius: 4px;
}

#start-menu-close:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

#start-menu-content {
    padding: 12px;
}

#start-menu-section h4 {
    margin: 0 0 8px 0;
    font-size: 12px;
    color: #aaa;
    text-transform: uppercase;
}

#start-menu-pages {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}

.start-menu-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s;
}

.start-menu-item:hover {
    background: rgba(255,255,255,0.1);
}

.start-menu-item.locked {
    opacity: 0.4;
    cursor: default;
}

.start-menu-item.locked:hover {
    background: none;
}

.start-menu-item-icon {
    font-size: 20px;
    margin-bottom: 4px;
}

.start-menu-item-name {
    font-size: 10px;
    text-align: center;
    color: #ddd;
}

#start-menu-actions {
    display: flex;
    gap: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.start-menu-btn {
    flex: 1;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.1);
    color: #ddd;
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    transition: background 0.15s;
}

.start-menu-btn:hover {
    background: rgba(255,255,255,0.15);
    color: #fff;
}

/* 任务栏条目样式 */
#taskbar-items {
    display: flex;
    gap: 4px;
    align-items: center;
}

.taskbar-item {
    padding: 4px 12px;
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
    color: #fff;
    font-size: 12px;
    cursor: pointer;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: background 0.15s;
}

.taskbar-item:hover {
    background: rgba(255,255,255,0.2);
}

.taskbar-item.minimized {
    opacity: 0.5;
}

/* 响应式设计 */
@media (max-width: 768px) {
    #desktop-icons {
        padding: 10px;
        gap: 10px;
    }
    
    .desktop-icon {
        width: 60px;
    }
    
    .icon-image {
        font-size: 30px;
    }
    
    .icon-text {
        font-size: 10px;
    }
    
    #toolbox, #progress-panel {
        position: relative;
        top: auto;
        left: auto;
        right: auto;
        transform: none;
        margin: 10px;
    }
    
    #start-menu {
        width: calc(100vw - 16px);
    }
    
    .game-window {
        width: calc(100vw - 20px) !important;
        height: calc(100vh - 70px) !important;
        left: 10px !important;
        top: 10px !important;
    }
}