/* 桌面版记事本样式 */
.desktop-notepad-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    margin: 0 10px;
    cursor: pointer;
    color: #fff;
    position: relative;
}

.desktop-notepad-icon:hover {
    opacity: 0.8;
}

/* 确保状态栏图标区域有足够空间 */
.system-info {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-width: 40px;
}

/* Mac风格窗口样式 */
.desktop-notepad-window {
    position: absolute;
    top: 100px;
    left: calc(50% - 400px);
    width: 800px;
    height: 500px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 5px 30px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 1000;
    display: none;
    transition: all 0.2s ease;
    transform-origin: center;
}

.desktop-notepad-window.show {
    display: flex;
    animation: window-appear 0.2s ease;
}

.desktop-notepad-window.minimized {
    transform: scale(0.1);
    opacity: 0;
    pointer-events: none;
}

.desktop-notepad-window.maximized {
    top: 30px !important;
    left: 30px !important;
    width: calc(100% - 60px) !important;
    height: calc(100% - 60px) !important;
}

@keyframes window-appear {
    from {
        transform: scale(0.95);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Mac风格标题栏 */
.desktop-notepad-titlebar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 15px;
    background: #f5f5f5;
    border-bottom: 1px solid #e0e0e0;
    -webkit-app-region: drag; /* 允许拖动 */
    user-select: none;
}

.desktop-notepad-title {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin: 0;
    text-align: center;
    flex: 1;
}

.desktop-notepad-window-controls {
    display: flex;
    gap: 8px;
    margin-right: auto;
    -webkit-app-region: no-drag; /* 控制按钮不可拖动 */
}

.desktop-notepad-control {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.desktop-notepad-close {
    background: #ff5f57;
}

.desktop-notepad-minimize {
    background: #ffbd2e;
}

.desktop-notepad-maximize {
    background: #28c940;
}

.desktop-notepad-control:hover i {
    opacity: 1;
}

.desktop-notepad-control i {
    font-size: 8px;
    color: rgba(0,0,0,0.5);
    opacity: 0;
}

.desktop-notepad-actions {
    display: flex;
    gap: 10px;
    -webkit-app-region: no-drag; /* 操作按钮不可拖动 */
}

.desktop-notepad-action {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.desktop-notepad-action:hover {
    background: rgba(0,0,0,0.05);
}

.desktop-notepad-action i {
    font-size: 12px;
}

/* 标签页样式 */
.desktop-notepad-tabs {
    display: flex;
    overflow-x: auto;
    background: #f5f5f5;
    border-bottom: 1px solid #e0e0e0;
    scrollbar-width: thin;
}

.desktop-notepad-tabs::-webkit-scrollbar {
    height: 4px;
}

.desktop-notepad-tabs::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 2px;
}

.desktop-notepad-tab {
    padding: 8px 30px 8px 15px;
    background: #f0f0f0;
    border-right: 1px solid #e0e0e0;
    cursor: pointer;
    position: relative;
    white-space: nowrap;
    min-width: 100px;
    transition: all 0.2s ease;
}

.desktop-notepad-tab.active {
    background: #fff;
    border-bottom: 2px solid #007aff;
}

.desktop-notepad-tab-title {
    font-size: 13px;
    color: #666;
}

.desktop-notepad-tab.active .desktop-notepad-tab-title {
    color: #007aff;
    font-weight: 500;
}

.desktop-notepad-tab-close {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    line-height: 16px;
    text-align: center;
    border-radius: 50%;
    opacity: 0.5;
}

.desktop-notepad-tab:hover .desktop-notepad-tab-close {
    opacity: 1;
    background: rgba(0,0,0,0.1);
}

/* 内容区域 */
.desktop-notepad-content {
    flex: 1;
    position: relative;
    overflow: hidden;
    background: #fff;
}

.desktop-notepad-editor {
    width: 100%;
    height: 100%;
    padding: 15px;
    border: none;
    resize: none;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
}

.desktop-notepad-editor:focus {
    outline: none;
}

/* 底部状态栏 */
.desktop-notepad-statusbar {
    padding: 5px 15px;
    background: #f5f5f5;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #666;
}

/* 徽章样式 */
.desktop-notepad-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff3b30;
    color: white;
    font-size: 10px;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    font-weight: 500;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.2s ease;
}

.desktop-notepad-badge.show {
    opacity: 1;
    transform: scale(1);
}

/* 移动端适配 */
@media (max-width: 768px) {
    .desktop-notepad-window {
        top: 35px !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
        border-radius: 0;
        animation: none;
    }
    
    .desktop-notepad-window.show {
        animation: window-appear-mobile 0.3s ease;
    }
    
    @keyframes window-appear-mobile {
        from {
            transform: translateY(100%);
        }
        to {
            transform: translateY(0);
        }
    }
    
    .desktop-notepad-titlebar {
        padding: 12px 15px;
    }
    
    .desktop-notepad-control {
        width: 14px;
        height: 14px;
    }
    
    .desktop-notepad-action {
        padding: 6px 10px;
        font-size: 13px;
    }
    
    .desktop-notepad-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .desktop-notepad-tab {
        padding: 10px 30px 10px 15px;
    }
    
    .desktop-notepad-editor {
        font-size: 16px;
        padding: 20px;
    }
    
    /* 隐藏最大化按钮，在移动端没有意义 */
    .desktop-notepad-maximize {
        display: none;
    }
}

/* 针对超小屏幕的优化 */
@media (max-width: 480px) {
    .desktop-notepad-title {
        font-size: 13px;
    }
    
    .desktop-notepad-action {
        padding: 4px 8px;
        font-size: 12px;
    }
    
    .desktop-notepad-tab {
        min-width: 80px;
    }
} 